: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
feat(dashboards): add widget registry, run_widgets, and dashboard widget API (6/11) (#60494)
Matt Pua79b837a6bba3
diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 826cd62aa277..47a44e08e791 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -1949,9 +1949,9 @@ snapshots:filters-taxonomic-filter-headless--properties--light:hash: v1.k794b7964.afa422fd784363e602da5668ab488a823260acba8c2b1168dc85bcbf434d3ddf.Wjl32UIE5KhBda_SpJYwXKZ2FGmnlFbtzv4uKDaJRIsfilters-taxonomic-filter-headless--suggested-filters-with-recents--dark:- hash: v1.k794b7964.790efb08b3bdf38ac511b9b1d59c7b7227814bcdb8785b8a5809230680b6b417.ZIuweOHfzKGmmiyQhhfUZd9P9VKijDjyHRl3PiEbJMI+ hash: v1.k794b7964.f524f5031bba44f2753215e83b93aa50741a3efc012fcddcc61025e4f851ba2c.sm5eih05jClMTS8zKltGelRiDYSI_2RmOFRZjjLwsAcfilters-taxonomic-filter-headless--suggested-filters-with-recents--light:- hash: v1.k794b7964.d5655d5578410b405bd03d3bbcdccfdafac058bc524edb5d0ae4976d109519cf.LKBprxgu92aVJ2cJZ-RQs_ESvjYQheVBDAsrkcLq18k+ hash: v1.k794b7964.637f0e3e35bb7c39120002127ebe7f6a7fd816894331adea79b9fa2aafd92d57.1DZDrW9fde4zlxogGxSduP4WpMW-lhoOldL3z6V9SgEfilters-taxonomic-filter-menu-rebuild--data-warehouse-config--dark:hash: v1.k794b7964.c09183f21589b0f11a3013a6e359d23c8d5b17b1e6ed61476ba45da75bcdc73f.tzexSMIoGf0LgGmzdG3-O0g7vd9Isx6MRQ_TWltg4Fofilters-taxonomic-filter-menu-rebuild--data-warehouse-config--light:diff --git a/frontend/src/scenes/dashboard/dashboardLogic.test.ts b/frontend/src/scenes/dashboard/dashboardLogic.test.tsindex b8893d3af8dd..e8893f812e30 100644--- a/frontend/src/scenes/dashboard/dashboardLogic.test.ts+++ b/frontend/src/scenes/dashboard/dashboardLogic.test.ts@@ -247,7 +247,7 @@ describe('dashboardLogic', () => {'/api/environments/:team_id/dashboards/:id/move_tile/': async (req) => {// backend updates the two dashboards and the insightconst jsonPayload = await req.json()- const { toDashboard, tile: tileToUpdate } = jsonPayload+ const { to_dashboard: toDashboard, tile: tileToUpdate } = jsonPayloadconst from = dashboards[Number(req.params.id)]// remove the tile from the source dashboardconst fromIndex = from.tiles.findIndex(@@ -646,7 +646,7 @@ describe('dashboardLogic', () => {expect(api.update).toHaveBeenCalledWith(`api/environments/${MOCK_TEAM_ID}/dashboards/${9}/move_tile`,- expect.objectContaining({ tile: sourceTile, toDashboard: 8 })+ expect.objectContaining({ tile: sourceTile, to_dashboard: 8 }))})diff --git a/frontend/src/scenes/dashboard/dashboardLogic.tsx b/frontend/src/scenes/dashboard/dashboardLogic.tsxindex f1c9b9ff623a..164ce2e37b7b 100644--- a/frontend/src/scenes/dashboard/dashboardLogic.tsx+++ b/frontend/src/scenes/dashboard/dashboardLogic.tsx@@ -572,7 +572,7 @@ export const dashboardLogic = kea<dashboardLogicType>([`api/environments/${teamLogic.values.currentTeamId}/dashboards/${props.id}/move_tile`,{tile,- toDashboard,+ to_dashboard: toDashboard,})return getQueryBasedDashboard(dashboard)diff --git a/posthog/api/resource_transfer.py b/posthog/api/resource_transfer.pyindex 112c4144ff87..5c0a8f359354 100644--- a/posthog/api/resource_transfer.py+++ b/posthog/api/resource_transfer.py@@ -224,6 +224,9 @@ class ResourceTransferViewSet(TeamAndOrgViewSetMixin, viewsets.ViewSet):if visitor.is_immutable():raise exceptions.ValidationError(f"Cannot search for immutable resource kind: {data['resource_kind']}")+ if not visitor.user_facing:+ raise exceptions.ValidationError(f"Cannot search for resource kind: {data['resource_kind']}")+model = visitor.get_model()# model_to_resource accepts both instances and classes at runtime via _metadiff --git a/posthog/api/test/dashboards/__init__.py b/posthog/api/test/dashboards/__init__.pyindex 3345a740fc31..d102e0671b36 100644--- a/posthog/api/test/dashboards/__init__.py+++ b/posthog/api/test/dashboards/__init__.py@@ -4,6 +4,8 @@ from rest_framework import statusfrom posthog.models.team import Team+from products.dashboards.backend.widget_registry import DashboardWidgetType+class DashboardAPI:def __init__(self, client, team: Team, assertEqual):@@ -321,3 +323,24 @@ class DashboardAPI:{"dashboards": dashboard_ids},)self.assertEqual(response.status_code, expected_status)++ def create_widget_tile(+ self,+ dashboard_id: int,+ widget_type: DashboardWidgetType = "error_tracking_list",+ config: dict[str, Any] | None = None,+ team_id: int | None = None,+ expected_status: int = status.HTTP_200_OK,+ ) -> tuple[int, dict[str, Any]]:+ if team_id is None:+ team_id = self.team.id+ if config is None:+ config = {"limit": 10}++ response = self.client.patch(+ f"/api/projects/{team_id}/dashboards/{dashboard_id}",+ {"tiles": [{"widget": {"widget_type": widget_type, "config": config}}]},+ )+ self.assertEqual(response.status_code, expected_status)+ response_json = response.json()+ return dashboard_id, response_jsondiff --git a/posthog/api/test/dashboards/test_dashboard.py b/posthog/api/test/dashboards/test_dashboard.pyindex f1a70de6af34..5e8f07182937 100644--- a/posthog/api/test/dashboards/test_dashboard.py+++ b/posthog/api/test/dashboards/test_dashboard.py@@ -2135,7 +2135,7 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):patch_response = self.client.patch(f"/api/projects/{self.team.id}/dashboards/{dashboard_one_id}/move_tile",- {"tile": dashboard_one["tiles"][0], "toDashboard": dashboard_two_id},+ {"tile": dashboard_one["tiles"][0], "to_dashboard": dashboard_two_id},)assert patch_response.status_code == status.HTTP_200_OKassert patch_response.json()["tiles"] == []@@ -2162,7 +2162,7 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):)patch_response = self.client.patch(f"/api/projects/{self.team.id}/dashboards/{dashboard_a_id}/move_tile",- {"tile": {"id": tile_a.id}, "toDashboard": dashboard_b_id},+ {"tile": {"id": tile_a.id}, "to_dashboard": dashboard_b_id},)assert patch_response.status_code == status.HTTP_200_OKdashboard_b = self.dashboard_api.get_dashboard(dashboard_b_id)@@ -2182,7 +2182,7 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):response = self.client.patch(f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/move_tile",- {"tile": tile, "toDashboard": other_dashboard.id},+ {"tile": tile, "to_dashboard": other_dashboard.id},)assert response.status_code == status.HTTP_404_NOT_FOUND@@ -2214,7 +2214,7 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):move_response = self.client.patch(f"/api/projects/{self.team.id}/dashboards/{dashboard_one_id}/move_tile",- {"tile": tile, "toDashboard": dashboard_two_id},+ {"tile": tile, "to_dashboard": dashboard_two_id},)self.assertEqual(move_response.status_code, status.HTTP_403_FORBIDDEN)diff --git a/posthog/api/test/test_resource_transfer.py b/posthog/api/test/test_resource_transfer.pyindex fe1ce8e5c8e0..2c652703e8d1 100644--- a/posthog/api/test/test_resource_transfer.py+++ b/posthog/api/test/test_resource_transfer.py@@ -11,10 +11,12 @@ from posthog.models.activity_logging.activity_log import ActivityLogfrom posthog.models.cohort import Cohortfrom posthog.models.organization import Organization, OrganizationMembershipfrom posthog.models.resource_transfer.resource_transfer import ResourceTransfer+from posthog.models.scoping import team_scopefrom products.actions.backend.models.action import Actionfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_tile import DashboardTile+from products.dashboards.backend.models.dashboard_widget import DashboardWidgetfrom products.product_analytics.backend.models.insight import Insightfrom products.surveys.backend.models import Survey@@ -101,6 +103,70 @@ class TestResourceTransferPreview(APIBaseTest):tile_resource = next(r for r in resources if r["resource_kind"] == "DashboardTile")assert tile_resource["friendly_kind"] == "Dashboard tile"+ def test_preview_returns_dashboard_with_widget_tiles(self) -> None:+ dashboard = Dashboard.objects.create(team=self.team, name="Widget dashboard")+ with team_scope(self.team.id):+ widget = DashboardWidget.objects.create(+ team=self.team,+ widget_type="error_tracking_list",+ name="Top errors",+ config={"limit": 10},+ )+ DashboardTile.objects.create(dashboard=dashboard, widget=widget, team=self.team)++ response = self.client.post(+ self._preview_url(),+ {+ "source_team_id": self.team.pk,+ "destination_team_id": self.dest_team.pk,+ "resource_kind": "Dashboard",+ "resource_id": str(dashboard.pk),+ },+ )++ assert response.status_code == status.HTTP_200_OK+ resources = response.json()["resources"]+ kinds = {r["resource_kind"] for r in resources}+ assert "Dashboard" in kinds+ assert "DashboardTile" in kinds+ assert "DashboardWidget" in kinds++ user_facing_kinds = {r["resource_kind"] for r in resources if r["user_facing"]}+ assert "Dashboard" in user_facing_kinds+ assert "DashboardWidget" not in user_facing_kinds+ assert "DashboardTile" not in user_facing_kinds++ widget_resource = next(r for r in resources if r["resource_kind"] == "DashboardWidget")+ assert widget_resource["display_name"] == "Top errors"+ assert widget_resource["friendly_kind"] == "Dashboard widget"+ assert widget_resource["user_facing"] is False++ def test_preview_dashboard_widget_uses_catalog_label_without_custom_name(self) -> None:+ dashboard = Dashboard.objects.create(team=self.team, name="Widget dashboard")+ with team_scope(self.team.id):+ widget = DashboardWidget.objects.create(+ team=self.team,+ widget_type="error_tracking_list",+ config={"limit": 10},+ )+ DashboardTile.objects.create(dashboard=dashboard, widget=widget, team=self.team)++ response = self.client.post(+ self._preview_url(),+ {+ "source_team_id": self.team.pk,+ "destination_team_id": self.dest_team.pk,+ "resource_kind": "Dashboard",+ "resource_id": str(dashboard.pk),+ },+ )++ assert response.status_code == status.HTTP_200_OK+ widget_resource = next(r for r in response.json()["resources"] if r["resource_kind"] == "DashboardWidget")+ assert widget_resource["display_name"] == "Top issues"+ assert "DashboardWidget" not in widget_resource["display_name"]+ assert str(widget.pk) not in widget_resource["display_name"]+def test_preview_survey_includes_insight_and_dependencies(self) -> None:insight = Insight.objects.create(team=self.team, name="Survey insight")action = Action.objects.create(@@ -619,6 +685,17 @@ class TestResourceTransferSearch(APIBaseTest):assert response.status_code == status.HTTP_400_BAD_REQUEST+ def test_search_rejects_non_user_facing_kind(self) -> None:+ response = self.client.post(+ self._search_url(),+ {+ "team_id": self.dest_team.pk,+ "resource_kind": "DashboardWidget",+ },+ )++ assert response.status_code == status.HTTP_400_BAD_REQUEST+def test_search_rejects_unknown_kind(self) -> None:response = self.client.post(self._search_url(),diff --git a/posthog/helpers/dashboard_templates.py b/posthog/helpers/dashboard_templates.pyindex 405d94ac33d5..92b98e173405 100644--- a/posthog/helpers/dashboard_templates.py+++ b/posthog/helpers/dashboard_templates.py@@ -1,18 +1,25 @@+from __future__ import annotations+from collections.abc import Callable-from typing import Any, Optional+from typing import TYPE_CHECKING, Any, Optionalfrom django.db.models import Qimport structlogfrom posthog.constants import ENRICHED_DASHBOARD_INSIGHT_IDENTIFIER+from posthog.models.scoping import team_scopefrom posthog.models.tag import Tagfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_templates import DashboardTemplatefrom products.dashboards.backend.models.dashboard_tile import ButtonTile, DashboardTile, Text+from products.dashboards.backend.models.dashboard_widget import DashboardWidgetfrom products.product_analytics.backend.models.insight import Insight+if TYPE_CHECKING:+ from posthog.rbac.user_access_control import UserAccessControl+DASHBOARD_COLORS: list[str] = ["white", "blue", "green", "purple", "black"]logger = structlog.get_logger(__name__)@@ -484,7 +491,13 @@ def dashboard_template_from_creation_payload(template: dict[str, Any]) -> Dashbo)-def create_from_template(dashboard: Dashboard, template: DashboardTemplate, user=None) -> None:+def create_from_template(+ dashboard: Dashboard,+ template: DashboardTemplate,+ user=None,+ *,+ user_access_control: UserAccessControl | None = None,+) -> None:if not dashboard.name or dashboard.name == "":dashboard.name = template.template_namedashboard.filters = template.dashboard_filters@@ -529,6 +542,17 @@ def create_from_template(dashboard: Dashboard, template: DashboardTemplate, userstyle=template_tile.get("style", "primary"),transparent_background=template_tile.get("transparent_background"),)+ elif template_tile["type"] == "WIDGET":+ _create_tile_for_widget(+ dashboard,+ widget_type=template_tile.get("widget_type", ""),+ config=template_tile.get("config", {}),+ color=template_tile.get("color"),+ layouts=template_tile.get("layouts"),+ transparent_background=template_tile.get("transparent_background"),+ user=user,+ user_access_control=user_access_control,+ )else:logger.error("dashboard_templates.creation.unknown_type", template=template)@@ -581,6 +605,45 @@ def _create_tile_for_button()+def _create_tile_for_widget(+ dashboard: Dashboard,+ widget_type: str,+ config: dict,+ layouts: dict | None,+ color: Optional[str],+ transparent_background: Optional[bool] = None,+ user=None,+ *,+ user_access_control: UserAccessControl | None = None,+) -> None:+ from products.dashboards.backend.widget_create import (+ prepare_widget_tile_create, # noqa: PLC0415 — breaks posthog.models import cycle+ )++ normalized_widget_type, validated_config = prepare_widget_tile_create(+ team_id=dashboard.team_id,+ widget_type=widget_type,+ config=config,+ user_access_control=user_access_control,+ )+ with team_scope(dashboard.team_id):+ widget = DashboardWidget.objects.create(+ team=dashboard.team,+ widget_type=normalized_widget_type,+ config=validated_config,+ created_by=user,+ last_modified_by=user,+ )+ DashboardTile.objects.create(+ widget=widget,+ dashboard=dashboard,+ team_id=dashboard.team_id,+ layouts=layouts or {},+ color=color,+ transparent_background=transparent_background,+ )++def _create_tile_for_insight(dashboard: Dashboard,name: str,@@ -608,7 +671,13 @@ def _create_tile_for_insight()-def create_dashboard_from_template(template_key: str, dashboard: Dashboard) -> None:+def create_dashboard_from_template(+ template_key: str,+ dashboard: Dashboard,+ user=None,+ *,+ user_access_control: UserAccessControl | None = None,+) -> None:if template_key in DASHBOARD_TEMPLATES:return DASHBOARD_TEMPLATES[template_key](dashboard)@@ -623,7 +692,7 @@ def create_dashboard_from_template(template_key: str, dashboard: Dashboard) -> Nelse:raise AttributeError(f"Invalid template key `{template_key}` provided.")- create_from_template(dashboard, template)+ create_from_template(dashboard, template, user, user_access_control=user_access_control)FEATURE_FLAG_TOTAL_VOLUME_INSIGHT_NAME = "Feature Flag Called Total Volume"diff --git a/posthog/models/activity_logging/activity_log.py b/posthog/models/activity_logging/activity_log.pyindex 977151b10436..ea85d163c103 100644--- a/posthog/models/activity_logging/activity_log.py+++ b/posthog/models/activity_logging/activity_log.py@@ -83,6 +83,7 @@ ActivityScope = Literal["Log","LogsAlertConfiguration","LogsExclusionRule",+ "DashboardWidget","ProductTour","Ticket","InstanceSetting",@@ -628,11 +629,11 @@ def describe_change(m: Any) -> Union[str, dict]:if isinstance(m, Dashboard):return {"id": m.id, "name": m.name}if isinstance(m, DashboardTile):- description = {"dashboard": {"id": m.dashboard.id, "name": m.dashboard.name}}- if m.insight:- description["insight"] = {"id": m.insight.id}- if m.text:- description["text"] = {"id": m.text.id}+ description: dict[str, Any] = {"dashboard": {"id": m.dashboard.id, "name": m.dashboard.name}}+ description["insight"] = {"id": m.insight_id} if m.insight_id else None+ description["text"] = {"id": m.text_id} if m.text_id else None+ description["button_tile"] = {"id": m.button_tile_id} if m.button_tile_id else None+ description["widget"] = {"id": str(m.widget_id)} if m.widget_id else Nonereturn descriptionelse:return str(m)diff --git a/posthog/models/resource_transfer/inter_project_transferer.py b/posthog/models/resource_transfer/inter_project_transferer.pyindex 7e221b456942..955daabf465b 100644--- a/posthog/models/resource_transfer/inter_project_transferer.py+++ b/posthog/models/resource_transfer/inter_project_transferer.py@@ -21,6 +21,7 @@ from posthog.models.resource_transfer.types import (RewriteRelationFn,)from posthog.models.resource_transfer.visitors import ResourceTransferVisitor+from posthog.models.scoping import team_scopelogger = structlog.get_logger(__name__)@@ -54,7 +55,8 @@ def duplicate_resource_to_new_team(substitution_count=len(substitutions) if substitutions else 0,)with transaction.atomic():- graph = list(build_resource_duplication_graph(resource, set()))+ with team_scope(source_team.id):+ graph = list(build_resource_duplication_graph(resource, set()))logger.info("resource_transfer.graph_built",vertex_count=len(graph),@@ -405,29 +407,30 @@ def get_suggested_substitutions("""recommendations: list[tuple[ResourceTransferKey, ResourceTransferKey]] = []- for vertex in dag:- visitor = ResourceTransferVisitor.get_visitor(vertex.model)+ with team_scope(new_team.id):+ for vertex in dag:+ visitor = ResourceTransferVisitor.get_visitor(vertex.model)- if visitor is None:- raise TypeError(f"Model has no configured visitor: {vertex.model.__name__}")+ if visitor is None:+ raise TypeError(f"Model has no configured visitor: {vertex.model.__name__}")- if visitor.is_immutable():- continue+ if visitor.is_immutable():+ continue- suggested_resource = _find_resource_with_transfer_record(visitor, vertex, new_team)+ suggested_resource = _find_resource_with_transfer_record(visitor, vertex, new_team)- if suggested_resource is None:- suggested_resource = _find_resource_with_same_name(visitor, vertex, new_team)+ if suggested_resource is None:+ suggested_resource = _find_resource_with_same_name(visitor, vertex, new_team)- if suggested_resource is None:- continue+ if suggested_resource is None:+ continue- source_key: ResourceTransferKey = (visitor.kind, vertex.source_resource.pk)- dest_key: ResourceTransferKey = (- cast(ResourceKind, visitor.kind),- suggested_resource.pk,- )- recommendations.append((source_key, dest_key))+ source_key: ResourceTransferKey = (visitor.kind, vertex.source_resource.pk)+ dest_key: ResourceTransferKey = (+ cast(ResourceKind, visitor.kind),+ suggested_resource.pk,+ )+ recommendations.append((source_key, dest_key))return recommendations@@ -655,13 +658,14 @@ def _duplicate_vertex(payload = visitor.adjust_duplicate_payload(payload, vertex, new_team)- if "name" in payload and payload["name"] and _model_has_name_field(visitor.get_model()):- payload["name"] = _deduplicate_name(visitor.get_model(), payload["name"], new_team)+ with team_scope(new_team.id):+ if "name" in payload and payload["name"] and _model_has_name_field(visitor.get_model()):+ payload["name"] = _deduplicate_name(visitor.get_model(), payload["name"], new_team)- if visitor.kind == "FeatureFlag" and payload.get("key"):- payload["key"] = _deduplicate_feature_flag_key(visitor.get_model(), str(payload["key"]), new_team)+ if visitor.kind == "FeatureFlag" and payload.get("key"):+ payload["key"] = _deduplicate_feature_flag_key(visitor.get_model(), str(payload["key"]), new_team)- new_resource = cast(Any, visitor.get_model()).objects.create(**payload)+ new_resource = cast(Any, visitor.get_model()).objects.create(**payload)logger.info("resource_transfer.duplicate_vertex.created",kind=visitor.kind,diff --git a/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambr b/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambrindex 36d794aee55e..bff2cb8a4a1d 100644--- a/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambr+++ b/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambr@@ -46,6 +46,11 @@'refreshing',])# ---+# name: TestVisitorFieldSnapshots.test_excluded_fields_DashboardWidget+ list([+ 'last_modified_at',+ ])+# ---# name: TestVisitorFieldSnapshots.test_excluded_fields_EarlyAccessFeaturelist(['created_at',@@ -180,6 +185,14 @@'transparent_background',])# ---+# name: TestVisitorFieldSnapshots.test_primitive_fields_DashboardWidget+ list([+ 'config',+ 'description',+ 'name',+ 'widget_type',+ ])+# ---# name: TestVisitorFieldSnapshots.test_primitive_fields_EarlyAccessFeaturelist(['description',@@ -338,6 +351,13 @@'widget',])# ---+# name: TestVisitorFieldSnapshots.test_relation_fields_DashboardWidget+ list([+ 'created_by',+ 'last_modified_by',+ 'team',+ ])+# ---# name: TestVisitorFieldSnapshots.test_relation_fields_EarlyAccessFeaturelist(['feature_flag',@@ -583,6 +603,24 @@'widget_id',])# ---+# name: TestVisitorFieldSnapshots.test_skipped_fields_DashboardWidget+ list([+ 'DoesNotExist',+ 'MultipleObjectsReturned',+ '__doc__',+ '__module__',+ '_meta',+ 'all_teams',+ 'created_by_id',+ 'dashboard_tiles',+ 'get_next_by_last_modified_at',+ 'get_previous_by_last_modified_at',+ 'id',+ 'last_modified_at',+ 'last_modified_by_id',+ 'team_id',+ ])+# ---# name: TestVisitorFieldSnapshots.test_skipped_fields_EarlyAccessFeaturelist(['ActiveStage',diff --git a/posthog/models/resource_transfer/test/test_inter_project_transferer.py b/posthog/models/resource_transfer/test/test_inter_project_transferer.pyindex ee9aeadf7688..bf126e39a65d 100644--- a/posthog/models/resource_transfer/test/test_inter_project_transferer.py+++ b/posthog/models/resource_transfer/test/test_inter_project_transferer.py@@ -14,10 +14,12 @@ from posthog.models.resource_transfer.inter_project_transferer import ()from posthog.models.resource_transfer.resource_transfer import ResourceTransferfrom posthog.models.resource_transfer.types import ResourceKind, ResourceTransferVertex+from posthog.models.scoping import team_scopefrom products.actions.backend.models.action import Actionfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_tile import DashboardTile, Text+from products.dashboards.backend.models.dashboard_widget import DashboardWidgetfrom products.product_analytics.backend.models.insight import Insightfrom products.surveys.backend.models import Survey@@ -94,6 +96,25 @@ class TestBuildResourceDuplicationGraph(BaseTest):assert Text in model_typesassert DashboardTile in model_types+ def test_dashboard_with_widget_tile_includes_all_related_resources(self) -> None:+ dashboard = Dashboard.objects.create(team=self.team, name="My dashboard")+ with team_scope(self.team.id):+ widget = DashboardWidget.objects.create(+ team=self.team,+ widget_type="error_tracking_list",+ name="Top errors",+ config={"limit": 10},+ )+ DashboardTile.objects.create(dashboard=dashboard, widget=widget, team=self.team)++ graph = list(build_resource_duplication_graph(dashboard, set()))+ model_types = {v.model for v in graph}++ assert Dashboard in model_types+ assert DashboardWidget in model_types+ assert DashboardTile in model_types+ assert Team in model_types+def test_immutable_resources_have_no_edges(self) -> None:insight = Insight.objects.create(team=self.team, name="My insight")graph = list(build_resource_duplication_graph(insight, set()))@@ -238,6 +259,35 @@ class TestDuplicateResourceToNewTeam(BaseTest):for r in new_insights:assert r.team == dest_team+ def test_duplicates_dashboard_with_widget_tile(self) -> None:+ dest_team = self._create_destination_team()+ dashboard = Dashboard.objects.create(team=self.team, name="My dashboard")+ with team_scope(self.team.id):+ widget = DashboardWidget.objects.create(+ team=self.team,+ widget_type="error_tracking_list",+ name="Top errors",+ config={"limit": 10},+ )+ DashboardTile.objects.create(dashboard=dashboard, widget=widget, team=self.team)++ results = duplicate_resource_to_new_team(dashboard, dest_team, created_by=self.user)++ new_dashboards = [r for r in results if isinstance(r, Dashboard)]+ new_widgets = [r for r in results if isinstance(r, DashboardWidget)]+ new_tiles = [r for r in results if isinstance(r, DashboardTile)]++ assert len(new_dashboards) == 1+ assert len(new_widgets) == 1+ assert len(new_tiles) == 1++ assert new_widgets[0].pk != widget.pk+ assert new_widgets[0].team == dest_team+ assert new_widgets[0].widget_type == "error_tracking_list"+ assert new_widgets[0].config == {"limit": 10}+ assert new_tiles[0].dashboard == new_dashboards[0]+ assert new_tiles[0].widget == new_widgets[0]+def test_does_not_modify_source_resources(self) -> None:dest_team = self._create_destination_team()insight = Insight.objects.create(team=self.team, name="My insight")diff --git a/posthog/models/resource_transfer/types.py b/posthog/models/resource_transfer/types.pyindex 7e39e765a355..e5789104981b 100644--- a/posthog/models/resource_transfer/types.py+++ b/posthog/models/resource_transfer/types.py@@ -9,6 +9,7 @@ ResourceKind = Literal["Cohort","Dashboard","DashboardTile",+ "DashboardWidget","EarlyAccessFeature","Experiment","ExperimentHoldout",diff --git a/posthog/models/resource_transfer/visitors/__init__.py b/posthog/models/resource_transfer/visitors/__init__.pyindex eac836b28ea4..a9090f1c0621 100644--- a/posthog/models/resource_transfer/visitors/__init__.py+++ b/posthog/models/resource_transfer/visitors/__init__.py@@ -3,6 +3,7 @@ from posthog.models.resource_transfer.visitors.base import ResourceTransferVisitfrom posthog.models.resource_transfer.visitors.cohort import CohortVisitorfrom posthog.models.resource_transfer.visitors.dashboard import DashboardVisitorfrom posthog.models.resource_transfer.visitors.dashboard_tile import DashboardTileVisitor+from posthog.models.resource_transfer.visitors.dashboard_widget import DashboardWidgetVisitorfrom posthog.models.resource_transfer.visitors.early_access_feature import EarlyAccessFeatureVisitorfrom posthog.models.resource_transfer.visitors.experiment import ExperimentVisitorfrom posthog.models.resource_transfer.visitors.experiment_holdout import ExperimentHoldoutVisitor@@ -22,6 +23,7 @@ __all__ = ["CohortVisitor","DashboardVisitor","DashboardTileVisitor",+ "DashboardWidgetVisitor","EarlyAccessFeatureVisitor","ExperimentHoldoutVisitor","ExperimentSavedMetricVisitor",diff --git a/posthog/models/resource_transfer/visitors/dashboard_widget.py b/posthog/models/resource_transfer/visitors/dashboard_widget.pynew file mode 100644index 000000000000..79f71cd4692b--- /dev/null+++ b/posthog/models/resource_transfer/visitors/dashboard_widget.py@@ -0,0 +1,36 @@+from __future__ import annotations++from typing import Any++from django.db import models++from posthog.models.resource_transfer.visitors.base import ResourceTransferVisitor++from products.dashboards.backend.models.dashboard_widget import DashboardWidget+from products.dashboards.backend.widget_catalog import WIDGET_CATALOG+++class DashboardWidgetVisitor(+ ResourceTransferVisitor,+ kind="DashboardWidget",+ excluded_fields=["last_modified_at"],+ friendly_name="Dashboard widget",+ user_facing=False,+):+ @classmethod+ def get_model(cls) -> type[models.Model]:+ return DashboardWidget++ @classmethod+ def get_display_name(cls, resource: Any) -> str:+ if getattr(resource, "name", None):+ return str(resource.name)++ widget_type = getattr(resource, "widget_type", None)+ if widget_type:+ catalog_entry = WIDGET_CATALOG.get(str(widget_type))+ if catalog_entry is not None:+ return catalog_entry["label"]+ return str(widget_type)++ return super().get_display_name(resource)diff --git a/posthog/models/test/test_activity_logging.py b/posthog/models/test/test_activity_logging.pyindex e7f3ed4c1366..57ee0d6bedc5 100644--- a/posthog/models/test/test_activity_logging.py+++ b/posthog/models/test/test_activity_logging.py@@ -1,6 +1,11 @@+from typing import cast+from django.test import TestCase-from posthog.models.activity_logging.activity_log import Change, dict_changes_between+from posthog.models.activity_logging.activity_log import AuditableScope, Change, describe_change, dict_changes_between++from products.dashboards.backend.models.dashboard import Dashboard+from products.dashboards.backend.models.dashboard_tile import DashboardTileclass TeatActivityLog(TestCase):@@ -43,3 +48,32 @@ class TeatActivityLog(TestCase):),changes,)++ def test_dashboard_tile_describe_change_includes_absent_content_keys(self):+ tile = DashboardTile(insight_id=1, widget_id=None, button_tile_id=None, text_id=None)+ tile.dashboard = Dashboard(id=2, name="Dash")++ description = describe_change(tile)++ self.assertEqual(+ description,+ {+ "dashboard": {"id": 2, "name": "Dash"},+ "insight": {"id": 1},+ "text": None,+ "button_tile": None,+ "widget": None,+ },+ )++ def test_dict_changes_between_ignores_new_null_tile_content_keys(self):+ previous = {"dashboard": {"id": 1, "name": "Dash"}, "insight": {"id": 10}}+ new = {+ "dashboard": {"id": 1, "name": "Dash"},+ "insight": {"id": 10},+ "text": None,+ "button_tile": None,+ "widget": None,+ }++ self.assertEqual(dict_changes_between(cast(AuditableScope, "DashboardTile"), previous, new), [])diff --git a/posthog/resource_limits/registry.py b/posthog/resource_limits/registry.pyindex 88b4a1a21d03..9df13cc42985 100644--- a/posthog/resource_limits/registry.py+++ b/posthog/resource_limits/registry.py@@ -11,6 +11,7 @@ class LimitKey(StrEnum):MAX_DASHBOARDS_PER_TEAM = "analytics.max_dashboards_per_team"MAX_INSIGHTS_PER_DASHBOARD = "analytics.max_insights_per_dashboard"+ MAX_WIDGETS_PER_DASHBOARD = "analytics.max_widgets_per_dashboard"MAX_ALERTS_PER_TEAM = "analytics.max_alerts_per_team"MAX_SUBSCRIPTIONS_PER_TEAM = "analytics.max_subscriptions_per_team"MAX_ACTIONS_PER_TEAM = "analytics.max_actions_per_team"@@ -52,6 +53,11 @@ REGISTRY: dict[str, LimitDefinition] = {description="Insight tiles attached to a single dashboard",default=100,),+ LimitKey.MAX_WIDGETS_PER_DASHBOARD: LimitDefinition(+ key=LimitKey.MAX_WIDGETS_PER_DASHBOARD,+ description="Widget tiles attached to a single dashboard",+ default=20,+ ),LimitKey.MAX_ALERTS_PER_TEAM: LimitDefinition(key=LimitKey.MAX_ALERTS_PER_TEAM,description="Alert configurations in a project",diff --git a/posthog/settings/web.py b/posthog/settings/web.pyindex ad0c0b975909..94e20907b8ca 100644--- a/posthog/settings/web.py+++ b/posthog/settings/web.py@@ -508,6 +508,7 @@ SPECTACULAR_SETTINGS = {"AssigneeTypeEnum": ["user", "role"],"FileFormatEnum": ["Parquet", "JSONLines"],"ErrorTrackingIssueOrderByEnum": ["last_seen", "first_seen", "occurrences", "users", "sessions"],+ "ErrorTrackingIssueStatusEnum": ["archived", "active", "resolved", "pending_release", "suppressed", "all"],"OrderByEnum": ["latest", "earliest"],"PropertyGroupTypeEnum": ["cohort", "person", "group"],"ExistenceOperatorEnum": ["is_set", "is_not_set"],diff --git a/products/dashboards/backend/api/dashboard.py b/products/dashboards/backend/api/dashboard.pyindex 1917dd98260b..ac1df60e6493 100644--- a/products/dashboards/backend/api/dashboard.py+++ b/products/dashboards/backend/api/dashboard.py@@ -1,10 +1,14 @@+from __future__ import annotations+import reimport jsonimport uuid+import builtinsfrom collections.abc import AsyncGenerator+from concurrent.futures import ThreadPoolExecutor, as_completedfrom contextlib import nullcontextfrom enum import StrEnum-from typing import Any, Optional, cast+from typing import Any, Optional, TypedDict, castfrom django.conf import settingsfrom django.contrib.postgres.search import TrigramSimilarity, TrigramWordSimilarity@@ -57,11 +61,12 @@ from posthog.helpers.trigram_search import (normalize_search_term,)from posthog.hogql_queries.query_runner import ExecutionMode-from posthog.models.activity_logging.activity_log import Detail, changes_between, log_activity+from posthog.models.activity_logging.activity_log import ActivityScope, Detail, changes_between, log_activityfrom posthog.models.file_system.file_system import create_or_update_file, delete_filefrom posthog.models.quick_filter import QuickFilterfrom posthog.models.signals import model_activity_signal, mutable_receiverfrom posthog.models.tagged_item import TaggedItem+from posthog.models.team import Teamfrom posthog.models.user import Userfrom posthog.rbac.access_control_api_mixin import AccessControlViewSetMixinfrom posthog.rbac.user_access_control import UserAccessControl, UserAccessControlSerializerMixin@@ -76,8 +81,28 @@ from products.dashboards.backend.api.dashboard_ai import generate_refresh_analysfrom products.dashboards.backend.api.dashboard_template_json_schema_parser import (DashboardTemplateCreationJSONSchemaParser,)+from products.dashboards.backend.api.widget_openapi_serializers import ErrorTrackingListWidgetConfigSerializer+from products.dashboards.backend.constants import DASHBOARD_GRID_COLUMN_COUNT, MAX_WIDGETS_BATCH_SIZE+from products.dashboards.backend.feature_flags import dashboard_widgets_enabledfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_tile import ButtonTile, DashboardTile, Text+from products.dashboards.backend.models.dashboard_widget import DashboardWidget+from products.dashboards.backend.widget_access import (+ check_widget_tile_product_access,+ get_widget_api_scope_error,+ get_widget_product_access_error,+)+from products.dashboards.backend.widget_catalog import get_widget_catalog_entries+from products.dashboards.backend.widget_create import prepare_widget_tile_create+from products.dashboards.backend.widget_layouts import (+ collect_dashboard_sm_layouts_for_dashboard,+ stack_widget_layout_at_bottom,+)+from products.dashboards.backend.widget_registry import (+ EXPECTED_WIDGET_TYPES,+ get_widget_registry_entry,+ validate_widget_config,+)from products.mcp_analytics.backend.dashboard_templates import get_mcp_analytics_default_templatefrom products.product_analytics.backend.api.insight import (DashboardTileBasicSerializer,@@ -128,6 +153,43 @@ FILTERS_OVERRIDE_PARAM = make_filters_override_param(subject_label="dashboard")tracer = trace.get_tracer(__name__)+RUN_WIDGETS_QUERY_CONCURRENCY = 4++WIDGET_TYPE_API_HELP = (+ "Widget type identifier. Supported values: "+ + ", ".join(sorted(EXPECTED_WIDGET_TYPES))+ + ". Use dashboard-widget-catalog-list for config_schema_hints per type."+)+++class _RunWidgetQueryWorkItem(TypedDict):+ tile_id: int+ widget_type: str+ query_fn: Any+ config: dict[str, Any]+ user: User | None+++def _run_widget_query(team: Team, work_item: _RunWidgetQueryWorkItem) -> dict[str, Any]:+ tile_id = work_item["tile_id"]+ widget_type = work_item["widget_type"]+ try:+ result = work_item["query_fn"](team, work_item["config"], user=work_item["user"])+ return {+ "tile_id": tile_id,+ "widget_type": widget_type,+ "result": result,+ "error": None,+ }+ except Exception:+ logger.exception("dashboard_run_widgets_failed", tile_id=tile_id, widget_type=widget_type)+ return {+ "tile_id": tile_id,+ "widget_type": widget_type,+ "result": None,+ "error": "Widget query failed. Please try again later.",+ }+def _tile_rects_overlap(rect_a: dict[str, int], rect_b: dict[str, int]) -> bool:return not (@@ -138,7 +200,7 @@ def _tile_rects_overlap(rect_a: dict[str, int], rect_b: dict[str, int]) -> bool:)-def _compact_tile_layouts(tiles: list["DashboardTile"]) -> set[int]:+def _compact_tile_layouts(tiles: list[DashboardTile]) -> set[int]:"""Vertically compact tile layouts in place, mirroring the dashboard grid's defaultreact-grid-layout vertical compaction (gravity up). Each breakpoint is compactedindependently: tiles keep their x/w/h and are pulled up to the lowest free row.@@ -215,7 +277,6 @@ class ReorderLayout(StrEnum):FULL_WIDTH = "full_width"-DASHBOARD_GRID_COLUMN_COUNT = 12DEFAULT_REORDER_TILE_WIDTH = 6DEFAULT_REORDER_TILE_HEIGHT = 5@@ -401,6 +462,108 @@ class DeleteTileRequestSerializer(serializers.Serializer):)+class MoveTileTileSerializer(serializers.Serializer):+ id = serializers.IntegerField(help_text="Dashboard tile ID to move.")+++class MoveTileRequestSerializer(serializers.Serializer):+ to_dashboard = serializers.IntegerField(help_text="Destination dashboard ID.")+ tile = MoveTileTileSerializer(help_text="Tile to move, identified by its dashboard tile ID.")+++class DashboardWidgetCoreRequestSerializer(serializers.Serializer):+ widget_type = serializers.CharField(+ max_length=64,+ help_text=WIDGET_TYPE_API_HELP,+ )+ config = ErrorTrackingListWidgetConfigSerializer(+ required=False,+ help_text=(+ "Widget-specific configuration. Shape depends on widget_type; "+ "see dashboard-widget-catalog-list for other types. "+ f"For error_tracking_list, use the schema below (currently the only supported type: "+ f"{', '.join(sorted(EXPECTED_WIDGET_TYPES))})."+ ),+ )+ name = serializers.CharField(+ max_length=400,+ required=False,+ allow_null=True,+ allow_blank=True,+ help_text="Optional custom display name for the widget tile.",+ )+ description = serializers.CharField(+ required=False,+ allow_blank=True,+ help_text="Optional markdown description shown when show_description is enabled.",+ )+++class AddDashboardWidgetRequestSerializer(DashboardWidgetCoreRequestSerializer):+ config = ErrorTrackingListWidgetConfigSerializer(+ help_text=(+ "Widget-specific configuration. Shape depends on widget_type; "+ "see dashboard-widget-catalog-list for other types. "+ f"For error_tracking_list, use the schema below (currently the only supported type: "+ f"{', '.join(sorted(EXPECTED_WIDGET_TYPES))})."+ ),+ )+ layouts = TileLayoutsSerializer(+ required=False,+ help_text="Optional react-grid-layout positions keyed by breakpoint (sm, xs).",+ )+ show_description = serializers.BooleanField(+ required=False,+ help_text="Whether to show the description on the dashboard tile.",+ )+++class DashboardPatchWidgetSerializer(DashboardWidgetCoreRequestSerializer):+ widget_type = serializers.CharField(+ max_length=64,+ required=False,+ help_text=WIDGET_TYPE_API_HELP,+ )+ id = serializers.UUIDField(+ required=False,+ help_text="Existing widget row ID when updating a widget tile via dashboard PATCH.",+ )+++class AddDashboardWidgetsBatchRequestSerializer(serializers.Serializer):+ widgets = serializers.ListField(+ child=AddDashboardWidgetRequestSerializer(),+ min_length=1,+ max_length=MAX_WIDGETS_BATCH_SIZE,+ help_text=(+ f"Widget tiles to add atomically (1–{MAX_WIDGETS_BATCH_SIZE}). Use a single-element list to add one widget."+ ),+ )+++class WidgetCatalogEntrySerializer(serializers.Serializer):+ widget_type = serializers.CharField(help_text="Stable widget type identifier used in API requests.")+ group_id = serializers.CharField(help_text="Product area key for grouping related widget variants.")+ group_label = serializers.CharField(help_text="Human-readable product area label.")+ label = serializers.CharField(help_text="Widget variant label within the product area.") # type: ignore[assignment]+ description = serializers.CharField(help_text="Short description of what the widget shows.")+ config_schema_hints = serializers.JSONField(+ help_text="JSON schema hints for config fields (types, choices, bounds). Not a strict validator.",+ )+ required_product_access = serializers.CharField(+ required=False,+ allow_null=True,+ help_text="Product access resource required to view or run this widget, if any.",+ )+++class WidgetCatalogResponseSerializer(serializers.Serializer):+ results = WidgetCatalogEntrySerializer(+ many=True,+ help_text="Registered dashboard widget types available when dashboard-widgets is enabled.",+ )++class CanEditDashboard(BasePermission):message = "You don't have edit permissions for this dashboard."@@ -483,11 +646,43 @@ class ButtonTileSerializer(serializers.ModelSerializer):return value+class DashboardWidgetSerializer(serializers.ModelSerializer):+ created_by = UserBasicSerializer(read_only=True)+ last_modified_by = UserBasicSerializer(read_only=True)+ widget_type = serializers.CharField(+ max_length=64,+ help_text="Widget type identifier from the dashboard widget catalog.",+ )+ name = serializers.CharField(+ max_length=400,+ required=False,+ allow_null=True,+ allow_blank=True,+ help_text="Optional custom display name for this widget tile. Falls back to the widget catalog label when unset.",+ )+ description = serializers.CharField(+ required=False,+ allow_blank=True,+ help_text="Optional markdown description shown on the dashboard tile when enabled.",+ )+ config = ErrorTrackingListWidgetConfigSerializer(+ required=False,+ help_text="Widget-specific configuration JSON for this widget type.",+ )+ dashboard_tiles = DashboardTileBasicSerializer(many=True, read_only=True)++ class Meta:+ model = DashboardWidget+ fields = "__all__"+ read_only_fields = ["id", "created_by", "last_modified_by", "last_modified_at"]++class DashboardTileSerializer(serializers.ModelSerializer):id: serializers.IntegerField = serializers.IntegerField(required=False)insight = InsightSerializer()text = TextSerializer()button_tile = ButtonTileSerializer()+ widget = DashboardWidgetSerializer(required=False, allow_null=True)class Meta:model = DashboardTile@@ -509,6 +704,9 @@ class DashboardTileSerializer(serializers.ModelSerializer):def to_representation(self, instance: DashboardTile):representation = super().to_representation(instance)+ if self.context.get("is_shared") and representation.get("widget"):+ representation["widget"] = None+representation["order"] = self.context.get("order", None)insight_representation = representation["insight"] or {} # May be missing for text tiles@@ -556,6 +754,36 @@ class RunInsightsResponseSerializer(serializers.Serializer):)+class DashboardWidgetRunResultSerializer(serializers.Serializer):+ tile_id = serializers.IntegerField(help_text="Dashboard tile ID for this widget result.")+ widget_type = serializers.CharField(+ allow_null=True,+ help_text="Widget type identifier, or null when the tile was not found.",+ )+ result = serializers.JSONField(+ allow_null=True,+ help_text="Live widget query result payload.",+ )+ error = serializers.CharField(+ allow_null=True,+ help_text="Error message when the widget could not be run.",+ )+++class RunWidgetsResponseSerializer(serializers.Serializer):+ results = DashboardWidgetRunResultSerializer(+ many=True,+ help_text="Per-tile widget run results.",+ )+++class AddDashboardWidgetsBatchResponseSerializer(serializers.Serializer):+ tiles = DashboardTileSerializer(+ many=True,+ help_text="Created dashboard widget tiles in request order.",+ )++class DashboardBasicSerializer(TaggedItemSerializerMixin,serializers.ModelSerializer,@@ -689,6 +917,44 @@ class DashboardMetadataSerializer(DashboardBasicSerializer):return normalized+def _count_active_widget_tiles(dashboard: Dashboard) -> int:+ return dashboard.tiles.filter(widget_id__isnull=False).exclude(deleted=True).count()+++def _check_dashboard_widget_count_limit(*, dashboard: Dashboard, user: User) -> None:+ check_count_limit(+ team=dashboard.team,+ key=LimitKey.MAX_WIDGETS_PER_DASHBOARD,+ current_count=_count_active_widget_tiles(dashboard),+ user=user,+ )+++def _report_dashboard_tile_added(+ *,+ user: User,+ dashboard: Dashboard,+ tile_type: str,+ request: Request | None = None,+ widget_type: str | None = None,+) -> None:+ properties: dict[str, Any] = {+ "tile_type": tile_type,+ "insight_type": None,+ "dashboard_id": dashboard.id,+ }+ if widget_type is not None:+ properties["widget_type"] = widget_type++ report_user_action(+ user,+ "dashboard tile added",+ properties,+ team=dashboard.team,+ request=request,+ )++class DashboardSerializer(DashboardMetadataSerializer):tiles = serializers.SerializerMethodField()use_template = serializers.CharField(@@ -790,7 +1056,12 @@ class DashboardSerializer(DashboardMetadataSerializer):if use_template:try:- create_dashboard_from_template(use_template, dashboard)+ create_dashboard_from_template(+ use_template,+ dashboard,+ cast(User, request.user),+ user_access_control=UserAccessControl(user=cast(User, request.user), team=team),+ )except AttributeError as error:logger.error("dashboard_create.create_from_template_failed",@@ -805,10 +1076,12 @@ class DashboardSerializer(DashboardMetadataSerializer):existing_tiles = (DashboardTile.objects.filter(dashboard=existing_dashboard).exclude(deleted=True)- .select_related("insight")+ .select_related("insight", "text", "button_tile", "widget"))+ duplicate_tiles = self.initial_data.get("duplicate_tiles", False)for existing_tile in existing_tiles:- if self.initial_data.get("duplicate_tiles", False):+ # Widget tiles move with their widget row; other tiles re-link shared insight/text/button rows.+ if duplicate_tiles or existing_tile.widget_id is not None:self._deep_duplicate_tiles(dashboard, existing_tile)else:existing_tile.copy_to_dashboard(dashboard)@@ -900,6 +1173,60 @@ class DashboardSerializer(DashboardMetadataSerializer):show_description=existing_tile.show_description,transparent_background=existing_tile.transparent_background,)+ elif existing_tile.widget:+ request = self.context["request"]+ DashboardSerializer._clone_widget_tile_to_dashboard(+ existing_tile,+ dashboard,+ cast(User, request.user),+ )++ @staticmethod+ def _clone_widget_tile_to_dashboard(+ source_tile: DashboardTile,+ destination: Dashboard,+ user: User,+ *,+ append_copy_suffix: bool = True,+ ) -> DashboardTile:+ if source_tile.widget is None:+ raise serializers.ValidationError("Tile is not a widget tile.")++ _check_dashboard_widget_count_limit(dashboard=destination, user=user)++ widget_name = source_tile.widget.name+ duplicate_name: str | None+ if append_copy_suffix and widget_name:+ duplicate_name = f"{widget_name} (Copy)"+ else:+ duplicate_name = widget_name++ widget = DashboardWidget.objects.create(+ team_id=destination.team_id,+ widget_type=source_tile.widget.widget_type,+ name=duplicate_name,+ description=source_tile.widget.description,+ config=source_tile.widget.config,+ created_by=user,+ last_modified_by=user,+ )+ return DashboardTile.objects.create(+ dashboard=destination,+ team_id=destination.team_id,+ widget=widget,+ layouts=source_tile.layouts,+ color=source_tile.color,+ filters_overrides=source_tile.filters_overrides,+ show_description=source_tile.show_description,+ transparent_background=source_tile.transparent_background,+ )++ @staticmethod+ def _check_widget_tile_product_access(+ widget: DashboardWidget,+ user_access_control: UserAccessControl,+ ) -> None:+ check_widget_tile_product_access(widget, user_access_control)@monitor(feature=Feature.DASHBOARD, endpoint="dashboard", method="PATCH")def update(self, instance: Dashboard, validated_data: dict, *args: Any, **kwargs: Any) -> Dashboard:@@ -948,21 +1275,18 @@ class DashboardSerializer(DashboardMetadataSerializer):user = cast(User, self.context["request"].user)tiles = initial_data.pop("tiles", [])for tile_data in tiles:- tile_type, created = self._update_tiles(instance, tile_data, user)+ tile, created = self._update_tiles(instance, tile_data, user)# Text and button tiles are always added via PATCH (never during initial dashboard# creation), so this update() method is the right place to fire the "tile added"# event. The `created` flag from update_or_create ensures we only fire on first# insertion, not on subsequent edits to an existing tile.- if created and tile_type and "request" in self.context:- report_user_action(- user,- "dashboard tile added",- {- "tile_type": tile_type,- "insight_type": None,- "dashboard_id": instance.id,- },- team=instance.team,+ if created and tile is not None and "request" in self.context:+ tile_type, widget_type = DashboardSerializer._tile_added_analytics_fields(tile)+ _report_dashboard_tile_added(+ user=user,+ dashboard=instance,+ tile_type=tile_type,+ widget_type=widget_type,request=self.context["request"],)@@ -1001,6 +1325,50 @@ class DashboardSerializer(DashboardMetadataSerializer):def _extract_display_defaults(tile_data: dict) -> dict:return {k: tile_data[k] for k in DashboardSerializer.TILE_DISPLAY_FIELDS if k in tile_data}+ @staticmethod+ def _widget_tile_validation_error(exc: serializers.ValidationError) -> serializers.ValidationError:+ detail = exc.detail+ if isinstance(detail, dict) and "widget" in detail and len(detail) == 1:+ return exc+ if isinstance(detail, dict):+ if "widget_type" in detail:+ return serializers.ValidationError({"widget": detail["widget_type"]})+ if "config" in detail:+ return serializers.ValidationError({"widget": detail["config"]})+ return serializers.ValidationError({"widget": detail})++ @staticmethod+ def _validated_patch_widget_payload(widget_json: dict[str, Any]) -> dict[str, Any]:+ allowed_keys = ("id", "widget_type", "config", "name", "description")+ payload = {key: widget_json[key] for key in allowed_keys if key in widget_json}+ serializer = DashboardPatchWidgetSerializer(data=payload)+ if not serializer.is_valid():+ raise serializers.ValidationError({"widget": serializer.errors})+ return cast(dict[str, Any], serializer.validated_data)++ @staticmethod+ def _apply_patch_widget_update(+ *,+ widget: DashboardWidget,+ widget_data: dict[str, Any],+ user: User,+ user_access_control: UserAccessControl,+ ) -> None:+ DashboardSerializer._check_widget_tile_product_access(widget, user_access_control)+ patch_widget_type = widget_data.get("widget_type")+ if patch_widget_type is not None and str(patch_widget_type) != widget.widget_type:+ raise serializers.ValidationError({"widget": "widget_type cannot be changed."})++ if "config" in widget_data:+ widget.config = validate_widget_config(widget.widget_type, widget_data["config"])+ if "name" in widget_data:+ widget.name = widget_data["name"] or None+ if "description" in widget_data:+ widget.description = widget_data["description"]+ widget.last_modified_by = user+ widget.last_modified_at = now()+ widget.save()+@staticmethoddef _upsert_tile(instance: Dashboard, tile_data: dict, **extra_defaults: Any) -> tuple[DashboardTile, bool]:tile_defaults = DashboardSerializer._extract_display_defaults(tile_data)@@ -1049,8 +1417,21 @@ class DashboardSerializer(DashboardMetadataSerializer):existing.save(update_fields=list(tile_defaults.keys()))@staticmethod- def _update_tiles(instance: Dashboard, tile_data: dict, user: User) -> tuple[str | None, bool]:- """Returns (tile_type, created) for new tile creation, or (None, False) for updates."""+ def _tile_added_analytics_fields(tile: DashboardTile) -> tuple[str, str | None]:+ if tile.text_id is not None:+ return "text", None+ if tile.button_tile_id is not None:+ return "button", None+ if tile.widget_id is not None:+ widget_type = tile.widget.widget_type if tile.widget is not None else None+ return "widget", widget_type+ if tile.insight_id is not None:+ return "insight", None+ raise ValueError("Dashboard tile has no related content for analytics")++ @staticmethod+ def _update_tiles(instance: Dashboard, tile_data: dict, user: User) -> tuple[DashboardTile | None, bool]:+ """Returns the upserted tile and whether it was newly created, or (None, False) for display-only updates."""tile_data.pop("is_cached", None) # read only fieldtile_data.pop("order", None) # read only field@@ -1093,8 +1474,8 @@ class DashboardSerializer(DashboardMetadataSerializer):raise serializers.ValidationError({"text": "Text tile not found in this team."})else:text = Text.objects.create(**validated_data)- _, created = DashboardSerializer._upsert_tile(instance, tile_data, text=text)- return "text", created+ tile, created = DashboardSerializer._upsert_tile(instance, tile_data, text=text)+ return tile, createdelif tile_data.get("button_tile", None):button_tile_json: dict = tile_data.get("button_tile", {})created_by_json = button_tile_json.get("created_by", None)@@ -1134,8 +1515,55 @@ class DashboardSerializer(DashboardMetadataSerializer):raise serializers.ValidationError({"button_tile": "Button tile not found in this team."})else:button_tile = ButtonTile.objects.create(**validated_data)- _, created = DashboardSerializer._upsert_tile(instance, tile_data, button_tile=button_tile)- return "button", created+ tile, created = DashboardSerializer._upsert_tile(instance, tile_data, button_tile=button_tile)+ return tile, created+ elif tile_data.get("widget", None):+ widget_json: dict = tile_data.get("widget", {})+ widget_data = DashboardSerializer._validated_patch_widget_payload(widget_json)++ if not dashboard_widgets_enabled(instance.team_id):+ raise serializers.ValidationError({"widget": "Dashboard widgets are not enabled for this project."})++ user_access_control = UserAccessControl(user=user, team=instance.team)+ existing_widget_id = widget_data.get("id")++ if existing_widget_id:+ try:+ widget = DashboardWidget.objects.get(id=existing_widget_id, team_id=instance.team_id)+ if not DashboardTile.objects.filter(dashboard=instance, widget_id=existing_widget_id).exists():+ raise serializers.ValidationError({"widget": "Widget tile not found."})+ DashboardSerializer._apply_patch_widget_update(+ widget=widget,+ widget_data=widget_data,+ user=user,+ user_access_control=user_access_control,+ )+ except DashboardWidget.DoesNotExist:+ raise serializers.ValidationError({"widget": "Widget not found in this team."})+ else:+ try:+ canonical_widget_type, config = prepare_widget_tile_create(+ team_id=instance.team_id,+ widget_type=str(widget_data["widget_type"]),+ config=widget_data.get("config", {}),+ user_access_control=user_access_control,+ )+ except serializers.ValidationError as exc:+ raise DashboardSerializer._widget_tile_validation_error(exc) from exc++ _check_dashboard_widget_count_limit(dashboard=instance, user=user)++ widget = DashboardWidget.objects.create(+ team_id=instance.team_id,+ widget_type=canonical_widget_type,+ name=widget_data.get("name") or None,+ description=widget_data.get("description", ""),+ config=config,+ created_by=user,+ last_modified_by=user,+ )+ tile, created = DashboardSerializer._upsert_tile(instance, tile_data, widget=widget)+ return tile, createdelif ("deleted" in tile_dataor "color" in tile_data@@ -1746,27 +2174,40 @@ class DashboardsViewSet(return layout_size- @action(methods=["PATCH"], detail=True)+ @extend_schema(request=MoveTileRequestSerializer, responses={200: DashboardSerializer})+ @action(methods=["PATCH"], detail=True, required_scopes=["dashboard:write"])def move_tile(self, request: Request, *args: Any, **kwargs: Any) -> Response:# TODO could things be rearranged so this is PATCH call on a resource and not a custom endpoint?from_dashboard = self.get_object()- to_dashboard = request.data["toDashboard"]+ move_serializer = MoveTileRequestSerializer(data=request.data)+ move_serializer.is_valid(raise_exception=True)+ to_dashboard = move_serializer.validated_data["to_dashboard"]+ tile_id = move_serializer.validated_data["tile"]["id"]tile = get_object_or_404(- DashboardTile,+ DashboardTile.objects.select_related("widget"),dashboard_id=from_dashboard.pk,- id=request.data["tile"]["id"],+ id=tile_id,dashboard__team__project_id=self.team.project_id,)to_dashboard_obj = get_object_or_404(Dashboard, id=to_dashboard, team__project_id=self.team.project_id)self.check_object_permissions(request, to_dashboard_obj)if not self.user_permissions.dashboard(to_dashboard_obj).can_edit:raise exceptions.PermissionDenied("You don't have edit permissions for the destination dashboard.")+ if tile.widget_id is not None:+ if not dashboard_widgets_enabled(self.team_id):+ raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")+ user_access_control = UserAccessControl(user=cast(User, request.user), team=self.team)+ if tile.widget is None:+ raise exceptions.ValidationError("Widget tile is missing its widget.")+ DashboardSerializer._check_widget_tile_product_access(tile.widget, user_access_control)try:with transaction.atomic():tile.prepare_move_to_dashboard(to_dashboard)tile.dashboard_id = to_dashboard- tile.save(update_fields=["dashboard_id"])+ # Destination is scoped to the current project; align team_id when moving within it.+ tile.team_id = to_dashboard_obj.team_id+ tile.save(update_fields=["dashboard_id", "team_id"])except DjangoValidationError:logger.exception("validation_error_while_moving_dashboard_tile")raise exceptions.ValidationError("Invalid request data for moving tile.")@@ -1780,7 +2221,7 @@ class DashboardsViewSet(@extend_schema(request=CopyDashboardTileRequestSerializer, responses={200: DashboardSerializer})@action(methods=["POST"], detail=True, required_scopes=["dashboard:write"])def copy_tile(self, request: Request, *args: Any, **kwargs: Any) -> Response:- """Copy an existing dashboard tile to another dashboard (insight or text card; new tile row)."""+ """Copy an existing dashboard tile to another dashboard (insight, text card, or widget tile)."""destination = self.get_object()if destination.deleted:raise exceptions.NotFound()@@ -1799,13 +2240,33 @@ class DashboardsViewSet(raise exceptions.PermissionDenied("You don't have permission to view the source dashboard.")tile = get_object_or_404(- DashboardTile,+ DashboardTile.objects.select_related("widget"),dashboard_id=from_dashboard_id,id=tile_id,dashboard__team__project_id=self.team.project_id,)++ if tile.widget_id is not None:+ if not dashboard_widgets_enabled(self.team_id):+ raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")+ if tile.widget is None:+ raise exceptions.ValidationError("Widget tile is missing its widget.")+ DashboardSerializer._check_widget_tile_product_access(tile.widget, user_access_control)+ try:+ with transaction.atomic():+ DashboardSerializer._clone_widget_tile_to_dashboard(tile, destination, cast(User, request.user))+ except DjangoValidationError:+ logger.warning("validation_error_while_copying_dashboard_tile", exc_info=True)+ raise exceptions.ValidationError("Unable to copy tile due to invalid data.")+ return Response(+ DashboardSerializer(+ get_object_or_404(Dashboard, id=destination.pk, team__project_id=self.team.project_id),+ context=self.get_serializer_context(),+ ).data+ )+if tile.insight is None and tile.text is None:- raise exceptions.ValidationError("Only insight and text tiles can be copied between dashboards.")+ raise exceptions.ValidationError("Only insight, text, and widget tiles can be copied between dashboards.")if tile.insight is not None:if not user_access_control.check_access_level_for_object(tile.insight, "viewer"):@@ -2067,6 +2528,228 @@ class DashboardsViewSet(return Response({"results": tile_results})+ @extend_schema(+ parameters=[+ OpenApiParameter(+ name="tile_ids",+ type=OpenApiTypes.STR,+ location=OpenApiParameter.QUERY,+ required=True,+ description="Comma-separated dashboard tile IDs to run widgets for.",+ ),+ ],+ responses={200: RunWidgetsResponseSerializer},+ )+ @action(methods=["GET"], detail=True, required_scopes=["dashboard:read"])+ def run_widgets(self, request: Request, *args: Any, **kwargs: Any) -> Response:+ if not dashboard_widgets_enabled(self.team_id):+ raise exceptions.PermissionDenied("Dashboard widgets are not enabled for this project.")++ tile_ids_param = request.query_params.get("tile_ids")+ if not tile_ids_param:+ raise exceptions.ValidationError("tile_ids is required.")++ try:+ tile_ids = [int(tile_id.strip()) for tile_id in tile_ids_param.split(",") if tile_id.strip()]+ except ValueError as exc:+ raise exceptions.ValidationError("tile_ids must be a comma-separated list of integers.") from exc++ tile_ids = list(dict.fromkeys(tile_ids))+ if not tile_ids:+ raise exceptions.ValidationError("tile_ids must include at least one tile ID.")+ if len(tile_ids) > MAX_WIDGETS_BATCH_SIZE:+ raise exceptions.ValidationError(f"At most {MAX_WIDGETS_BATCH_SIZE} tile_ids may be requested at once.")++ dashboard = self.get_object()+ user_access_control = UserAccessControl(user=cast(User, request.user), team=self.team)++ tiles_by_id = {+ tile.id: tile+ for tile in DashboardTile.objects.select_related("widget").filter(+ dashboard=dashboard, id__in=tile_ids, widget__isnull=False+ )+ }++ results_by_id: dict[int, dict[str, Any]] = {}+ query_work_items: list[_RunWidgetQueryWorkItem] = []++ for tile_id in tile_ids:+ tile = tiles_by_id.get(tile_id)+ if tile is None or tile.widget is None:+ results_by_id[tile_id] = {+ "tile_id": tile_id,+ "widget_type": None,+ "result": None,+ "error": "Tile not found or is not a widget tile.",+ }+ continue++ widget = tile.widget+ registry_entry = get_widget_registry_entry(widget.widget_type)+ if registry_entry is None:+ results_by_id[tile_id] = {+ "tile_id": tile_id,+ "widget_type": widget.widget_type,+ "result": None,+ "error": f"Unknown widget type: {widget.widget_type}",+ }+ continue++ access_error = get_widget_product_access_error(registry_entry, user_access_control)+ if access_error:+ results_by_id[tile_id] = {+ "tile_id": tile_id,+ "widget_type": widget.widget_type,+ "result": None,+ "error": access_error,+ }+ continue++ scope_error = get_widget_api_scope_error(registry_entry, request)+ if scope_error:+ results_by_id[tile_id] = {+ "tile_id": tile_id,+ "widget_type": widget.widget_type,+ "result": None,+ "error": scope_error,+ }+ continue++ query_work_items.append(+ {+ "tile_id": tile_id,+ "widget_type": widget.widget_type,+ "query_fn": registry_entry["query_fn"],+ "config": widget.config,+ "user": cast(User, request.user),+ }+ )++ if query_work_items:+ max_workers = min(RUN_WIDGETS_QUERY_CONCURRENCY, len(query_work_items))+ with ThreadPoolExecutor(max_workers=max_workers) as executor:+ futures = {+ executor.submit(_run_widget_query, self.team, work_item): work_item["tile_id"]+ for work_item in query_work_items+ }+ for future in as_completed(futures):+ tile_id = futures[future]+ results_by_id[tile_id] = future.result()++ results = [results_by_id[tile_id] for tile_id in tile_ids]++ return Response({"results": results})++ @extend_schema(responses={200: WidgetCatalogResponseSerializer})+ @action(methods=["GET"], detail=False, required_scopes=["dashboard:read"])+ def widget_catalog(self, request: Request, *args: Any, **kwargs: Any) -> Response:+ """List registered dashboard widget types and config hints for agents."""+ return Response({"results": get_widget_catalog_entries()})++ @extend_schema(+ request=AddDashboardWidgetsBatchRequestSerializer,+ responses={201: AddDashboardWidgetsBatchResponseSerializer},+ )+ @action(methods=["POST"], detail=True, url_path="widgets/batch", required_scopes=["dashboard:write"])+ def widgets_batch(self, request: Request, *args: Any, **kwargs: Any) -> Response:+ """Add multiple widget tiles to a dashboard in one atomic request."""+ if not dashboard_widgets_enabled(self.team_id):+ raise exceptions.ValidationError("Dashboard widgets are not enabled for this project.")++ dashboard = self.get_object()+ if dashboard.deleted:+ raise exceptions.NotFound()++ serializer = AddDashboardWidgetsBatchRequestSerializer(data=request.data)+ serializer.is_valid(raise_exception=True)+ widget_payloads = cast(builtins.list[dict[str, Any]], serializer.validated_data["widgets"])++ user = cast(User, request.user)+ user_access_control = UserAccessControl(user=user, team=self.team)+ tile_context = {**self.get_serializer_context(), "dashboard": dashboard}++ with transaction.atomic():+ existing_sm_layouts = collect_dashboard_sm_layouts_for_dashboard(dashboard)+ pending_sm_layouts: builtins.list[dict[str, Any]] = []+ tiles: builtins.list[DashboardTile] = []++ for payload in widget_payloads:+ tile = self._create_widget_tile_from_payload(+ dashboard=dashboard,+ user=user,+ user_access_control=user_access_control,+ payload=payload,+ existing_sm_layouts=existing_sm_layouts,+ pending_sm_layouts=pending_sm_layouts,+ )+ tiles.append(tile)+ sm_layout = tile.layouts.get("sm") if isinstance(tile.layouts, dict) else None+ if isinstance(sm_layout, dict):+ pending_sm_layouts.append(sm_layout)++ for tile in tiles:+ assert tile.widget is not None+ _report_dashboard_tile_added(+ user=user,+ dashboard=dashboard,+ tile_type="widget",+ widget_type=tile.widget.widget_type,+ request=request,+ )++ return Response(+ {"tiles": DashboardTileSerializer(tiles, context=tile_context, many=True).data},+ status=status.HTTP_201_CREATED,+ )++ def _create_widget_tile_from_payload(+ self,+ *,+ dashboard: Dashboard,+ user: User,+ user_access_control: UserAccessControl,+ payload: dict[str, Any],+ existing_sm_layouts: builtins.list[dict[str, Any]] | None = None,+ pending_sm_layouts: builtins.list[dict[str, Any]] | None = None,+ ) -> DashboardTile:+ widget_type = payload["widget_type"]+ config = payload["config"]+ normalized_widget_type, validated_config = prepare_widget_tile_create(+ team_id=self.team_id,+ widget_type=widget_type,+ config=config,+ user_access_control=user_access_control,+ )+ _check_dashboard_widget_count_limit(dashboard=dashboard, user=user)+ layouts = payload.get("layouts")+ if layouts is None:+ layouts = stack_widget_layout_at_bottom(+ widget_type=normalized_widget_type,+ existing_sm_layouts=existing_sm_layouts or [],+ pending_sm_layouts=pending_sm_layouts,+ )+ tile_defaults: dict[str, Any] = {+ "layouts": layouts,+ }+ if "show_description" in payload:+ tile_defaults["show_description"] = payload["show_description"]++ widget = DashboardWidget.objects.create(+ team_id=self.team_id,+ widget_type=normalized_widget_type,+ name=payload.get("name") or None,+ description=payload.get("description", ""),+ config=validated_config,+ created_by=user,+ last_modified_by=user,+ )+ return DashboardTile.objects.create(+ dashboard=dashboard,+ team_id=dashboard.team_id,+ widget=widget,+ **tile_defaults,+ )+def _format_insight_for_llm(self, insight: Insight, insight_data: dict) -> str | None:if not settings.EE_AVAILABLE:return None@@ -2100,7 +2783,12 @@ class DashboardsViewSet(try:dashboard_template = dashboard_template_from_creation_payload(request.data["template"])creation_context = request.data.get("creation_context")- create_from_template(dashboard, dashboard_template, cast(User, request.user))+ create_from_template(+ dashboard,+ dashboard_template,+ cast(User, request.user),+ user_access_control=UserAccessControl(user=cast(User, request.user), team=self.team),+ )template_body = request.data["template"]raw_scope = template_body.get("scope")@@ -2181,7 +2869,12 @@ class DashboardsViewSet(creation_mode="unlisted",)- create_from_template(dashboard, template, cast(User, request.user))+ create_from_template(+ dashboard,+ template,+ cast(User, request.user),+ user_access_control=UserAccessControl(user=cast(User, request.user), team=self.team),+ )return Response(DashboardSerializer(dashboard, context=self.get_serializer_context()).data,@@ -2202,6 +2895,36 @@ class LegacyInsightViewSet(InsightViewSet):param_derived_from_user_current_team = "project_id"+@mutable_receiver(model_activity_signal, sender=DashboardWidget)+def handle_dashboard_widget_change(+ sender: Any,+ scope: str,+ before_update: DashboardWidget | None,+ after_update: DashboardWidget | None,+ activity: str,+ user: User | None,+ was_impersonated: bool = False,+ **kwargs: Any,+) -> None:+ instance = after_update or before_update+ if instance is None:+ return+ organization_id = Team.objects.values_list("organization_id", flat=True).filter(pk=instance.team_id).first()+ log_activity(+ organization_id=organization_id,+ team_id=instance.team_id,+ user=user,+ was_impersonated=was_impersonated,+ item_id=instance.id,+ scope=scope,+ activity=activity,+ detail=Detail(+ changes=changes_between(cast(ActivityScope, scope), previous=before_update, current=after_update),+ name=instance.name or instance.widget_type,+ ),+ )++@mutable_receiver(model_activity_signal, sender=Dashboard)def handle_dashboard_change(sender, scope, before_update, after_update, activity, user, was_impersonated=False, **kwargsdiff --git a/products/dashboards/backend/api/test/test_dashboard_widgets.py b/products/dashboards/backend/api/test/test_dashboard_widgets.pynew file mode 100644index 000000000000..f9ef578f2f82--- /dev/null+++ b/products/dashboards/backend/api/test/test_dashboard_widgets.py@@ -0,0 +1,831 @@+from typing import Any++from freezegun import freeze_time+from posthog.test.base import APIBaseTest+from unittest.mock import ANY, patch++from django.test import override_settings++from rest_framework import status++from posthog.api.test.dashboards import DashboardAPI+from posthog.models.activity_logging.activity_log import ActivityLog+from posthog.models.team import Team+from posthog.rbac.user_access_control import AccessControlLevel, UserAccessControl+from posthog.scopes import APIScopeObject++from products.dashboards.backend.api.dashboard import DashboardTileSerializer+from products.dashboards.backend.models.dashboard import Dashboard+from products.dashboards.backend.models.dashboard_templates import DashboardTemplate+from products.dashboards.backend.models.dashboard_tile import DashboardTile+from products.dashboards.backend.models.dashboard_widget import DashboardWidget+++class TestDashboardWidgets(APIBaseTest):+ _WIDGETS_FLAG_PATCH_TARGETS = (+ "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",+ "products.dashboards.backend.widget_create.dashboard_widgets_enabled",+ )++ def setUp(self) -> None:+ super().setUp()+ self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)+ self._widgets_flag_patchers = [patch(target, return_value=True) for target in self._WIDGETS_FLAG_PATCH_TARGETS]+ for patcher in self._widgets_flag_patchers:+ patcher.start()++ def tearDown(self) -> None:+ for patcher in self._widgets_flag_patchers:+ patcher.stop()+ super().tearDown()++ def _stop_widgets_flag_patchers(self) -> None:+ for patcher in self._widgets_flag_patchers:+ patcher.stop()++ def _start_widgets_flag_patchers(self) -> None:+ for patcher in self._widgets_flag_patchers:+ patcher.start()++ @freeze_time("2022-04-01 12:45")+ @override_settings(IN_UNIT_TESTING=True)+ def test_can_create_widget_tile(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id,+ widget_type="error_tracking_list",+ config={"limit": 10},+ )++ assert len(dashboard_json["tiles"]) == 1+ tile = dashboard_json["tiles"][0]+ assert tile["widget"]["widget_type"] == "error_tracking_list"+ assert tile["widget"]["config"]["limit"] == 10+ assert tile["widget"]["created_by"]["id"] == self.user.id+ assert tile["insight"] is None+ assert tile["text"] is None+ assert tile["button_tile"] is None++ @override_settings(IN_UNIT_TESTING=True)+ def test_can_create_widget_tile_with_catalog_default_config(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id,+ config={"limit": 10, "dateRange": {"date_from": "-7d"}},+ )++ tile = dashboard_json["tiles"][0]+ assert tile["widget"]["config"]["dateRange"] == {"date_from": "-7d"}++ @override_settings(IN_UNIT_TESTING=True)+ def test_can_update_widget_tile_config(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id, config={"limit": 5, "orderBy": "last_seen"}+ )++ tile = dashboard_json["tiles"][0]+ tile["widget"]["config"] = {"limit": 15, "orderBy": "occurrences"}++ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )+ assert response.status_code == status.HTTP_200_OK++ updated_tile = response.json()["tiles"][0]+ assert updated_tile["widget"]["config"]["limit"] == 15+ assert updated_tile["widget"]["config"]["orderBy"] == "occurrences"+ assert updated_tile["widget"]["id"] == tile["widget"]["id"]++ @override_settings(IN_UNIT_TESTING=True)+ def test_can_update_widget_tile_name_and_description(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)++ tile = dashboard_json["tiles"][0]+ tile["widget"]["name"] = "My top errors"+ tile["widget"]["description"] = "Worst issues this week"+ tile["show_description"] = True++ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )+ assert response.status_code == status.HTTP_200_OK++ updated_tile = response.json()["tiles"][0]+ assert updated_tile["widget"]["name"] == "My top errors"+ assert updated_tile["widget"]["description"] == "Worst issues this week"+ assert updated_tile["show_description"] is True++ @override_settings(IN_UNIT_TESTING=True)+ def test_dashboard_patch_widget_update_without_config_preserves_config(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id, config={"limit": 5, "orderBy": "last_seen"}+ )++ tile = dashboard_json["tiles"][0]+ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [{"id": tile["id"], "widget": {"id": tile["widget"]["id"], "name": "Renamed"}}]},+ )+ assert response.status_code == status.HTTP_200_OK++ updated_tile = response.json()["tiles"][0]+ assert updated_tile["widget"]["name"] == "Renamed"+ assert updated_tile["widget"]["config"]["limit"] == 5+ assert updated_tile["widget"]["config"]["orderBy"] == "last_seen"++ @override_settings(IN_UNIT_TESTING=True)+ def test_duplicate_dashboard_copies_widget_name_with_suffix(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)+ tile = dashboard_json["tiles"][0]+ tile["widget"]["name"] = "Custom widget title"+ self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )++ _, duplicated = self.dashboard_api.create_dashboard(+ {"name": "copy", "use_dashboard": dashboard_id, "duplicate_tiles": True}+ )++ assert duplicated["tiles"][0]["widget"]["name"] == "Custom widget title (Copy)"++ @override_settings(IN_UNIT_TESTING=True)+ def test_cannot_patch_widget_from_another_team(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)++ other_team = Team.objects.create(+ organization=self.organization,+ name="other team",+ api_token="other-token",+ )+ other_dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "other"}, team_id=other_team.id)++ foreign_widget_id = dashboard_json["tiles"][0]["widget"]["id"]+ response = self.client.patch(+ f"/api/projects/{other_team.id}/dashboards/{other_dashboard_id}",+ {+ "tiles": [+ {+ "widget": {+ "id": foreign_widget_id,+ "widget_type": "error_tracking_list",+ "config": {"limit": 10},+ }+ }+ ]+ },+ )+ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert response.json()["attr"] == "widget"++ @override_settings(IN_UNIT_TESTING=True)+ def test_patch_widget_denies_without_product_access(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile = dashboard_json["tiles"][0]+ tile["widget"]["config"] = {"limit": 12}++ real_check = UserAccessControl.check_access_level_for_resource++ def deny_error_tracking_only(+ user_access_control: UserAccessControl,+ resource: APIScopeObject,+ required_level: AccessControlLevel = "viewer",+ ) -> bool:+ if resource == "error_tracking":+ return False+ return real_check(user_access_control, resource, required_level)++ with patch.object(+ UserAccessControl,+ "check_access_level_for_resource",+ autospec=True,+ side_effect=deny_error_tracking_only,+ ):+ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )++ assert response.status_code == status.HTTP_403_FORBIDDEN+ assert response.json()["detail"] == "You do not have access to error tracking."++ @override_settings(IN_UNIT_TESTING=True)+ def test_cannot_change_widget_type_via_dashboard_patch(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile = dashboard_json["tiles"][0]+ tile["widget"]["widget_type"] = "not_a_real_widget_type"++ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )++ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert response.json()["attr"] == "widget"+ assert "widget_type cannot be changed" in response.json()["detail"]++ @override_settings(IN_UNIT_TESTING=True)+ def test_rejects_widget_update_via_dashboard_patch_when_feature_flag_disabled(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile = dashboard_json["tiles"][0]+ tile["widget"]["config"] = {"limit": 12}++ self._stop_widgets_flag_patchers()+ try:+ with patch(+ "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",+ return_value=False,+ ):+ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )+ finally:+ self._start_widgets_flag_patchers()++ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert response.json()["attr"] == "widget"+ assert "not enabled" in response.json()["detail"].lower()++ @override_settings(IN_UNIT_TESTING=True)+ def test_duplicate_dashboard_without_deep_clone_still_clones_widgets(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 7})+ original_widget = dashboard_json["tiles"][0]["widget"]++ _, duplicated = self.dashboard_api.create_dashboard(+ {"name": "copy", "use_dashboard": dashboard_id, "duplicate_tiles": False}+ )++ assert len(duplicated["tiles"]) == 1+ assert duplicated["tiles"][0]["widget"]["config"] == original_widget["config"]+ assert duplicated["tiles"][0]["widget"]["id"] != original_widget["id"]++ @override_settings(IN_UNIT_TESTING=True)+ def test_duplicate_dashboard_preserves_widget_layout(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)+ tile = dashboard_json["tiles"][0]+ tile_layout = {"sm": {"x": 0, "y": 2, "w": 6, "h": 4}}+ tile["layouts"] = tile_layout+ self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )++ _, duplicated = self.dashboard_api.create_dashboard(+ {"name": "copy", "use_dashboard": dashboard_id, "duplicate_tiles": True}+ )++ assert duplicated["tiles"][0]["layouts"] == tile_layout++ @override_settings(IN_UNIT_TESTING=True)+ def test_duplicate_dashboard_skips_soft_deleted_widget_tiles(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)+ tile = dashboard_json["tiles"][0]+ self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [{"id": tile["id"], "deleted": True}]},+ )++ _, duplicated = self.dashboard_api.create_dashboard(+ {"name": "copy", "use_dashboard": dashboard_id, "duplicate_tiles": True}+ )++ assert duplicated["tiles"] == []++ @override_settings(IN_UNIT_TESTING=True)+ def test_duplicate_dashboard_writes_widget_activity_log(self) -> None:+ ActivityLog.objects.filter(team_id=self.team.id, scope="DashboardWidget").delete()++ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ self.dashboard_api.create_widget_tile(dashboard_id)+ create_count = ActivityLog.objects.filter(+ team_id=self.team.id, scope="DashboardWidget", activity="created"+ ).count()++ self.dashboard_api.create_dashboard({"name": "copy", "use_dashboard": dashboard_id, "duplicate_tiles": True})++ duplicate_logs = ActivityLog.objects.filter(team_id=self.team.id, scope="DashboardWidget", activity="created")+ assert duplicate_logs.count() == create_count + 1++ @override_settings(IN_UNIT_TESTING=True)+ def test_duplicate_dashboard_deep_clones_widget(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 7})++ _, duplicated = self.dashboard_api.create_dashboard(+ {"name": "copy", "use_dashboard": dashboard_id, "duplicate_tiles": True}+ )++ assert len(duplicated["tiles"]) == 1+ original = self.dashboard_api.get_dashboard(dashboard_id)+ assert duplicated["tiles"][0]["widget"]["config"] == original["tiles"][0]["widget"]["config"]+ assert duplicated["tiles"][0]["widget"]["id"] != original["tiles"][0]["widget"]["id"]++ @override_settings(IN_UNIT_TESTING=True)+ def test_create_from_template_json_widget_tile(self) -> None:+ template = {+ "template_name": "ET dashboard",+ "dashboard_description": "Errors",+ "dashboard_filters": {},+ "tiles": [+ {+ "type": "WIDGET",+ "widget_type": "error_tracking_list",+ "config": {"limit": 12},+ "layouts": {"sm": {"h": 4, "w": 6, "x": 0, "y": 0}},+ }+ ],+ }+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/create_from_template_json",+ {"template": template},+ )+ assert response.status_code == status.HTTP_200_OK+ dashboard_json = response.json()+ assert len(dashboard_json["tiles"]) == 1+ assert dashboard_json["tiles"][0]["widget"]["widget_type"] == "error_tracking_list"+ assert dashboard_json["tiles"][0]["widget"]["config"]["limit"] == 12++ def _widget_template_payload(self, **overrides: Any) -> dict[str, Any]:+ tile: dict[str, Any] = {+ "type": "WIDGET",+ "widget_type": "error_tracking_list",+ "config": {"limit": 12},+ "layouts": {"sm": {"h": 4, "w": 6, "x": 0, "y": 0}},+ }+ tile.update(overrides)+ return {+ "template_name": "ET dashboard",+ "dashboard_description": "Errors",+ "dashboard_filters": {},+ "tiles": [tile],+ }++ @override_settings(IN_UNIT_TESTING=True)+ def test_create_from_template_json_widget_denies_without_product_access(self) -> None:+ real_check = UserAccessControl.check_access_level_for_resource++ def deny_error_tracking_only(+ user_access_control: UserAccessControl,+ resource: APIScopeObject,+ required_level: AccessControlLevel = "viewer",+ ) -> bool:+ if resource == "error_tracking":+ return False+ return real_check(user_access_control, resource, required_level)++ with patch.object(+ UserAccessControl,+ "check_access_level_for_resource",+ autospec=True,+ side_effect=deny_error_tracking_only,+ ):+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/create_from_template_json",+ {"template": self._widget_template_payload()},+ )++ assert response.status_code == status.HTTP_403_FORBIDDEN+ assert response.json()["detail"] == "You do not have access to error tracking."+ assert Dashboard.objects.filter(team_id=self.team.id, deleted=False).count() == 0++ @override_settings(IN_UNIT_TESTING=True)+ def test_create_dashboard_use_template_widget_denies_without_product_access(self) -> None:+ template_name = "widget-et-use-template"+ DashboardTemplate.objects.create(+ team=self.team,+ template_name=template_name,+ dashboard_description="Errors",+ dashboard_filters={},+ tiles=[self._widget_template_payload()["tiles"][0]],+ )++ real_check = UserAccessControl.check_access_level_for_resource++ def deny_error_tracking_only(+ user_access_control: UserAccessControl,+ resource: APIScopeObject,+ required_level: AccessControlLevel = "viewer",+ ) -> bool:+ if resource == "error_tracking":+ return False+ return real_check(user_access_control, resource, required_level)++ with patch.object(+ UserAccessControl,+ "check_access_level_for_resource",+ autospec=True,+ side_effect=deny_error_tracking_only,+ ):+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/",+ {"name": "ET from template", "use_template": template_name},+ )++ assert response.status_code == status.HTTP_403_FORBIDDEN+ assert response.json()["detail"] == "You do not have access to error tracking."+ assert not DashboardWidget.all_teams.filter(team_id=self.team.id).exists()++ @override_settings(IN_UNIT_TESTING=True)+ def test_create_from_template_json_widget_rejects_when_flag_disabled(self) -> None:+ self._stop_widgets_flag_patchers()+ try:+ with patch(+ "products.dashboards.backend.widget_create.dashboard_widgets_enabled",+ return_value=False,+ ):+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/create_from_template_json",+ {"template": self._widget_template_payload()},+ )+ finally:+ self._start_widgets_flag_patchers()++ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert Dashboard.objects.filter(team_id=self.team.id, deleted=False).count() == 0++ @override_settings(IN_UNIT_TESTING=True)+ def test_create_from_template_json_widget_rejects_unknown_widget_type(self) -> None:+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/create_from_template_json",+ {"template": self._widget_template_payload(widget_type="not_a_real_widget_type")},+ )++ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert Dashboard.objects.filter(team_id=self.team.id, deleted=False).count() == 0++ @override_settings(IN_UNIT_TESTING=True)+ def test_create_from_template_json_widget_rejects_invalid_config(self) -> None:+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/create_from_template_json",+ {"template": self._widget_template_payload(config={"limit": 999})},+ )++ assert response.status_code == status.HTTP_400_BAD_REQUEST+ assert Dashboard.objects.filter(team_id=self.team.id, deleted=False).count() == 0++ @freeze_time("2022-04-01 12:45")+ @override_settings(IN_UNIT_TESTING=True)+ def test_widget_create_and_update_writes_activity_log(self) -> None:+ ActivityLog.objects.filter(team_id=self.team.id, scope="DashboardWidget").delete()++ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)++ create_logs = ActivityLog.objects.filter(team_id=self.team.id, scope="DashboardWidget", activity="created")+ assert create_logs.count() == 1+ create_log = create_logs.first()+ assert create_log is not None+ detail = create_log.detail+ assert detail is not None+ assert detail["name"] == "error_tracking_list"++ tile = dashboard_json["tiles"][0]+ tile["widget"]["config"] = {"limit": 20}+ self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )++ update_logs = ActivityLog.objects.filter(team_id=self.team.id, scope="DashboardWidget", activity="updated")+ assert update_logs.count() == 1++ @override_settings(IN_UNIT_TESTING=True)+ def test_copy_tile_copies_widget_tile(self) -> None:+ source_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ dest_id, _ = self.dashboard_api.create_dashboard({"name": "dest"})+ _, source_json = self.dashboard_api.create_widget_tile(source_id, config={"limit": 7})+ tile = source_json["tiles"][0]+ tile["widget"]["name"] = "Top errors"+ tile["widget"]["description"] = "Weekly summary"+ self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{source_id}",+ {"tiles": [tile]},+ )++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dest_id}/copy_tile",+ {"fromDashboardId": source_id, "tileId": tile["id"]},+ )+ assert response.status_code == status.HTTP_200_OK++ source_dashboard = self.dashboard_api.get_dashboard(source_id)+ dest_dashboard = self.dashboard_api.get_dashboard(dest_id)+ assert len(source_dashboard["tiles"]) == 1+ assert len(dest_dashboard["tiles"]) == 1++ source_widget = source_dashboard["tiles"][0]["widget"]+ dest_widget = dest_dashboard["tiles"][0]["widget"]+ assert dest_widget["id"] != source_widget["id"]+ assert dest_widget["name"] == "Top errors (Copy)"+ assert dest_widget["description"] == "Weekly summary"+ assert dest_widget["config"]["limit"] == 7+ assert dest_dashboard["tiles"][0]["layouts"] == source_dashboard["tiles"][0]["layouts"]++ @override_settings(IN_UNIT_TESTING=True)+ def test_move_tile_moves_widget_tile(self) -> None:+ source_id, _ = self.dashboard_api.create_dashboard({"name": "source"})+ dest_id, _ = self.dashboard_api.create_dashboard({"name": "dest"})+ _, source_json = self.dashboard_api.create_widget_tile(source_id, config={"limit": 9})+ tile = source_json["tiles"][0]+ widget_id = tile["widget"]["id"]++ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{source_id}/move_tile",+ {"to_dashboard": dest_id, "tile": {"id": tile["id"]}},+ )+ assert response.status_code == status.HTTP_200_OK+ assert response.json()["tiles"] == []++ source_dashboard = self.dashboard_api.get_dashboard(source_id)+ dest_dashboard = self.dashboard_api.get_dashboard(dest_id)+ assert len(source_dashboard["tiles"]) == 0+ assert len(dest_dashboard["tiles"]) == 1+ assert dest_dashboard["tiles"][0]["widget"]["id"] == widget_id+ assert dest_dashboard["tiles"][0]["widget"]["config"]["limit"] == 9++ @override_settings(IN_UNIT_TESTING=True)+ def test_widget_catalog_lists_registered_types(self) -> None:+ response = self.client.get(f"/api/projects/{self.team.id}/dashboards/widget_catalog/")+ assert response.status_code == status.HTTP_200_OK++ results = response.json()["results"]+ assert any(entry["widget_type"] == "error_tracking_list" for entry in results)+ error_tracking_list = next(entry for entry in results if entry["widget_type"] == "error_tracking_list")+ assert error_tracking_list["config_schema_hints"]["limit"]["max"] == 25+ assert error_tracking_list["availability_requirements"] == ["exception_autocapture"]++ @override_settings(IN_UNIT_TESTING=True)+ def test_add_widget_via_batch_endpoint(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {+ "widgets": [+ {"widget_type": "error_tracking_list", "config": {"limit": 8}, "name": "Errors"},+ ]+ },+ )+ assert response.status_code == status.HTTP_201_CREATED++ tile = response.json()["tiles"][0]+ assert tile["widget"]["widget_type"] == "error_tracking_list"+ assert tile["widget"]["config"]["limit"] == 8+ assert tile["widget"]["name"] == "Errors"+ assert tile["layouts"]["sm"]["w"] == 6++ @override_settings(IN_UNIT_TESTING=True)+ def test_widgets_batch_endpoint_rejects_legacy_error_tracking_widget_type(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {"widgets": [{"widget_type": "error_tracking", "config": {"limit": 10}}]},+ )+ assert response.status_code == status.HTTP_400_BAD_REQUEST++ @override_settings(IN_UNIT_TESTING=True)+ def test_widgets_batch_endpoint_rejects_unknown_widget_type(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {"widgets": [{"widget_type": "unknown", "config": {}}]},+ )+ assert response.status_code == status.HTTP_400_BAD_REQUEST++ @override_settings(IN_UNIT_TESTING=True)+ def test_widgets_batch_endpoint_requires_feature_flag(self) -> None:+ self._stop_widgets_flag_patchers()+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ try:+ with patch(+ "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",+ return_value=False,+ ):+ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {"widgets": [{"widget_type": "error_tracking_list", "config": {"limit": 5}}]},+ )+ finally:+ self._start_widgets_flag_patchers()++ assert response.status_code == status.HTTP_400_BAD_REQUEST++ @override_settings(IN_UNIT_TESTING=True)+ @patch("products.dashboards.backend.api.dashboard.report_user_action")+ def test_add_widget_tile_via_patch_fires_tile_added_event(self, mock_report_user_action) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ mock_report_user_action.reset_mock()++ self.dashboard_api.create_widget_tile(+ dashboard_id,+ widget_type="error_tracking_list",+ config={"limit": 10},+ )++ mock_report_user_action.assert_any_call(+ self.user,+ "dashboard tile added",+ {+ "tile_type": "widget",+ "insight_type": None,+ "dashboard_id": dashboard_id,+ "widget_type": "error_tracking_list",+ },+ team=ANY,+ request=ANY,+ )++ @override_settings(IN_UNIT_TESTING=True)+ @patch("products.dashboards.backend.api.dashboard.report_user_action")+ def test_add_widget_tile_via_batch_endpoint_fires_tile_added_event(self, mock_report_user_action) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ mock_report_user_action.reset_mock()++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {+ "widgets": [+ {"widget_type": "error_tracking_list", "config": {"limit": 8}, "name": "Errors"},+ ]+ },+ )+ assert response.status_code == status.HTTP_201_CREATED++ mock_report_user_action.assert_any_call(+ self.user,+ "dashboard tile added",+ {+ "tile_type": "widget",+ "insight_type": None,+ "dashboard_id": dashboard_id,+ "widget_type": "error_tracking_list",+ },+ team=ANY,+ request=ANY,+ )++ @override_settings(IN_UNIT_TESTING=True)+ def test_can_batch_create_widget_tiles(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {+ "widgets": [+ {"widget_type": "error_tracking_list", "config": {"limit": 5}, "name": "Errors A"},+ {"widget_type": "error_tracking_list", "config": {"limit": 3}, "name": "Errors B"},+ ]+ },+ )+ assert response.status_code == status.HTTP_201_CREATED++ tiles = response.json()["tiles"]+ assert len(tiles) == 2+ assert tiles[0]["widget"]["widget_type"] == "error_tracking_list"+ assert tiles[1]["widget"]["widget_type"] == "error_tracking_list"+ assert tiles[0]["layouts"]["sm"]["y"] == 0+ assert tiles[0]["layouts"]["sm"]["x"] == 0+ assert tiles[1]["layouts"]["sm"]["y"] == 0+ assert tiles[1]["layouts"]["sm"]["x"] == 6++ @override_settings(IN_UNIT_TESTING=True)+ def test_batch_create_widget_tiles_rejects_empty_list(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {"widgets": []},+ )+ assert response.status_code == status.HTTP_400_BAD_REQUEST++ @override_settings(IN_UNIT_TESTING=True)+ def test_batch_create_widget_tiles_is_atomic(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {+ "widgets": [+ {"widget_type": "error_tracking_list", "config": {"limit": 5}},+ {"widget_type": "unknown_widget", "config": {}},+ ]+ },+ )+ assert response.status_code == status.HTTP_400_BAD_REQUEST++ dashboard = Dashboard.objects.get(id=dashboard_id)+ assert dashboard.tiles.filter(widget__isnull=False).count() == 0++ @override_settings(IN_UNIT_TESTING=True)+ @patch("products.dashboards.backend.api.dashboard.report_user_action")+ def test_update_widget_tile_does_not_fire_tile_added_event(self, mock_report_user_action) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 5})+ mock_report_user_action.reset_mock()++ tile = dashboard_json["tiles"][0]+ tile["widget"]["config"] = {"limit": 15}++ response = self.client.patch(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}",+ {"tiles": [tile]},+ )+ assert response.status_code == status.HTTP_200_OK++ for call in mock_report_user_action.call_args_list:+ assert call[0][1] != "dashboard tile added"++ @override_settings(IN_UNIT_TESTING=True)+ @patch("posthog.resource_limits.evaluator.report_user_action")+ def test_widget_tile_creation_does_not_emit_limit_hit_below_threshold(self, mock_report_user_action) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {"widgets": [{"widget_type": "error_tracking_list", "config": {"limit": 8}}]},+ )+ assert response.status_code == status.HTTP_201_CREATED++ limit_calls = [call for call in mock_report_user_action.call_args_list if call[0][1] == "resource limit hit"]+ assert limit_calls == []++ @override_settings(IN_UNIT_TESTING=True)+ @patch("posthog.resource_limits.evaluator.report_user_action")+ def test_widget_tile_creation_emits_resource_limit_hit_at_threshold(self, mock_report_user_action) -> None:+ from posthog.resource_limits import LimitKey++ from products.dashboards.backend.models.dashboard_tile import DashboardTile+ from products.dashboards.backend.models.dashboard_widget import DashboardWidget++ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard"})+ dashboard = Dashboard.objects.get(id=dashboard_id)++ for index in range(19):+ widget = DashboardWidget.all_teams.create(+ team_id=self.team.id,+ widget_type="error_tracking_list",+ name=f"Widget {index}",+ config={"limit": 10},+ created_by=self.user,+ last_modified_by=self.user,+ )+ DashboardTile.objects.create(+ dashboard=dashboard,+ team_id=self.team.id,+ widget=widget,+ layouts={"sm": {"x": 0, "y": index, "w": 6, "h": 5}},+ )++ mock_report_user_action.reset_mock()++ response = self.client.post(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/widgets/batch/",+ {+ "widgets": [+ {"widget_type": "error_tracking_list", "config": {"limit": 8}, "name": "Widget 20"},+ ]+ },+ )+ assert response.status_code == status.HTTP_201_CREATED++ limit_calls = [call for call in mock_report_user_action.call_args_list if call[0][1] == "resource limit hit"]+ assert len(limit_calls) == 1+ properties = limit_calls[0][0][2]+ assert properties["limit_key"] == LimitKey.MAX_WIDGETS_PER_DASHBOARD+ assert properties["limit"] == 20+ assert properties["current_count"] == 19+ assert properties["crossing_threshold"] is True++ @override_settings(IN_UNIT_TESTING=True)+ def test_shared_dashboard_tile_serializer_omits_widget_payload(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile = DashboardTile.objects.get(id=dashboard_json["tiles"][0]["id"])++ class ViewShim:+ action = "retrieve"++ context = {"view": ViewShim(), "order": 0}+ assert DashboardTileSerializer(tile, context=context).data["widget"] is not None++ shared_context = {**context, "is_shared": True}+ assert DashboardTileSerializer(tile, context=shared_context).data["widget"] is Nonediff --git a/products/dashboards/backend/api/test/test_run_widgets.py b/products/dashboards/backend/api/test/test_run_widgets.pynew file mode 100644index 000000000000..5e970da45eeb--- /dev/null+++ b/products/dashboards/backend/api/test/test_run_widgets.py@@ -0,0 +1,306 @@+from posthog.test.base import APIBaseTest+from unittest.mock import MagicMock, patch++from parameterized import parameterized+from rest_framework import status++from posthog.api.test.dashboards import DashboardAPI+from posthog.models.personal_api_key import PersonalAPIKey+from posthog.models.utils import generate_random_token_personal, hash_key_value+from posthog.rbac.user_access_control import AccessControlLevel, UserAccessControl+from posthog.scopes import APIScopeObject++from products.dashboards.backend.constants import DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT, MAX_WIDGETS_BATCH_SIZE+from products.dashboards.backend.widget_registry import EXPECTED_WIDGET_TYPES, WIDGET_REGISTRY, validate_widget_config+from products.dashboards.backend.widgets.error_tracking_list import validate_error_tracking_list_config+++class TestWidgetRegistry(APIBaseTest):+ def test_widget_registry_catalog_and_expected_types_stay_in_sync(self) -> None:+ from products.dashboards.backend.widget_catalog import WIDGET_CATALOG++ registry_types = frozenset(WIDGET_REGISTRY.keys())+ assert EXPECTED_WIDGET_TYPES == registry_types+ assert frozenset(WIDGET_CATALOG.keys()) == registry_types+ for widget_type, entry in WIDGET_CATALOG.items():+ assert entry["widget_type"] == widget_type++ def test_validate_widget_config_unknown_type(self) -> None:+ with self.assertRaises(Exception):+ validate_widget_config("not_a_widget", {})++ def test_validate_error_tracking_list_config_defaults(self) -> None:+ validated = validate_error_tracking_list_config({})+ assert validated["limit"] == DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT+ assert validated["orderBy"] == "occurrences"+ assert "filterTestAccounts" not in validated++ def test_validate_error_tracking_list_config_rejects_invalid_filter_test_accounts(self) -> None:+ with self.assertRaises(Exception):+ validate_error_tracking_list_config({"filterTestAccounts": "yes"})++ def test_validate_error_tracking_list_config_rejects_high_limit(self) -> None:+ with self.assertRaises(Exception):+ validate_error_tracking_list_config({"limit": 100})++ @parameterized.expand(["-1h", "-3h", "-24h"])+ def test_validate_error_tracking_list_config_accepts_short_date_ranges(self, date_from: str) -> None:+ validated = validate_error_tracking_list_config({"dateRange": {"date_from": date_from}})+ assert validated["dateRange"] == {"date_from": date_from}++ def test_validate_error_tracking_list_config_rejects_unsupported_date_range(self) -> None:+ with self.assertRaises(Exception):+ validate_error_tracking_list_config({"dateRange": {"date_from": "-48h"}})++ def test_validate_error_tracking_list_config_strips_unknown_date_range_keys(self) -> None:+ validated = validate_error_tracking_list_config(+ {"dateRange": {"date_from": "-7d", "date_to": "ignored", "evil": 1}}+ )+ assert validated["dateRange"] == {"date_from": "-7d"}+++class TestDashboardRunWidgets(APIBaseTest):+ def setUp(self) -> None:+ super().setUp()+ self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)+ self.widgets_flag_patcher = patch(+ "products.dashboards.backend.api.dashboard.dashboard_widgets_enabled",+ return_value=True,+ )+ self.widget_create_flag_patcher = patch(+ "products.dashboards.backend.widget_create.dashboard_widgets_enabled",+ return_value=True,+ )+ self.widgets_flag_patcher.start()+ self.widget_create_flag_patcher.start()++ def tearDown(self) -> None:+ self.widget_create_flag_patcher.stop()+ self.widgets_flag_patcher.stop()+ super().tearDown()++ def _run(self, dashboard_id: int, tile_ids: list[int]) -> dict:+ response = self.client.get(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/run_widgets/",+ {"tile_ids": ",".join(str(tile_id) for tile_id in tile_ids)},+ )+ self.assertEqual(response.status_code, status.HTTP_200_OK, response.content)+ return response.json()++ @parameterized.expand(+ [+ ("missing_param", None, "tile_ids is required"),+ ("empty_param", "", "tile_ids is required"),+ ("non_integer", "abc", "tile_ids must be a comma-separated list of integers"),+ ]+ )+ def test_run_widgets_rejects_invalid_tile_ids_param(+ self, _name: str, tile_ids_param: str | None, expected_detail: str+ ) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ query_params = {} if tile_ids_param is None else {"tile_ids": tile_ids_param}+ response = self.client.get(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/run_widgets/",+ query_params,+ )+ self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)+ self.assertIn(expected_detail, response.json()["detail"])++ @patch(+ "products.error_tracking.backend.hogql_queries.error_tracking_query_runner.ErrorTrackingQueryRunner.calculate"+ )+ def test_runs_widget_for_requested_tile(self, mock_calculate: MagicMock) -> None:+ mock_calculate.return_value = MagicMock(+ model_dump=lambda mode="json": {"results": [], "hasMore": False, "limit": 10, "offset": 0}+ )+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile_id = dashboard_json["tiles"][0]["id"]++ body = self._run(dashboard_id, [tile_id])++ self.assertEqual(len(body["results"]), 1)+ self.assertEqual(body["results"][0]["tile_id"], tile_id)+ self.assertEqual(body["results"][0]["widget_type"], "error_tracking_list")+ self.assertIsNone(body["results"][0]["error"])+ self.assertEqual(body["results"][0]["result"]["limit"], 10)+ mock_calculate.assert_called_once()++ @patch("products.dashboards.backend.widgets.error_tracking_list.ErrorTrackingQueryRunner")+ def test_run_widgets_uses_team_filter_test_accounts_default(self, mock_runner_cls: MagicMock) -> None:+ mock_runner_cls.return_value.calculate.return_value = MagicMock(+ model_dump=lambda mode="json": {"results": [], "hasMore": False, "limit": 10, "offset": 0}+ )+ self.team.test_account_filters_default_checked = True+ self.team.save()+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile_id = dashboard_json["tiles"][0]["id"]++ self._run(dashboard_id, [tile_id])++ query = mock_runner_cls.call_args.kwargs["query"]+ self.assertTrue(query.filterTestAccounts)++ @patch("products.dashboards.backend.widgets.error_tracking_list.ErrorTrackingQueryRunner")+ def test_run_widgets_applies_filter_test_accounts_when_enabled(self, mock_runner_cls: MagicMock) -> None:+ mock_runner_cls.return_value.calculate.return_value = MagicMock(+ model_dump=lambda mode="json": {"results": [], "hasMore": False, "limit": 10, "offset": 0}+ )+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id, config={"limit": 10, "filterTestAccounts": True}+ )+ tile_id = dashboard_json["tiles"][0]["id"]++ self._run(dashboard_id, [tile_id])++ mock_runner_cls.assert_called_once()+ self.assertEqual(mock_runner_cls.call_args.kwargs["user"], self.user)+ query = mock_runner_cls.call_args.kwargs["query"]+ self.assertTrue(query.filterTestAccounts)++ @patch("products.dashboards.backend.widgets.error_tracking_list.ErrorTrackingQueryRunner")+ def test_run_widgets_skips_filter_test_accounts_when_disabled(self, mock_runner_cls: MagicMock) -> None:+ mock_runner_cls.return_value.calculate.return_value = MagicMock(+ model_dump=lambda mode="json": {"results": [], "hasMore": False, "limit": 10, "offset": 0}+ )+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id, config={"limit": 10, "filterTestAccounts": False}+ )+ tile_id = dashboard_json["tiles"][0]["id"]++ self._run(dashboard_id, [tile_id])++ mock_runner_cls.assert_called_once()+ query = mock_runner_cls.call_args.kwargs["query"]+ self.assertFalse(query.filterTestAccounts)++ def test_rejects_non_widget_tile(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ insight_id, _ = self.dashboard_api.create_insight({"name": "insight"})+ self.dashboard_api.add_insight_to_dashboard([dashboard_id], insight_id)+ dashboard_json = self.dashboard_api.get_dashboard(dashboard_id)+ insight_tile_id = next(tile["id"] for tile in dashboard_json["tiles"] if tile.get("insight"))++ body = self._run(dashboard_id, [insight_tile_id])++ self.assertEqual(body["results"][0]["error"], "Tile not found or is not a widget tile.")++ def test_rejects_foreign_tile_id(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ other_id, _ = self.dashboard_api.create_dashboard({"name": "other"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)+ tile_id = dashboard_json["tiles"][0]["id"]++ body = self._run(other_id, [tile_id])++ self.assertEqual(body["results"][0]["error"], "Tile not found or is not a widget tile.")++ @patch("products.dashboards.backend.api.dashboard.dashboard_widgets_enabled", return_value=False)+ def test_disabled_when_feature_flag_off(self, _mock_flag: MagicMock) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ response = self.client.get(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/run_widgets/",+ {"tile_ids": "1"},+ )+ self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)++ def test_run_widgets_denies_without_product_access(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, widget_type="error_tracking_list")+ tile_id = dashboard_json["tiles"][0]["id"]++ real_check = UserAccessControl.check_access_level_for_resource++ def deny_error_tracking_only(+ user_access_control: UserAccessControl,+ resource: APIScopeObject,+ required_level: AccessControlLevel = "viewer",+ ) -> bool:+ if resource == "error_tracking":+ return False+ return real_check(user_access_control, resource, required_level)++ with patch.object(+ UserAccessControl,+ "check_access_level_for_resource",+ autospec=True,+ side_effect=deny_error_tracking_only,+ ):+ body = self._run(dashboard_id, [tile_id])++ self.assertEqual(len(body["results"]), 1)+ self.assertEqual(body["results"][0]["tile_id"], tile_id)+ self.assertEqual(body["results"][0]["widget_type"], "error_tracking_list")+ self.assertIsNone(body["results"][0]["result"])+ self.assertEqual(body["results"][0]["error"], "You do not have access to error tracking.")++ def test_run_widgets_rejects_too_many_tile_ids(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ tile_ids = list(range(1, MAX_WIDGETS_BATCH_SIZE + 2))++ response = self.client.get(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/run_widgets/",+ {"tile_ids": ",".join(str(tile_id) for tile_id in tile_ids)},+ )++ self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)+ self.assertIn(str(MAX_WIDGETS_BATCH_SIZE), response.json()["detail"])++ @patch(+ "products.error_tracking.backend.hogql_queries.error_tracking_query_runner.ErrorTrackingQueryRunner.calculate"+ )+ def test_run_widgets_deduplicates_tile_ids(self, mock_calculate: MagicMock) -> None:+ mock_calculate.return_value = MagicMock(+ model_dump=lambda mode="json": {"results": [], "hasMore": False, "limit": 10, "offset": 0}+ )+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile_id = dashboard_json["tiles"][0]["id"]++ body = self._run(dashboard_id, [tile_id, tile_id])++ self.assertEqual(len(body["results"]), 1)+ mock_calculate.assert_called_once()++ @patch("products.dashboards.backend.widgets.error_tracking_list.ErrorTrackingQueryRunner")+ def test_run_widgets_hides_query_exception_details(self, mock_runner_cls: MagicMock) -> None:+ mock_runner_cls.return_value.calculate.side_effect = Exception("SELECT * FROM secret_table")+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ tile_id = dashboard_json["tiles"][0]["id"]++ body = self._run(dashboard_id, [tile_id])++ self.assertEqual(+ body["results"][0]["error"],+ "Widget query failed. Please try again later.",+ )+ self.assertNotIn("secret_table", body["results"][0]["error"])++ def test_run_widgets_denies_without_api_scope_on_personal_api_key(self) -> None:+ dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})+ _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id)+ tile_id = dashboard_json["tiles"][0]["id"]++ token = generate_random_token_personal()+ PersonalAPIKey.objects.create(+ label="dashboard only",+ user=self.user,+ secure_value=hash_key_value(token),+ scopes=["dashboard:read"],+ scoped_teams=[],+ scoped_organizations=[],+ )++ response = self.client.get(+ f"/api/projects/{self.team.id}/dashboards/{dashboard_id}/run_widgets/",+ {"tile_ids": str(tile_id)},+ HTTP_AUTHORIZATION=f"Bearer {token}",+ )++ self.assertEqual(response.status_code, status.HTTP_200_OK)+ body = response.json()+ self.assertEqual(body["results"][0]["error"], "API key missing required scope 'error_tracking:read'")diff --git a/products/dashboards/backend/api/test/test_widget_access.py b/products/dashboards/backend/api/test/test_widget_access.pynew file mode 100644index 000000000000..15e24bb346a8--- /dev/null+++ b/products/dashboards/backend/api/test/test_widget_access.py@@ -0,0 +1,99 @@+from posthog.test.base import BaseTest+from unittest.mock import MagicMock, patch++from rest_framework.exceptions import PermissionDenied++from posthog.auth import PersonalAPIKeyAuthentication+from posthog.models.personal_api_key import PersonalAPIKey+from posthog.rbac.user_access_control import AccessControlLevel, UserAccessControl+from posthog.scopes import APIScopeObject++from products.dashboards.backend.models.dashboard_widget import DashboardWidget+from products.dashboards.backend.widget_access import (+ check_widget_tile_product_access,+ get_widget_api_scope_error,+ get_widget_product_access_error,+)+from products.dashboards.backend.widget_catalog import get_widget_product_access_denied_message+from products.dashboards.backend.widget_registry import WidgetRegistryEntry, get_widget_registry_entry+++class TestWidgetAccess(BaseTest):+ def test_denied_message_for_known_product(self) -> None:+ message = get_widget_product_access_denied_message("error_tracking")+ self.assertEqual(message, "You do not have access to error tracking.")++ def test_denied_message_falls_back_for_unknown_product(self) -> None:+ message = get_widget_product_access_denied_message("future_product")+ self.assertEqual(message, "You do not have access to future product.")++ def test_registry_entry_without_product_access_allows(self) -> None:+ entry: WidgetRegistryEntry = {+ "validate_config": lambda config: config,+ "query_fn": lambda team, config: {},+ "required_scopes": [],+ }++ self.assertIsNone(get_widget_product_access_error(entry, UserAccessControl(self.user, self.team)))++ def test_registry_entry_denies_without_product_access(self) -> None:+ entry = get_widget_registry_entry("error_tracking_list")+ assert entry is not None++ user_access_control = UserAccessControl(self.user, self.team)+ real_check = UserAccessControl.check_access_level_for_resource++ def deny_error_tracking_only(resource: APIScopeObject, required_level: AccessControlLevel = "viewer") -> bool:+ if resource == "error_tracking":+ return False+ return real_check(user_access_control, resource, required_level)++ with patch.object(+ user_access_control,+ "check_access_level_for_resource",+ side_effect=deny_error_tracking_only,+ ):+ self.assertEqual(+ get_widget_product_access_error(entry, user_access_control),+ "You do not have access to error tracking.",+ )++ def test_check_widget_tile_product_access_denies_unknown_widget_type(self) -> None:+ widget = DashboardWidget(widget_type="not_a_real_widget_type", config={}, team_id=self.team.id)+ user_access_control = UserAccessControl(self.user, self.team)++ with self.assertRaises(PermissionDenied) as raised:+ check_widget_tile_product_access(widget, user_access_control)++ self.assertIn("Unknown widget type", str(raised.exception))++ def test_get_widget_api_scope_error_allows_session_auth(self) -> None:+ entry = get_widget_registry_entry("error_tracking_list")+ assert entry is not None+ request = MagicMock()+ request.successful_authenticator = None++ self.assertIsNone(get_widget_api_scope_error(entry, request))++ def test_get_widget_api_scope_error_denies_missing_scope_on_pat(self) -> None:+ entry = get_widget_registry_entry("error_tracking_list")+ assert entry is not None+ authenticator = PersonalAPIKeyAuthentication()+ authenticator.personal_api_key = PersonalAPIKey(scopes=["dashboard:read"])+ request = MagicMock()+ request.successful_authenticator = authenticator++ self.assertEqual(+ get_widget_api_scope_error(entry, request),+ "API key missing required scope 'error_tracking:read'",+ )++ def test_get_widget_api_scope_error_allows_write_scope_for_read_requirement(self) -> None:+ entry = get_widget_registry_entry("error_tracking_list")+ assert entry is not None+ authenticator = PersonalAPIKeyAuthentication()+ authenticator.personal_api_key = PersonalAPIKey(scopes=["error_tracking:write"])+ request = MagicMock()+ request.successful_authenticator = authenticator++ self.assertIsNone(get_widget_api_scope_error(entry, request))diff --git a/products/dashboards/backend/api/widget_openapi_serializers.py b/products/dashboards/backend/api/widget_openapi_serializers.pynew file mode 100644index 000000000000..d554fc24c78c--- /dev/null+++ b/products/dashboards/backend/api/widget_openapi_serializers.py@@ -0,0 +1,65 @@+from __future__ import annotations++from rest_framework import serializers++from products.dashboards.backend.constants import (+ DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT,+ MAX_WIDGET_RESULT_LIMIT,+ WIDGET_DATE_FROM_VALUES,+)+from products.dashboards.backend.widgets.error_tracking_list import ERROR_TRACKING_ORDER_BY++_ERROR_TRACKING_WIDGET_STATUS_CHOICES = [+ "archived",+ "active",+ "resolved",+ "pending_release",+ "suppressed",+ "all",+]+++class WidgetDateRangeSerializer(serializers.Serializer):+ date_from = serializers.ChoiceField(+ choices=sorted(WIDGET_DATE_FROM_VALUES),+ required=False,+ allow_null=True,+ help_text="Relative lookback window (for example '-7d'). Omit to use the project default range.",+ )+++class ErrorTrackingListWidgetConfigSerializer(serializers.Serializer):+ limit = serializers.IntegerField(+ min_value=1,+ max_value=MAX_WIDGET_RESULT_LIMIT,+ default=DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT,+ required=False,+ help_text="Maximum number of issues to return.",+ )+ orderBy = serializers.ChoiceField(+ choices=sorted(ERROR_TRACKING_ORDER_BY),+ default="occurrences",+ required=False,+ help_text="Issue ranking column.",+ )+ orderDirection = serializers.ChoiceField(+ choices=["ASC", "DESC"],+ default="DESC",+ required=False,+ help_text="Sort direction for orderBy.",+ )+ status = serializers.ChoiceField(+ choices=_ERROR_TRACKING_WIDGET_STATUS_CHOICES,+ default="active",+ required=False,+ help_text="Issue status filter.",+ )+ dateRange = WidgetDateRangeSerializer(+ required=False,+ allow_null=True,+ help_text="Optional relative date range override.",+ )+ filterTestAccounts = serializers.BooleanField(+ required=False,+ help_text="When omitted, follows the project default for filtering test accounts.",+ )diff --git a/products/dashboards/backend/constants.py b/products/dashboards/backend/constants.pynew file mode 100644index 000000000000..fa0f5968707a--- /dev/null+++ b/products/dashboards/backend/constants.py@@ -0,0 +1,14 @@+# Keep in sync with frontend `BREAKPOINT_COLUMN_COUNTS.sm`.+DASHBOARD_GRID_COLUMN_COUNT = 12++# Cap per-query row count so run-widgets responses stay bounded.+MAX_WIDGET_RESULT_LIMIT = 25++# Default row count for error_tracking_list when config omits limit (matches catalog + OpenAPI).+DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT = 10++# Cap widgets per batch create / run-widgets request.+MAX_WIDGETS_BATCH_SIZE = 10++# Preset relative ranges only — widgets don't accept arbitrary HogQL date strings.+WIDGET_DATE_FROM_VALUES = frozenset({"-1h", "-3h", "-24h", "-7d", "-14d", "-30d", "-90d"})diff --git a/products/dashboards/backend/feature_flags.py b/products/dashboards/backend/feature_flags.pynew file mode 100644index 000000000000..12b5b38fcfc4--- /dev/null+++ b/products/dashboards/backend/feature_flags.py@@ -0,0 +1,7 @@+import posthoganalytics++DASHBOARD_WIDGETS_FLAG = "dashboard-widgets"+++def dashboard_widgets_enabled(team_id: int) -> bool:+ return bool(posthoganalytics.feature_enabled(DASHBOARD_WIDGETS_FLAG, str(team_id)))diff --git a/products/dashboards/backend/test/test_widget_layouts.py b/products/dashboards/backend/test/test_widget_layouts.pynew file mode 100644index 000000000000..63687c7ca71d--- /dev/null+++ b/products/dashboards/backend/test/test_widget_layouts.py@@ -0,0 +1,74 @@+from products.dashboards.backend.widget_layouts import stack_widget_layout_at_bottom+++class TestWidgetLayouts:+ """Backend placement only reads `layouts.sm`.++ Uses the same lowest-segment greedy packing as ``tileLayouts.calculateLayouts`` /+ ``_apply_reorder_layout`` (preserve). Mobile (`xs`) placement is still derived on+ the frontend; the backend mirrors sm → xs for API/schema completeness.+ """++ def test_stack_widget_layout_at_bottom_fills_lowest_segment(self) -> None:+ existing = [+ {"x": 0, "y": 0, "w": 6, "h": 4},+ {"x": 6, "y": 0, "w": 6, "h": 11},+ ]++ layouts = stack_widget_layout_at_bottom(+ widget_type="error_tracking_list",+ existing_sm_layouts=existing,+ )++ assert layouts["sm"] == {"x": 0, "y": 4, "w": 6, "h": 5}+ assert layouts["xs"] == layouts["sm"]++ def test_stack_widget_layout_at_bottom_uses_right_column_when_left_is_taller(self) -> None:+ existing = [+ {"x": 0, "y": 0, "w": 6, "h": 4},+ {"x": 6, "y": 0, "w": 6, "h": 9},+ {"x": 0, "y": 4, "w": 3, "h": 2},+ {"x": 3, "y": 4, "w": 3, "h": 5},+ {"x": 0, "y": 9, "w": 12, "h": 2},+ {"x": 0, "y": 11, "w": 4, "h": 3},+ {"x": 4, "y": 11, "w": 8, "h": 7},+ ]+ pending = [+ {"x": 0, "y": 18, "w": 6, "h": 4},+ {"x": 0, "y": 22, "w": 6, "h": 3},+ ]++ layouts = stack_widget_layout_at_bottom(+ widget_type="error_tracking_list",+ existing_sm_layouts=existing,+ pending_sm_layouts=pending,+ )++ assert layouts["sm"] == {"x": 6, "y": 18, "w": 6, "h": 5}++ def test_stack_widget_layout_at_bottom_prefers_shorter_right_column(self) -> None:+ existing = [+ {"x": 0, "y": 0, "w": 6, "h": 10},+ {"x": 6, "y": 0, "w": 6, "h": 4},+ ]++ layouts = stack_widget_layout_at_bottom(+ widget_type="error_tracking_list",+ existing_sm_layouts=existing,+ )++ assert layouts["sm"] == {"x": 6, "y": 4, "w": 6, "h": 5}++ def test_stack_widget_layout_at_bottom_packs_batch_side_by_side(self) -> None:+ first = stack_widget_layout_at_bottom(+ widget_type="error_tracking_list",+ existing_sm_layouts=[],+ )+ second = stack_widget_layout_at_bottom(+ widget_type="error_tracking_list",+ existing_sm_layouts=[],+ pending_sm_layouts=[first["sm"]],+ )++ assert first["sm"] == {"x": 0, "y": 0, "w": 6, "h": 5}+ assert second["sm"] == {"x": 6, "y": 0, "w": 6, "h": 5}diff --git a/products/dashboards/backend/widget_access.py b/products/dashboards/backend/widget_access.pynew file mode 100644index 000000000000..70c55d591c94--- /dev/null+++ b/products/dashboards/backend/widget_access.py@@ -0,0 +1,76 @@+from __future__ import annotations++from typing import cast++from rest_framework import exceptions+from rest_framework.request import Request++from posthog.auth import OAuthAccessTokenAuthentication, PersonalAPIKeyAuthentication+from posthog.rbac.user_access_control import AccessControlLevel, UserAccessControl+from posthog.scopes import APIScopeObject++from products.dashboards.backend.models.dashboard_widget import DashboardWidget+from products.dashboards.backend.widget_catalog import get_widget_product_access_denied_message+from products.dashboards.backend.widget_registry import WidgetRegistryEntry, get_widget_registry_entry+++def _get_request_api_key_scopes(request: Request) -> list[str] | None:+ authenticator = request.successful_authenticator+ if isinstance(authenticator, PersonalAPIKeyAuthentication):+ return list(authenticator.personal_api_key.scopes or [])+ if isinstance(authenticator, OAuthAccessTokenAuthentication):+ token_scope_string = authenticator.access_token.scope+ return token_scope_string.split() if token_scope_string else []+ return None+++def get_widget_api_scope_error(+ registry_entry: WidgetRegistryEntry,+ request: Request,+) -> str | None:+ key_scopes = _get_request_api_key_scopes(request)+ if key_scopes is None:+ return None++ if "*" in key_scopes:+ return None++ required_scopes = registry_entry.get("required_scopes") or []+ for required_scope in required_scopes:+ valid_scopes = [required_scope]+ if required_scope.endswith(":read"):+ valid_scopes.append(required_scope.replace(":read", ":write"))+ if not any(scope in key_scopes for scope in valid_scopes):+ return f"API key missing required scope '{required_scope}'"+ return None+++def get_widget_product_access_error(+ registry_entry: WidgetRegistryEntry,+ user_access_control: UserAccessControl,+ *,+ required_level: AccessControlLevel = "viewer",+) -> str | None:+ required_product_access = registry_entry.get("required_product_access")+ if not required_product_access:+ return None++ if not user_access_control.check_access_level_for_resource(+ cast(APIScopeObject, required_product_access),+ required_level,+ ):+ return get_widget_product_access_denied_message(required_product_access)+ return None+++def check_widget_tile_product_access(+ widget: DashboardWidget,+ user_access_control: UserAccessControl,+) -> None:+ registry_entry = get_widget_registry_entry(widget.widget_type)+ if registry_entry is None:+ raise exceptions.PermissionDenied(f"Unknown widget type: {widget.widget_type}")++ access_error = get_widget_product_access_error(registry_entry, user_access_control)+ if access_error:+ raise exceptions.PermissionDenied(access_error)diff --git a/products/dashboards/backend/widget_catalog.py b/products/dashboards/backend/widget_catalog.pynew file mode 100644index 000000000000..87e0abde5642--- /dev/null+++ b/products/dashboards/backend/widget_catalog.py@@ -0,0 +1,98 @@+from __future__ import annotations++from typing import Any, NotRequired, TypedDict++from products.dashboards.backend.constants import (+ DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT,+ MAX_WIDGET_RESULT_LIMIT,+ WIDGET_DATE_FROM_VALUES,+)+from products.dashboards.backend.widgets.error_tracking_list import ERROR_TRACKING_ORDER_BY+++class WidgetCatalogEntry(TypedDict):+ widget_type: str+ group_id: str+ group_label: str+ label: str+ description: str+ config_schema_hints: dict[str, Any]+ required_product_access: str | None+ product_access_denied_message: NotRequired[str | None]+ availability_requirements: list[str]+++# New widget types: add here. See products/dashboards/CONTRIBUTING.md.+WIDGET_CATALOG: dict[str, WidgetCatalogEntry] = {+ "error_tracking_list": {+ "widget_type": "error_tracking_list",+ "group_id": "error_tracking",+ "group_label": "Error tracking",+ "label": "Top issues",+ "description": "Ranked list of the most impactful error tracking issues.",+ "config_schema_hints": {+ "limit": {+ "type": "integer",+ "min": 1,+ "max": MAX_WIDGET_RESULT_LIMIT,+ "default": DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT,+ },+ "orderBy": {+ "type": "string",+ "choices": sorted(ERROR_TRACKING_ORDER_BY),+ "default": "occurrences",+ },+ "orderDirection": {+ "type": "string",+ "choices": ["ASC", "DESC"],+ "default": "DESC",+ },+ "status": {+ "type": "string",+ "choices": ["archived", "active", "resolved", "pending_release", "suppressed", "all"],+ "default": "active",+ },+ "dateRange": {+ "date_from": {+ "type": "string",+ "choices": sorted(WIDGET_DATE_FROM_VALUES),+ "optional": True,+ },+ },+ "filterTestAccounts": {+ "type": "boolean",+ "optional": True,+ "uses_project_default": True,+ },+ },+ "required_product_access": "error_tracking",+ "product_access_denied_message": "You do not have access to error tracking.",+ "availability_requirements": ["exception_autocapture"],+ },+}+++def get_widget_catalog_entries() -> list[WidgetCatalogEntry]:+ return list(WIDGET_CATALOG.values())+++def get_widget_product_access_denied_message(required_product_access: str) -> str:+ for entry in WIDGET_CATALOG.values():+ if entry.get("required_product_access") == required_product_access:+ message = entry.get("product_access_denied_message")+ if message:+ return message+ return f"You do not have access to {required_product_access.replace('_', ' ')}."+++def get_default_widget_layouts(widget_type: str) -> dict[str, dict[str, int]]:+ entry = WIDGET_CATALOG.get(widget_type)+ width = 6+ height = 5+ if entry is not None:+ # Catalog entries may gain default_layout later; keep a stable fallback.+ _ = entry+ return {+ "sm": {"x": 0, "y": 0, "w": width, "h": height},+ "xs": {"x": 0, "y": 0, "w": width, "h": height},+ }diff --git a/products/dashboards/backend/widget_create.py b/products/dashboards/backend/widget_create.pynew file mode 100644index 000000000000..b67c1027b647--- /dev/null+++ b/products/dashboards/backend/widget_create.py@@ -0,0 +1,40 @@+from __future__ import annotations++from typing import Any++from rest_framework import serializers++from posthog.rbac.user_access_control import UserAccessControl++from products.dashboards.backend.feature_flags import dashboard_widgets_enabled+from products.dashboards.backend.models.dashboard_widget import DashboardWidget+from products.dashboards.backend.widget_access import check_widget_tile_product_access+from products.dashboards.backend.widget_registry import get_widget_registry_entry, validate_widget_config+++def prepare_widget_tile_create(+ *,+ team_id: int,+ widget_type: str,+ config: dict[str, Any],+ user_access_control: UserAccessControl | None = None,+) -> tuple[str, dict[str, Any]]:+ if not dashboard_widgets_enabled(team_id):+ raise serializers.ValidationError({"widget": "Dashboard widgets are not enabled for this project."})++ if get_widget_registry_entry(widget_type) is None:+ raise serializers.ValidationError({"widget_type": f"Unknown widget type: {widget_type}"})++ if not isinstance(config, dict):+ raise serializers.ValidationError({"config": "Config must be an object."})++ if user_access_control is not None:+ probe_widget = DashboardWidget(+ widget_type=widget_type,+ config=config,+ team_id=team_id,+ )+ check_widget_tile_product_access(probe_widget, user_access_control)++ validated_config = validate_widget_config(widget_type, config)+ return widget_type, validated_configdiff --git a/products/dashboards/backend/widget_layouts.py b/products/dashboards/backend/widget_layouts.pynew file mode 100644index 000000000000..b7869a5d9d4f--- /dev/null+++ b/products/dashboards/backend/widget_layouts.py@@ -0,0 +1,75 @@+from __future__ import annotations++from typing import Any++from products.dashboards.backend.constants import DASHBOARD_GRID_COLUMN_COUNT+from products.dashboards.backend.widget_catalog import get_default_widget_layouts+++def _column_heights_from_sm_layouts(sm_layouts: list[dict[str, Any]]) -> list[int]:+ column_heights = [0] * DASHBOARD_GRID_COLUMN_COUNT+ for layout in sm_layouts:+ x = int(layout.get("x", 0))+ y = int(layout.get("y", 0))+ w = max(1, min(int(layout.get("w", 1)), DASHBOARD_GRID_COLUMN_COUNT))+ h = max(1, int(layout.get("h", 1)))+ x = max(0, min(x, DASHBOARD_GRID_COLUMN_COUNT - 1))+ for column in range(x, min(x + w, DASHBOARD_GRID_COLUMN_COUNT)):+ column_heights[column] = max(column_heights[column], y + h)+ return column_heights+++def _find_lowest_segment_placement(+ *,+ column_heights: list[int],+ width: int,+ height: int,+) -> dict[str, int]:+ """Greedy lowest-segment packing from ``frontend/src/scenes/dashboard/tileLayouts.ts``."""+ w = max(1, min(width, DASHBOARD_GRID_COLUMN_COUNT))+ h = max(1, height)++ best_x = 0+ best_y = max(column_heights[0:w])+ for x in range(1, DASHBOARD_GRID_COLUMN_COUNT - w + 1):+ segment_top = max(column_heights[x : x + w])+ if segment_top < best_y:+ best_x = x+ best_y = segment_top++ return {"x": best_x, "y": best_y, "w": w, "h": h}+++def stack_widget_layout_at_bottom(+ *,+ widget_type: str,+ existing_sm_layouts: list[dict[str, Any]],+ pending_sm_layouts: list[dict[str, Any]] | None = None,+) -> dict[str, dict[str, int]]:+ defaults = get_default_widget_layouts(widget_type)+ width = defaults["sm"]["w"]+ height = defaults["sm"]["h"]+ sm_layouts = [*existing_sm_layouts, *(pending_sm_layouts or [])]+ column_heights = _column_heights_from_sm_layouts(sm_layouts)+ sm = _find_lowest_segment_placement(column_heights=column_heights, width=width, height=height)+ return {"sm": sm, "xs": {**sm}}+++def collect_dashboard_sm_layouts(dashboard_tiles: list[Any]) -> list[dict[str, Any]]:+ sm_layouts: list[dict[str, Any]] = []+ for tile in dashboard_tiles:+ layouts = tile.layouts if isinstance(tile.layouts, dict) else {}+ sm_layout = layouts.get("sm")+ if isinstance(sm_layout, dict):+ sm_layouts.append(sm_layout)+ return sm_layouts+++def collect_dashboard_sm_layouts_for_dashboard(dashboard: Any) -> list[dict[str, Any]]:+ sm_layouts: list[dict[str, Any]] = []+ for layouts in dashboard.tiles.filter(deleted=False).values_list("layouts", flat=True):+ if isinstance(layouts, dict):+ sm_layout = layouts.get("sm")+ if isinstance(sm_layout, dict):+ sm_layouts.append(sm_layout)+ return sm_layoutsdiff --git a/products/dashboards/backend/widget_registry.py b/products/dashboards/backend/widget_registry.pynew file mode 100644index 000000000000..7ad100a26bc5--- /dev/null+++ b/products/dashboards/backend/widget_registry.py@@ -0,0 +1,61 @@+"""Runtime registry for dashboard widget types.++Maps each widget_type string to the backend hooks that power dashboard tiles:+config validation, query execution, and product access requirements. The+dashboard API uses this when creating/updating widget tiles, enforcing access+on run_widgets, and validating stored config.++Widget metadata shown in the UI and MCP (labels, descriptions, config hints)+lives in widget_catalog.py instead — keep that in sync when adding types here.++New widget types: add an entry to WIDGET_REGISTRY and EXPECTED_WIDGET_TYPES.+See products/dashboards/CONTRIBUTING.md.+"""++from __future__ import annotations++from collections.abc import Callable+from typing import Any, Literal, NotRequired, TypedDict++from rest_framework.exceptions import ValidationError as DRFValidationError++from posthog.models.team import Team++from products.dashboards.backend.widgets.error_tracking_list import (+ run_error_tracking_list_widget,+ validate_error_tracking_list_config,+)++# Canonical widget types. Must match WIDGET_REGISTRY keys.+EXPECTED_WIDGET_TYPES = frozenset({"error_tracking_list"})++DashboardWidgetType = Literal["error_tracking_list"]+++class WidgetRegistryEntry(TypedDict):+ validate_config: Callable[[dict[str, Any]], dict[str, Any]]+ query_fn: Callable[[Team, dict[str, Any]], dict[str, Any]]+ required_scopes: list[str]+ required_product_access: NotRequired[str | None]+++# Per-type validate_config / query_fn / access control. Keys must match EXPECTED_WIDGET_TYPES.+WIDGET_REGISTRY: dict[str, WidgetRegistryEntry] = {+ "error_tracking_list": {+ "validate_config": validate_error_tracking_list_config,+ "query_fn": run_error_tracking_list_widget,+ "required_scopes": ["error_tracking:read"],+ "required_product_access": "error_tracking",+ },+}+++def get_widget_registry_entry(widget_type: str) -> WidgetRegistryEntry | None:+ return WIDGET_REGISTRY.get(widget_type)+++def validate_widget_config(widget_type: str, config: dict[str, Any]) -> dict[str, Any]:+ entry = get_widget_registry_entry(widget_type)+ if entry is None:+ raise DRFValidationError({"widget_type": f"Unknown widget type: {widget_type}"})+ return entry["validate_config"](config)diff --git a/products/dashboards/backend/widgets/config.py b/products/dashboards/backend/widgets/config.pynew file mode 100644index 000000000000..d01a91906502--- /dev/null+++ b/products/dashboards/backend/widgets/config.py@@ -0,0 +1,46 @@+"""Shared helpers for dashboard widget config: validation, defaults, and common fields."""++from __future__ import annotations++from typing import Any++from rest_framework.exceptions import ValidationError as DRFValidationError++from posthog.models.team import Team++from products.dashboards.backend.constants import WIDGET_DATE_FROM_VALUES+++def resolve_filter_test_accounts(config: dict[str, Any], team: Team) -> bool:+ # Omitting filterTestAccounts should follow the team default, not hardcode false.+ if "filterTestAccounts" not in config:+ return bool(team.test_account_filters_default_checked)+ value = config["filterTestAccounts"]+ if not isinstance(value, bool):+ raise DRFValidationError({"config": "filterTestAccounts must be a boolean."})+ return value+++def merge_base_widget_config_fields(config: dict[str, Any]) -> dict[str, Any]:+ # Centralizes shared fields so each widget type doesn't re-validate them.+ if "filterTestAccounts" not in config:+ return {}+ value = config["filterTestAccounts"]+ if not isinstance(value, bool):+ raise DRFValidationError({"config": "filterTestAccounts must be a boolean."})+ return {"filterTestAccounts": value}+++def validate_widget_date_range(date_range: object) -> dict[str, object] | None:+ # Fail fast on unsupported shapes before widget runners build queries.+ if date_range is None:+ return None+ if not isinstance(date_range, dict):+ raise DRFValidationError({"config": "dateRange must be an object."})++ date_from = date_range.get("date_from")+ if date_from is not None and (not isinstance(date_from, str) or date_from not in WIDGET_DATE_FROM_VALUES):+ allowed = ", ".join(sorted(WIDGET_DATE_FROM_VALUES))+ raise DRFValidationError({"config": f"dateRange.date_from must be one of: {allowed}."})++ return {"date_from": date_from} if date_from is not None else Nonediff --git a/products/dashboards/backend/widgets/error_tracking_list.py b/products/dashboards/backend/widgets/error_tracking_list.pynew file mode 100644index 000000000000..b42cbfbe4c22--- /dev/null+++ b/products/dashboards/backend/widgets/error_tracking_list.py@@ -0,0 +1,91 @@+from __future__ import annotations++from typing import Any, cast++from rest_framework.exceptions import ValidationError as DRFValidationError++from posthog.schema import DateRange, ErrorTrackingQuery++from posthog.clickhouse.query_tagging import Feature, Product, tags_context+from posthog.models.team import Team+from posthog.models.user import User++from products.dashboards.backend.constants import DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT, MAX_WIDGET_RESULT_LIMIT+from products.dashboards.backend.widgets.config import (+ merge_base_widget_config_fields,+ resolve_filter_test_accounts,+ validate_widget_date_range,+)+from products.error_tracking.backend.api.query_utils import (+ LIST_ISSUE_FIELDS,+ build_date_range,+ get_page_info,+ pick_fields,+)+from products.error_tracking.backend.hogql_queries.error_tracking_query_runner import ErrorTrackingQueryRunner++# Validate/run for one widget_type — register in widget_registry.py. See products/dashboards/CONTRIBUTING.md.+ERROR_TRACKING_ORDER_BY = frozenset({"last_seen", "first_seen", "occurrences", "users", "sessions"})+++def validate_error_tracking_list_config(config: dict[str, Any]) -> dict[str, Any]:+ if not isinstance(config, dict):+ raise DRFValidationError({"config": "Config must be an object."})++ limit = config.get("limit", DEFAULT_ERROR_TRACKING_LIST_WIDGET_LIMIT)+ if not isinstance(limit, int) or limit < 1 or limit > MAX_WIDGET_RESULT_LIMIT:+ raise DRFValidationError({"config": f"limit must be an integer between 1 and {MAX_WIDGET_RESULT_LIMIT}."})++ order_by = config.get("orderBy", "occurrences")+ if order_by not in ERROR_TRACKING_ORDER_BY:+ raise DRFValidationError({"config": f"orderBy must be one of: {', '.join(sorted(ERROR_TRACKING_ORDER_BY))}."})++ order_direction = config.get("orderDirection", "DESC")+ if order_direction not in {"ASC", "DESC"}:+ raise DRFValidationError({"config": "orderDirection must be ASC or DESC."})++ status_value = config.get("status", "active")+ if status_value not in {"archived", "active", "resolved", "pending_release", "suppressed", "all"}:+ raise DRFValidationError({"config": "status is invalid for error tracking widget config."})++ validated_date_range = validate_widget_date_range(config.get("dateRange")) if "dateRange" in config else None++ return {+ "limit": limit,+ "orderBy": order_by,+ "orderDirection": order_direction,+ "status": status_value,+ **({"dateRange": validated_date_range} if validated_date_range is not None else {}),+ **merge_base_widget_config_fields(config),+ }+++def run_error_tracking_list_widget(team: Team, config: dict[str, Any], user: User | None = None) -> dict[str, Any]:+ limit = cast(int, config["limit"])+ offset = 0+ date_range_raw = config.get("dateRange")+ query = ErrorTrackingQuery(+ kind="ErrorTrackingQuery",+ dateRange=DateRange(**build_date_range(date_range_raw)),+ status=cast(str, config.get("status", "active")),+ filterTestAccounts=resolve_filter_test_accounts(config, team),+ orderBy=cast(str, config.get("orderBy", "occurrences")),+ orderDirection=cast(str, config.get("orderDirection", "DESC")),+ limit=limit,+ offset=offset,+ volumeResolution=0,+ withAggregations=True,+ withFirstEvent=False,+ withLastEvent=False,+ tags={"productKey": "error_tracking"},+ )+ with tags_context(product=Product.ERROR_TRACKING, feature=Feature.QUERY):+ data = ErrorTrackingQueryRunner(team=team, query=query, user=user).calculate().model_dump(mode="json")+ raw_results_value = data.get("results")+ raw_results: list[object] = raw_results_value if isinstance(raw_results_value, list) else []+ results = [pick_fields(cast(dict[str, object], issue), LIST_ISSUE_FIELDS) for issue in raw_results[:limit]]+ has_more, next_offset = get_page_info(data, limit, offset)+ payload: dict[str, Any] = {"results": results, "hasMore": has_more, "limit": limit, "offset": offset}+ if next_offset is not None:+ payload["nextOffset"] = next_offset+ return payloaddiff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.tsindex 77dd8d7b112b..c9ebfb70fa34 100644--- a/products/dashboards/frontend/generated/api.schemas.ts+++ b/products/dashboards/frontend/generated/api.schemas.ts@@ -7418,22 +7418,145 @@ export interface ButtonTileApi {team: number}-export interface NestedApi {+/**+ * * `last_seen` - last_seen+ * `first_seen` - first_seen+ * `occurrences` - occurrences+ * `users` - users+ * `sessions` - sessions+ */+export type ErrorTrackingIssueOrderByEnumApi =+ (typeof ErrorTrackingIssueOrderByEnumApi)[keyof typeof ErrorTrackingIssueOrderByEnumApi]++export const ErrorTrackingIssueOrderByEnumApi = {+ LastSeen: 'last_seen',+ FirstSeen: 'first_seen',+ Occurrences: 'occurrences',+ Users: 'users',+ Sessions: 'sessions',+} as const++/**+ * * `ASC` - ASC+ * `DESC` - DESC+ */+export type OrderDirectionEnumApi = (typeof OrderDirectionEnumApi)[keyof typeof OrderDirectionEnumApi]++export const OrderDirectionEnumApi = {+ Asc: 'ASC',+ Desc: 'DESC',+} as const++/**+ * * `archived` - archived+ * `active` - active+ * `resolved` - resolved+ * `pending_release` - pending_release+ * `suppressed` - suppressed+ * `all` - all+ */+export type ErrorTrackingIssueStatusEnumApi =+ (typeof ErrorTrackingIssueStatusEnumApi)[keyof typeof ErrorTrackingIssueStatusEnumApi]++export const ErrorTrackingIssueStatusEnumApi = {+ Archived: 'archived',+ Active: 'active',+ Resolved: 'resolved',+ PendingRelease: 'pending_release',+ Suppressed: 'suppressed',+ All: 'all',+} as const++/**+ * * `-14d` - -14d+ * `-1h` - -1h+ * `-24h` - -24h+ * `-30d` - -30d+ * `-3h` - -3h+ * `-7d` - -7d+ * `-90d` - -90d+ */+export type DateFromEnumApi = (typeof DateFromEnumApi)[keyof typeof DateFromEnumApi]++export const DateFromEnumApi = {+ '14d': '-14d',+ '1h': '-1h',+ '24h': '-24h',+ '30d': '-30d',+ '3h': '-3h',+ '7d': '-7d',+ '90d': '-90d',+} as const++export interface WidgetDateRangeApi {+ /** Relative lookback window (for example '-7d'). Omit to use the project default range.++ * `-14d` - -14d+ * `-1h` - -1h+ * `-24h` - -24h+ * `-30d` - -30d+ * `-3h` - -3h+ * `-7d` - -7d+ * `-90d` - -90d */+ date_from?: DateFromEnumApi | null+}++export interface ErrorTrackingListWidgetConfigApi {+ /**+ * Maximum number of issues to return.+ * @minimum 1+ * @maximum 25+ */+ limit?: number+ /** Issue ranking column.++ * `first_seen` - first_seen+ * `last_seen` - last_seen+ * `occurrences` - occurrences+ * `sessions` - sessions+ * `users` - users */+ orderBy?: ErrorTrackingIssueOrderByEnumApi+ /** Sort direction for orderBy.++ * `ASC` - ASC+ * `DESC` - DESC */+ orderDirection?: OrderDirectionEnumApi+ /** Issue status filter.++ * `archived` - archived+ * `active` - active+ * `resolved` - resolved+ * `pending_release` - pending_release+ * `suppressed` - suppressed+ * `all` - all */+ status?: ErrorTrackingIssueStatusEnumApi+ /** Optional relative date range override. */+ dateRange?: WidgetDateRangeApi | null+ /** When omitted, follows the project default for filtering test accounts. */+ filterTestAccounts?: boolean+}++export interface DashboardWidgetApi {readonly id: string- /** @maxLength 64 */+ readonly created_by: UserBasicApi+ readonly last_modified_by: UserBasicApi+ /**+ * Widget type identifier from the dashboard widget catalog.+ * @maxLength 64+ */widget_type: string/**+ * Optional custom display name for this widget tile. Falls back to the widget catalog label when unset.* @maxLength 400* @nullable*/name?: string | null+ /** Optional markdown description shown on the dashboard tile when enabled. */description?: string- config?: unknown- last_modified_at?: string- /** @nullable */- created_by?: number | null- /** @nullable */- last_modified_by?: number | null+ /** Widget-specific configuration JSON for this widget type. */+ config?: ErrorTrackingListWidgetConfigApi+ readonly dashboard_tiles: readonly DashboardTileBasicApi[]+ readonly last_modified_at: stringteam: number}@@ -7442,6 +7565,7 @@ export interface DashboardTileApi {insight: InsightApitext: TextApibutton_tile: ButtonTileApi+ widget?: DashboardWidgetApi | nulllayouts?: unknown/*** @maxLength 400@@ -7453,7 +7577,6 @@ export interface DashboardTileApi {show_description?: boolean | null/** @nullable */transparent_background?: boolean | null- readonly widget: NestedApi}export interface DeleteTileRequestApi {@@ -7461,6 +7584,18 @@ export interface DeleteTileRequestApi {tile_id: number}+export interface MoveTileTileApi {+ /** Dashboard tile ID to move. */+ id: number+}++export interface PatchedMoveTileRequestApi {+ /** Destination dashboard ID. */+ to_dashboard?: number+ /** Tile to move, identified by its dashboard tile ID. */+ tile?: MoveTileTileApi+}+/*** * `preserve` - preserve* `two_column` - two_column@@ -7514,6 +7649,28 @@ export interface RunInsightsResponseApi {results: DashboardTileResultApi[]}+export interface DashboardWidgetRunResultApi {+ /** Dashboard tile ID for this widget result. */+ tile_id: number+ /**+ * Widget type identifier, or null when the tile was not found.+ * @nullable+ */+ widget_type: string | null+ /** Live widget query result payload. */+ result: unknown+ /**+ * Error message when the widget could not be run.+ * @nullable+ */+ error: string | null+}++export interface RunWidgetsResponseApi {+ /** Per-tile widget run results. */+ results: DashboardWidgetRunResultApi[]+}+export interface UpdateTextTileRequestApi {/** ID of the dashboard tile to update. Use dashboard-get to look up tile IDs. */tile_id: number@@ -7533,6 +7690,42 @@ export interface UpdateTextTileRequestApi {color?: string | null}+export interface AddDashboardWidgetRequestApi {+ /**+ * Widget type identifier. Supported values: error_tracking_list. Use dashboard-widget-catalog-list for config_schema_hints per type.+ * @maxLength 64+ */+ widget_type: string+ /** Widget-specific configuration. Shape depends on widget_type; see dashboard-widget-catalog-list for other types. For error_tracking_list, use the schema below (currently the only supported type: error_tracking_list). */+ config: ErrorTrackingListWidgetConfigApi+ /**+ * Optional custom display name for the widget tile.+ * @maxLength 400+ * @nullable+ */+ name?: string | null+ /** Optional markdown description shown when show_description is enabled. */+ description?: string+ /** Optional react-grid-layout positions keyed by breakpoint (sm, xs). */+ layouts?: TileLayoutsApi+ /** Whether to show the description on the dashboard tile. */+ show_description?: boolean+}++export interface AddDashboardWidgetsBatchRequestApi {+ /**+ * Widget tiles to add atomically (1–10). Use a single-element list to add one widget.+ * @minItems 1+ * @maxItems 10+ */+ widgets: AddDashboardWidgetRequestApi[]+}++export interface AddDashboardWidgetsBatchResponseApi {+ /** Created dashboard widget tiles in request order. */+ tiles: DashboardTileApi[]+}+/*** * `add` - add* `remove` - remove@@ -7577,6 +7770,31 @@ export interface BulkUpdateTagsResponseApi {skipped: BulkUpdateTagsErrorApi[]}+export interface WidgetCatalogEntryApi {+ /** Stable widget type identifier used in API requests. */+ widget_type: string+ /** Product area key for grouping related widget variants. */+ group_id: string+ /** Human-readable product area label. */+ group_label: string+ /** Widget variant label within the product area. */+ label: string+ /** Short description of what the widget shows. */+ description: string+ /** JSON schema hints for config fields (types, choices, bounds). Not a strict validator. */+ config_schema_hints: unknown+ /**+ * Product access resource required to view or run this widget, if any.+ * @nullable+ */+ required_product_access?: string | null+}++export interface WidgetCatalogResponseApi {+ /** Registered dashboard widget types available when dashboard-widgets is enabled. */+ results: WidgetCatalogEntryApi[]+}+export interface DataColorThemeApi {readonly id: number/** @maxLength 100 */@@ -7842,6 +8060,22 @@ export const DashboardsRunInsightsRetrieveRefresh = {ForceCache: 'force_cache',} as const+export type DashboardsRunWidgetsRetrieveParams = {+ format?: DashboardsRunWidgetsRetrieveFormat+ /**+ * Comma-separated dashboard tile IDs to run widgets for.+ */+ tile_ids: string+}++export type DashboardsRunWidgetsRetrieveFormat =+ (typeof DashboardsRunWidgetsRetrieveFormat)[keyof typeof DashboardsRunWidgetsRetrieveFormat]++export const DashboardsRunWidgetsRetrieveFormat = {+ Json: 'json',+ Txt: 'txt',+} as const+export type DashboardsSnapshotCreateParams = {format?: DashboardsSnapshotCreateFormat}@@ -7898,6 +8132,18 @@ export const DashboardsUpdateTextTileCreateFormat = {Txt: 'txt',} as const+export type DashboardsWidgetsBatchCreateParams = {+ format?: DashboardsWidgetsBatchCreateFormat+}++export type DashboardsWidgetsBatchCreateFormat =+ (typeof DashboardsWidgetsBatchCreateFormat)[keyof typeof DashboardsWidgetsBatchCreateFormat]++export const DashboardsWidgetsBatchCreateFormat = {+ Json: 'json',+ Txt: 'txt',+} as const+export type DashboardsBulkUpdateTagsCreateParams = {format?: DashboardsBulkUpdateTagsCreateFormat}@@ -7934,6 +8180,18 @@ export const DashboardsCreateUnlistedDashboardCreateFormat = {Txt: 'txt',} as const+export type DashboardsWidgetCatalogRetrieveParams = {+ format?: DashboardsWidgetCatalogRetrieveFormat+}++export type DashboardsWidgetCatalogRetrieveFormat =+ (typeof DashboardsWidgetCatalogRetrieveFormat)[keyof typeof DashboardsWidgetCatalogRetrieveFormat]++export const DashboardsWidgetCatalogRetrieveFormat = {+ Json: 'json',+ Txt: 'txt',+} as const+export type DataColorThemesListParams = {/*** Number of results to return per page.diff --git a/products/dashboards/frontend/generated/api.ts b/products/dashboards/frontend/generated/api.tsindex 4c3391c167b1..7e7493eba235 100644--- a/products/dashboards/frontend/generated/api.ts+++ b/products/dashboards/frontend/generated/api.ts@@ -9,6 +9,8 @@ import { apiMutator } from '../../../../frontend/src/lib/api-orval-mutator'* OpenAPI spec version: 1.0.0*/import type {+ AddDashboardWidgetsBatchRequestApi,+ AddDashboardWidgetsBatchResponseApi,BulkUpdateTagsRequestApi,BulkUpdateTagsResponseApi,CopyDashboardTemplateApi,@@ -34,10 +36,13 @@ import type {DashboardsReorderTilesCreateParams,DashboardsRetrieveParams,DashboardsRunInsightsRetrieveParams,+ DashboardsRunWidgetsRetrieveParams,DashboardsSnapshotCreateParams,DashboardsStreamTilesRetrieveParams,DashboardsUpdateParams,DashboardsUpdateTextTileCreateParams,+ DashboardsWidgetCatalogRetrieveParams,+ DashboardsWidgetsBatchCreateParams,DataColorThemeApi,DataColorThemesListParams,DeleteTileRequestApi,@@ -47,9 +52,12 @@ import type {PatchedDashboardApi,PatchedDashboardTemplateApi,PatchedDataColorThemeApi,+ PatchedMoveTileRequestApi,ReorderTilesRequestApi,RunInsightsResponseApi,+ RunWidgetsResponseApi,UpdateTextTileRequestApi,+ WidgetCatalogResponseApi,} from './api.schemas'// https://stackoverflow.com/questions/49579094/typescript-conditional-types-filter-out-readonly-properties-pick-only-requir/49579497#49579497@@ -505,7 +513,7 @@ export const getDashboardsCopyTileCreateUrl = (}/**- * Copy an existing dashboard tile to another dashboard (insight or text card; new tile row).+ * Copy an existing dashboard tile to another dashboard (insight, text card, or widget tile).*/export const dashboardsCopyTileCreate = async (projectId: string,@@ -624,15 +632,15 @@ export const getDashboardsMoveTilePartialUpdateUrl = (export const dashboardsMoveTilePartialUpdate = async (projectId: string,id: number,- patchedDashboardApi?: NonReadonly<PatchedDashboardApi>,+ patchedMoveTileRequestApi?: PatchedMoveTileRequestApi,params?: DashboardsMoveTilePartialUpdateParams,options?: RequestInit-): Promise<void> => {- return apiMutator<void>(getDashboardsMoveTilePartialUpdateUrl(projectId, id, params), {+): Promise<DashboardApi> => {+ return apiMutator<DashboardApi>(getDashboardsMoveTilePartialUpdateUrl(projectId, id, params), {...options,method: 'PATCH',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedDashboardApi),+ body: JSON.stringify(patchedMoveTileRequestApi),})}@@ -706,6 +714,38 @@ export const dashboardsRunInsightsRetrieve = async (})}+export const getDashboardsRunWidgetsRetrieveUrl = (+ projectId: string,+ id: number,+ params: DashboardsRunWidgetsRetrieveParams+) => {+ const normalizedParams = new URLSearchParams()++ Object.entries(params || {}).forEach(([key, value]) => {+ if (value !== undefined) {+ normalizedParams.append(key, value === null ? 'null' : value.toString())+ }+ })++ const stringifiedParams = normalizedParams.toString()++ return stringifiedParams.length > 0+ ? `/api/projects/${projectId}/dashboards/${id}/run_widgets/?${stringifiedParams}`+ : `/api/projects/${projectId}/dashboards/${id}/run_widgets/`+}++export const dashboardsRunWidgetsRetrieve = async (+ projectId: string,+ id: number,+ params: DashboardsRunWidgetsRetrieveParams,+ options?: RequestInit+): Promise<RunWidgetsResponseApi> => {+ return apiMutator<RunWidgetsResponseApi>(getDashboardsRunWidgetsRetrieveUrl(projectId, id, params), {+ ...options,+ method: 'GET',+ })+}+export const getDashboardsSnapshotCreateUrl = (projectId: string,id: number,@@ -818,6 +858,44 @@ export const dashboardsUpdateTextTileCreate = async (})}+export const getDashboardsWidgetsBatchCreateUrl = (+ projectId: string,+ id: number,+ params?: DashboardsWidgetsBatchCreateParams+) => {+ const normalizedParams = new URLSearchParams()++ Object.entries(params || {}).forEach(([key, value]) => {+ if (value !== undefined) {+ normalizedParams.append(key, value === null ? 'null' : value.toString())+ }+ })++ const stringifiedParams = normalizedParams.toString()++ return stringifiedParams.length > 0+ ? `/api/projects/${projectId}/dashboards/${id}/widgets/batch/?${stringifiedParams}`+ : `/api/projects/${projectId}/dashboards/${id}/widgets/batch/`+}++/**+ * Add multiple widget tiles to a dashboard in one atomic request.+ */+export const dashboardsWidgetsBatchCreate = async (+ projectId: string,+ id: number,+ addDashboardWidgetsBatchRequestApi: AddDashboardWidgetsBatchRequestApi,+ params?: DashboardsWidgetsBatchCreateParams,+ options?: RequestInit+): Promise<AddDashboardWidgetsBatchResponseApi> => {+ return apiMutator<AddDashboardWidgetsBatchResponseApi>(getDashboardsWidgetsBatchCreateUrl(projectId, id, params), {+ ...options,+ method: 'POST',+ headers: { 'Content-Type': 'application/json', ...options?.headers },+ body: JSON.stringify(addDashboardWidgetsBatchRequestApi),+ })+}+export const getDashboardsBulkUpdateTagsCreateUrl = (projectId: string,params?: DashboardsBulkUpdateTagsCreateParams@@ -941,6 +1019,39 @@ export const dashboardsCreateUnlistedDashboardCreate = async (})}+export const getDashboardsWidgetCatalogRetrieveUrl = (+ projectId: string,+ params?: DashboardsWidgetCatalogRetrieveParams+) => {+ const normalizedParams = new URLSearchParams()++ Object.entries(params || {}).forEach(([key, value]) => {+ if (value !== undefined) {+ normalizedParams.append(key, value === null ? 'null' : value.toString())+ }+ })++ const stringifiedParams = normalizedParams.toString()++ return stringifiedParams.length > 0+ ? `/api/projects/${projectId}/dashboards/widget_catalog/?${stringifiedParams}`+ : `/api/projects/${projectId}/dashboards/widget_catalog/`+}++/**+ * List registered dashboard widget types and config hints for agents.+ */+export const dashboardsWidgetCatalogRetrieve = async (+ projectId: string,+ params?: DashboardsWidgetCatalogRetrieveParams,+ options?: RequestInit+): Promise<WidgetCatalogResponseApi> => {+ return apiMutator<WidgetCatalogResponseApi>(getDashboardsWidgetCatalogRetrieveUrl(projectId, params), {+ ...options,+ method: 'GET',+ })+}+export const getDataColorThemesListUrl = (projectId: string, params?: DataColorThemesListParams) => {const normalizedParams = new URLSearchParams()diff --git a/products/dashboards/frontend/generated/api.zod.ts b/products/dashboards/frontend/generated/api.zod.tsindex 36c84f08f9eb..df70b17e089c 100644--- a/products/dashboards/frontend/generated/api.zod.ts+++ b/products/dashboards/frontend/generated/api.zod.ts@@ -289,7 +289,7 @@ export const DashboardsAnalyzeRefreshResultCreateBody = /* @__PURE__ */ zod.describe('Serializer mixin that handles tags for objects.')/**- * Copy an existing dashboard tile to another dashboard (insight or text card; new tile row).+ * Copy an existing dashboard tile to another dashboard (insight, text card, or widget tile).*/export const DashboardsCopyTileCreateBody = /* @__PURE__ */ zod.object({fromDashboardId: zod.number().describe('Dashboard id the tile currently belongs to.'),@@ -357,43 +357,15 @@ export const DashboardsDeleteTileBody = /* @__PURE__ */ zod.object({tile_id: zod.number().describe('ID of the dashboard tile to delete. Use dashboard-get to look up tile IDs.'),})-export const dashboardsMoveTilePartialUpdateBodyNameMax = 400--export const dashboardsMoveTilePartialUpdateBodyDeleteInsightsDefault = false--export const DashboardsMoveTilePartialUpdateBody = /* @__PURE__ */ zod- .object({- name: zod.string().max(dashboardsMoveTilePartialUpdateBodyNameMax).nullish(),- description: zod.string().optional(),- pinned: zod.boolean().optional(),- last_accessed_at: zod.iso.datetime({ offset: true }).nullish(),- deleted: zod.boolean().optional(),- breakdown_colors: zod.unknown().optional().describe('Custom color mapping for breakdown values.'),- data_color_theme_id: zod.number().nullish().describe('ID of the color theme used for chart visualizations.'),- tags: zod.array(zod.unknown()).optional(),- restriction_level: zod- .union([zod.literal(21), zod.literal(37)])- .optional()- .describe(- '\* `21` - Everyone in the project can edit\n\* `37` - Only those invited to this dashboard can edit'- ),- last_refresh: zod.iso.datetime({ offset: true }).nullish(),- quick_filter_ids: zod- .array(zod.string())- .nullish()- .describe('List of quick filter IDs associated with this dashboard'),- use_template: zod- .string()- .optional()- .describe('Template key to create the dashboard from a predefined template.'),- use_dashboard: zod.number().nullish().describe('ID of an existing dashboard to duplicate.'),- delete_insights: zod- .boolean()- .default(dashboardsMoveTilePartialUpdateBodyDeleteInsightsDefault)- .describe('When deleting, also delete insights that are only on this dashboard.'),- _create_in_folder: zod.string().optional(),- })- .describe('Serializer mixin that handles tags for objects.')+export const DashboardsMoveTilePartialUpdateBody = /* @__PURE__ */ zod.object({+ to_dashboard: zod.number().optional().describe('Destination dashboard ID.'),+ tile: zod+ .object({+ id: zod.number().describe('Dashboard tile ID to move.'),+ })+ .optional()+ .describe('Tile to move, identified by its dashboard tile ID.'),+})export const dashboardsReorderTilesCreateBodyLayoutDefault = `preserve`@@ -498,6 +470,146 @@ export const DashboardsUpdateTextTileCreateBody = /* @__PURE__ */ zod.object({.describe('New accent color name, empty string or null to clear. Omit to leave unchanged.'),})+/**+ * Add multiple widget tiles to a dashboard in one atomic request.+ */+export const dashboardsWidgetsBatchCreateBodyWidgetsItemWidgetTypeMax = 64++export const dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneLimitDefault = 10+export const dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneLimitMax = 25++export const dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneOrderByDefault = `occurrences`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneOrderDirectionDefault = `DESC`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneStatusDefault = `active`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemNameMax = 400++export const dashboardsWidgetsBatchCreateBodyWidgetsMax = 10++export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod.object({+ widgets: zod+ .array(+ zod.object({+ widget_type: zod+ .string()+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemWidgetTypeMax)+ .describe(+ 'Widget type identifier. Supported values: error_tracking_list. Use dashboard-widget-catalog-list for config_schema_hints per type.'+ ),+ config: zod+ .object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneLimitMax)+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneLimitDefault)+ .describe('Maximum number of issues to return.'),+ orderBy: zod+ .enum(['last_seen', 'first_seen', 'occurrences', 'users', 'sessions'])+ .describe(+ '\* `last_seen` - last_seen\n\* `first_seen` - first_seen\n\* `occurrences` - occurrences\n\* `users` - users\n\* `sessions` - sessions'+ )+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneOrderByDefault)+ .describe(+ 'Issue ranking column.\n\n\* `first_seen` - first_seen\n\* `last_seen` - last_seen\n\* `occurrences` - occurrences\n\* `sessions` - sessions\n\* `users` - users'+ ),+ orderDirection: zod+ .enum(['ASC', 'DESC'])+ .describe('\* `ASC` - ASC\n\* `DESC` - DESC')+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneOrderDirectionDefault)+ .describe('Sort direction for orderBy.\n\n\* `ASC` - ASC\n\* `DESC` - DESC'),+ status: zod+ .enum(['archived', 'active', 'resolved', 'pending_release', 'suppressed', 'all'])+ .describe(+ '\* `archived` - archived\n\* `active` - active\n\* `resolved` - resolved\n\* `pending_release` - pending_release\n\* `suppressed` - suppressed\n\* `all` - all'+ )+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemConfigOneStatusDefault)+ .describe(+ 'Issue status filter.\n\n\* `archived` - archived\n\* `active` - active\n\* `resolved` - resolved\n\* `pending_release` - pending_release\n\* `suppressed` - suppressed\n\* `all` - all'+ ),+ dateRange: zod+ .union([+ zod.object({+ date_from: zod+ .union([+ zod+ .enum(['-14d', '-1h', '-24h', '-30d', '-3h', '-7d', '-90d'])+ .describe(+ '\* `-14d` - -14d\n\* `-1h` - -1h\n\* `-24h` - -24h\n\* `-30d` - -30d\n\* `-3h` - -3h\n\* `-7d` - -7d\n\* `-90d` - -90d'+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ "Relative lookback window (for example '-7d'). Omit to use the project default range.\n\n\* `-14d` - -14d\n\* `-1h` - -1h\n\* `-24h` - -24h\n\* `-30d` - -30d\n\* `-3h` - -3h\n\* `-7d` - -7d\n\* `-90d` - -90d"+ ),+ }),+ zod.null(),+ ])+ .optional()+ .describe('Optional relative date range override.'),+ filterTestAccounts: zod+ .boolean()+ .optional()+ .describe('When omitted, follows the project default for filtering test accounts.'),+ })+ .describe(+ 'Widget-specific configuration. Shape depends on widget_type; see dashboard-widget-catalog-list for other types. For error_tracking_list, use the schema below (currently the only supported type: error_tracking_list).'+ ),+ name: zod+ .string()+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemNameMax)+ .nullish()+ .describe('Optional custom display name for the widget tile.'),+ description: zod+ .string()+ .optional()+ .describe('Optional markdown description shown when show_description is enabled.'),+ layouts: zod+ .object({+ sm: zod+ .object({+ x: zod+ .number()+ .optional()+ .describe('Column position in the dashboard grid (0-indexed).'),+ y: zod.number().optional().describe('Row position in the dashboard grid (0-indexed).'),+ w: zod+ .number()+ .optional()+ .describe('Width in grid columns. The desktop grid is 12 columns wide.'),+ h: zod.number().optional().describe('Height in grid rows.'),+ })+ .optional()+ .describe('Layout for the standard (desktop) breakpoint. The grid is 12 columns wide.'),+ xs: zod+ .object({+ x: zod+ .number()+ .optional()+ .describe('Column position in the dashboard grid (0-indexed).'),+ y: zod.number().optional().describe('Row position in the dashboard grid (0-indexed).'),+ w: zod+ .number()+ .optional()+ .describe('Width in grid columns. The desktop grid is 12 columns wide.'),+ h: zod.number().optional().describe('Height in grid rows.'),+ })+ .optional()+ .describe('Layout for the small (mobile) breakpoint. The grid is 1 column wide.'),+ })+ .optional()+ .describe('Optional react-grid-layout positions keyed by breakpoint (sm, xs).'),+ show_description: zod+ .boolean()+ .optional()+ .describe('Whether to show the description on the dashboard tile.'),+ })+ )+ .min(1)+ .max(dashboardsWidgetsBatchCreateBodyWidgetsMax)+ .describe('Widget tiles to add atomically (1–10). Use a single-element list to add one widget.'),+})+/*** Bulk update tags on multiple objects.diff --git a/products/dashboards/mcp/tools.yaml b/products/dashboards/mcp/tools.yamlindex e1480431608c..ad4574b2520c 100644--- a/products/dashboards/mcp/tools.yaml+++ b/products/dashboards/mcp/tools.yaml@@ -385,6 +385,9 @@ tools:dashboards-move-tile-partial-update:operation: dashboards_move_tile_partial_updateenabled: false+ dashboards-run-widgets-retrieve:+ operation: dashboards_run_widgets_retrieve+ enabled: falsedashboards-sharing-list:operation: dashboards_sharing_listenabled: false@@ -406,6 +409,12 @@ tools:dashboards-update:operation: dashboards_updateenabled: false+ dashboards-widget-catalog-retrieve:+ operation: dashboards_widget_catalog_retrieve+ enabled: false+ dashboards-widgets-batch-create:+ operation: dashboards_widgets_batch_create+ enabled: falsedata-color-themes-create:operation: data_color_themes_createenabled: falsediff --git a/products/error_tracking/frontend/generated/api.schemas.ts b/products/error_tracking/frontend/generated/api.schemas.tsindex 4df02de04f30..9cac9b2be412 100644--- a/products/error_tracking/frontend/generated/api.schemas.ts+++ b/products/error_tracking/frontend/generated/api.schemas.ts@@ -1012,10 +1012,10 @@ export interface ErrorTrackingIssueEventsResponseApi {* `suppressed` - suppressed* `all` - all*/-export type ErrorTrackingIssuesListQueryRequestStatusEnumApi =- (typeof ErrorTrackingIssuesListQueryRequestStatusEnumApi)[keyof typeof ErrorTrackingIssuesListQueryRequestStatusEnumApi]+export type ErrorTrackingIssueStatusEnumApi =+ (typeof ErrorTrackingIssueStatusEnumApi)[keyof typeof ErrorTrackingIssueStatusEnumApi]-export const ErrorTrackingIssuesListQueryRequestStatusEnumApi = {+export const ErrorTrackingIssueStatusEnumApi = {Archived: 'archived',Active: 'active',Resolved: 'resolved',@@ -1063,7 +1063,7 @@ export interface ErrorTrackingIssuesListQueryRequestApi {* `pending_release` - pending_release* `suppressed` - suppressed* `all` - all */- status?: ErrorTrackingIssuesListQueryRequestStatusEnumApi+ status?: ErrorTrackingIssueStatusEnumApi/** Filter by issue assignee. Omit to include all assignees. */assignee?: ErrorTrackingAssigneeApi | null/** When true, exclude internal/test account data from results. Defaults to true. */diff --git a/products/feature_flags/backend/models/feature_flag.py b/products/feature_flags/backend/models/feature_flag.pyindex ad17f62e9233..955a311694c4 100644--- a/products/feature_flags/backend/models/feature_flag.py+++ b/products/feature_flags/backend/models/feature_flag.py@@ -31,8 +31,12 @@ FIVE_DAYS = 60 * 60 * 24 * 5 # 5 days in secondslogger = structlog.get_logger(__name__)if TYPE_CHECKING:+ from django.db.models.fields.related_descriptors import RelatedManager+from posthog.models.team import Team+ from products.feature_flags.backend.models.evaluation_context import FeatureFlagEvaluationContext+def default_filters() -> dict:return {"groups": []}@@ -44,6 +48,10 @@ class FeatureFlagManager(RootTeamManager):class FeatureFlag(FileSystemSyncMixin, ModelActivityMixin, RootTeamMixin, models.Model):+ # Reverse relation from FeatureFlagEvaluationContext.feature_flag (related_name="flag_evaluation_contexts").+ if TYPE_CHECKING:+ flag_evaluation_contexts: RelatedManager[FeatureFlagEvaluationContext]+# When adding new fields, make sure to update organization_feature_flags.py::copy_flagskey = models.CharField(max_length=400)name = models.TextField(diff --git a/products/platform_features/frontend/generated/api.schemas.ts b/products/platform_features/frontend/generated/api.schemas.tsindex 1ca4cfb9e723..ad9fbec0f853 100644--- a/products/platform_features/frontend/generated/api.schemas.ts+++ b/products/platform_features/frontend/generated/api.schemas.ts@@ -892,6 +892,7 @@ export type ActivityLogListParams = {* `Log` - Log* `LogsAlertConfiguration` - LogsAlertConfiguration* `LogsExclusionRule` - LogsExclusionRule+* `DashboardWidget` - DashboardWidget* `ProductTour` - ProductTour* `Ticket` - Ticket* `InstanceSetting` - InstanceSetting@@ -968,6 +969,7 @@ export const ActivityLogListScope = {Log: 'Log',LogsAlertConfiguration: 'LogsAlertConfiguration',LogsExclusionRule: 'LogsExclusionRule',+ DashboardWidget: 'DashboardWidget',ProductTour: 'ProductTour',Ticket: 'Ticket',InstanceSetting: 'InstanceSetting',@@ -1031,6 +1033,7 @@ export const ActivityLogListScope = {* `Log` - Log* `LogsAlertConfiguration` - LogsAlertConfiguration* `LogsExclusionRule` - LogsExclusionRule+ * `DashboardWidget` - DashboardWidget* `ProductTour` - ProductTour* `Ticket` - Ticket* `InstanceSetting` - InstanceSetting@@ -1095,6 +1098,7 @@ export const ActivityLogListScopesItem = {Log: 'Log',LogsAlertConfiguration: 'LogsAlertConfiguration',LogsExclusionRule: 'LogsExclusionRule',+ DashboardWidget: 'DashboardWidget',ProductTour: 'ProductTour',Ticket: 'Ticket',InstanceSetting: 'InstanceSetting',diff --git a/products/product_analytics/backend/test/test_insight_activity_logging.py b/products/product_analytics/backend/test/test_insight_activity_logging.pyindex 627761c37264..5ab63bfd583c 100644--- a/products/product_analytics/backend/test/test_insight_activity_logging.py+++ b/products/product_analytics/backend/test/test_insight_activity_logging.py@@ -31,6 +31,9 @@ class TestChangesBetweenInsights(BaseTest):{"dashboard": {"id": dashboard.id, "name": dashboard.name},"insight": {"id": insight_after.id},+ "text": None,+ "button_tile": None,+ "widget": None,}],),diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 21ff7c844c1a..e0eea881cc6e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -3756,3546 +3756,2710 @@ export namespace Schemas {version?: number | null;}- export interface AddOptOutRequest {- /**- * The recipient identifier to opt out (e.g. email address).- * @maxLength 512- */- identifier: string;- /** Optional message category key. If omitted, the recipient is opted out of all marketing messages. */- category_key?: string;- }-- export type AddSnapshotsInputBaselineHashes = {[key: string]: string};-- export type SnapshotManifestItemMetadata = { [key: string]: unknown };-- export interface SnapshotManifestItem {- identifier: string;- content_hash: string;- /** @nullable */- width?: number | null;- /** @nullable */- height?: number | null;- metadata?: SnapshotManifestItemMetadata;- }-- export interface AddSnapshotsInput {- snapshots: SnapshotManifestItem[];- baseline_hashes?: AddSnapshotsInputBaselineHashes;- }-- export type UploadTargetFields = {[key: string]: string};-- export interface UploadTarget {- content_hash: string;- url: string;- fields: UploadTargetFields;- }-- export interface AddSnapshotsResult {- added: number;- uploads: UploadTarget[];- }-/**- * * `product_analytics` - product_analytics- * `sql` - sql- * `session_replay` - session_replay- * `error_tracking` - error_tracking- * `plan` - plan- * `execution` - execution- * `survey` - survey- * `research` - research- * `flags` - flags- * `llm_analytics` - llm_analytics- * `sandbox` - sandbox- * `user_interview` - user_interview+ * * `last_seen` - last_seen+ * `first_seen` - first_seen+ * `occurrences` - occurrences+ * `users` - users+ * `sessions` - sessions*/- export type AgentModeEnum = typeof AgentModeEnum[keyof typeof AgentModeEnum];+ export type ErrorTrackingIssueOrderByEnum = typeof ErrorTrackingIssueOrderByEnum[keyof typeof ErrorTrackingIssueOrderByEnum];- export const AgentModeEnum = {- ProductAnalytics: 'product_analytics',- Sql: 'sql',- SessionReplay: 'session_replay',- ErrorTracking: 'error_tracking',- Plan: 'plan',- Execution: 'execution',- Survey: 'survey',- Research: 'research',- Flags: 'flags',- LlmAnalytics: 'llm_analytics',- Sandbox: 'sandbox',- UserInterview: 'user_interview',+ export const ErrorTrackingIssueOrderByEnum = {+ LastSeen: 'last_seen',+ FirstSeen: 'first_seen',+ Occurrences: 'occurrences',+ Users: 'users',+ Sessions: 'sessions',} as const;- export interface AggregatedSpanRow {- avg_duration_nano: number;- count: number;- error_count: number;- name: string;- p50_duration_nano: number;- p95_duration_nano: number;- service_name: string;- total_duration_nano: number;- }-/**- * * `sum` - sum- * `avg` - avg- * `count` - count- * `p95` - p95+ * * `ASC` - ASC+ * `DESC` - DESC*/- export type AggregationEnum = typeof AggregationEnum[keyof typeof AggregationEnum];--- export const AggregationEnum = {- Sum: 'sum',- Avg: 'avg',- Count: 'count',- P95: 'p95',- } as const;-- export interface InsightsThresholdBounds {- /** Alert fires when the value drops below this number. */- lower?: number | null;- /** Alert fires when the value exceeds this number. */- upper?: number | null;- }-- export type InsightThresholdType = typeof InsightThresholdType[keyof typeof InsightThresholdType];--- export const InsightThresholdType = {- Absolute: 'absolute',- Percentage: 'percentage',- } as const;-- export interface InsightThreshold {- bounds?: InsightsThresholdBounds | null;- /** Whether bounds are compared as absolute values or as percentage change from the previous interval. */- type: InsightThresholdType;- }-- export interface Threshold {- readonly id: string;- readonly created_at: string;- /** Optional name for the threshold. */- name?: string;- /** Threshold bounds and type. Includes bounds (lower/upper floats) and type (absolute or percentage). */- configuration: InsightThreshold;- }-- export type AlertConditionType = typeof AlertConditionType[keyof typeof AlertConditionType];+ export type OrderDirectionEnum = typeof OrderDirectionEnum[keyof typeof OrderDirectionEnum];- export const AlertConditionType = {- AbsoluteValue: 'absolute_value',- RelativeIncrease: 'relative_increase',- RelativeDecrease: 'relative_decrease',+ export const OrderDirectionEnum = {+ Asc: 'ASC',+ Desc: 'DESC',} as const;- export interface AlertCondition {- type: AlertConditionType;- }-/**- * * `Firing` - Firing- * `Not firing` - Not firing- * `Errored` - Errored- * `Snoozed` - Snoozed+ * * `archived` - archived+ * `active` - active+ * `resolved` - resolved+ * `pending_release` - pending_release+ * `suppressed` - suppressed+ * `all` - all*/- export type AlertCheckStateEnum = typeof AlertCheckStateEnum[keyof typeof AlertCheckStateEnum];+ export type ErrorTrackingIssueStatusEnum = typeof ErrorTrackingIssueStatusEnum[keyof typeof ErrorTrackingIssueStatusEnum];- export const AlertCheckStateEnum = {- Firing: 'Firing',- NotFiring: 'Not firing',- Errored: 'Errored',- Snoozed: 'Snoozed',+ export const ErrorTrackingIssueStatusEnum = {+ Archived: 'archived',+ Active: 'active',+ Resolved: 'resolved',+ PendingRelease: 'pending_release',+ Suppressed: 'suppressed',+ All: 'all',} as const;/**- * * `pending` - pending- * `running` - running- * `done` - done- * `failed` - failed- * `skipped` - skipped+ * * `-14d` - -14d+ * `-1h` - -1h+ * `-24h` - -24h+ * `-30d` - -30d+ * `-3h` - -3h+ * `-7d` - -7d+ * `-90d` - -90d*/- export type InvestigationStatusEnum = typeof InvestigationStatusEnum[keyof typeof InvestigationStatusEnum];+ export type DateFromEnum = typeof DateFromEnum[keyof typeof DateFromEnum];- export const InvestigationStatusEnum = {- Pending: 'pending',- Running: 'running',- Done: 'done',- Failed: 'failed',- Skipped: 'skipped',+ export const DateFromEnum = {+ '14d': '-14d',+ '1h': '-1h',+ '24h': '-24h',+ '30d': '-30d',+ '3h': '-3h',+ '7d': '-7d',+ '90d': '-90d',} as const;- /**- * * `true_positive` - true_positive- * `false_positive` - false_positive- * `inconclusive` - inconclusive- */- export type InvestigationVerdictEnum = typeof InvestigationVerdictEnum[keyof typeof InvestigationVerdictEnum];+ export interface WidgetDateRange {+ /** Relative lookback window (for example '-7d'). Omit to use the project default range.+ * `-14d` - -14d+ * `-1h` - -1h+ * `-24h` - -24h+ * `-30d` - -30d+ * `-3h` - -3h+ * `-7d` - -7d+ * `-90d` - -90d */+ date_from?: DateFromEnum | null;+ }- export const InvestigationVerdictEnum = {- TruePositive: 'true_positive',- FalsePositive: 'false_positive',- Inconclusive: 'inconclusive',- } as const;-- export interface AlertCheck {- readonly id: string;- readonly created_at: string;- /** @nullable */- readonly calculated_value: number | null;- readonly state: AlertCheckStateEnum;- readonly targets_notified: boolean;- readonly anomaly_scores: unknown;- readonly triggered_points: unknown;- readonly triggered_dates: unknown;- /** @nullable */- readonly interval: string | null;- readonly triggered_metadata: unknown;- readonly investigation_status: InvestigationStatusEnum | null;- readonly investigation_verdict: InvestigationVerdictEnum | null;- /** @nullable */- readonly investigation_summary: string | null;+ export interface ErrorTrackingListWidgetConfig {/**- * Short ID of the Notebook produced by the investigation agent, when the agent ran for this check.- * @nullable+ * Maximum number of issues to return.+ * @minimum 1+ * @maximum 25*/- readonly investigation_notebook_short_id: string | null;- /** @nullable */- readonly notification_sent_at: string | null;- readonly notification_suppressed_by_agent: boolean;- }-- export interface TrendsAlertConfig {- /** When true, evaluate the current (still incomplete) time interval in addition to completed ones. */- check_ongoing_interval?: boolean | null;- /** Zero-based index of the series in the insight's query to monitor. */- series_index: number;- type?: 'TrendsAlertConfig';- }-- export interface PreprocessingConfig {- /** Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0) */- diffs_n?: number | null;- /** Number of lag features. 0 = none, >0 = include n lagged values (default: 0) */- lags_n?: number | null;- /** Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0) */- smooth_n?: number | null;- }+ limit?: number;+ /** Issue ranking column.- export interface ZScoreDetectorConfig {- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9) */- threshold?: number | null;- type?: 'zscore';- /** Rolling window size for calculating mean/std (default: 30) */- window?: number | null;- }+ * `first_seen` - first_seen+ * `last_seen` - last_seen+ * `occurrences` - occurrences+ * `sessions` - sessions+ * `users` - users */+ orderBy?: ErrorTrackingIssueOrderByEnum;+ /** Sort direction for orderBy.- export interface MADDetectorConfig {- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9) */- threshold?: number | null;- type?: 'mad';- /** Rolling window size for calculating median/MAD (default: 30) */- window?: number | null;- }+ * `ASC` - ASC+ * `DESC` - DESC */+ orderDirection?: OrderDirectionEnum;+ /** Issue status filter.- export interface IQRDetectorConfig {- /** IQR multiplier for fence calculation (default: 1.5, use 3.0 for far outliers) */- multiplier?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- type?: 'iqr';- /** Rolling window size for calculating quartiles (default: 30) */- window?: number | null;+ * `archived` - archived+ * `active` - active+ * `resolved` - resolved+ * `pending_release` - pending_release+ * `suppressed` - suppressed+ * `all` - all */+ status?: ErrorTrackingIssueStatusEnum;+ /** Optional relative date range override. */+ dateRange?: WidgetDateRange | null;+ /** When omitted, follows the project default for filtering test accounts. */+ filterTestAccounts?: boolean;}- export interface ThresholdDetectorConfig {- /** Lower bound - values below this are anomalies */- lower_bound?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- type?: 'threshold';- /** Upper bound - values above this are anomalies */- upper_bound?: number | null;+ export interface TileLayoutBox {+ /** Column position in the dashboard grid (0-indexed). */+ x?: number;+ /** Row position in the dashboard grid (0-indexed). */+ y?: number;+ /** Width in grid columns. The desktop grid is 12 columns wide. */+ w?: number;+ /** Height in grid rows. */+ h?: number;}- export interface ECODDetectorConfig {- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'ecod';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;+ export interface TileLayouts {+ /** Layout for the standard (desktop) breakpoint. The grid is 12 columns wide. */+ sm?: TileLayoutBox;+ /** Layout for the small (mobile) breakpoint. The grid is 1 column wide. */+ xs?: TileLayoutBox;}- export interface COPODDetectorConfig {- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'copod';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;+ export interface AddDashboardWidgetRequest {+ /**+ * Widget type identifier. Supported values: error_tracking_list. Use dashboard-widget-catalog-list for config_schema_hints per type.+ * @maxLength 64+ */+ widget_type: string;+ /** Widget-specific configuration. Shape depends on widget_type; see dashboard-widget-catalog-list for other types. For error_tracking_list, use the schema below (currently the only supported type: error_tracking_list). */+ config: ErrorTrackingListWidgetConfig;+ /**+ * Optional custom display name for the widget tile.+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** Optional markdown description shown when show_description is enabled. */+ description?: string;+ /** Optional react-grid-layout positions keyed by breakpoint (sm, xs). */+ layouts?: TileLayouts;+ /** Whether to show the description on the dashboard tile. */+ show_description?: boolean;}- export interface IsolationForestDetectorConfig {- /** Number of trees in the forest (default: 100) */- n_estimators?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'isolation_forest';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;+ export interface AddDashboardWidgetsBatchRequest {+ /**+ * Widget tiles to add atomically (1–10). Use a single-element list to add one widget.+ * @minItems 1+ * @maxItems 10+ */+ widgets: AddDashboardWidgetRequest[];}- export type Method = typeof Method[keyof typeof Method];+ export type InsightVizNodeKind = typeof InsightVizNodeKind[keyof typeof InsightVizNodeKind];- export const Method = {- Largest: 'largest',- Mean: 'mean',- Median: 'median',+ export const InsightVizNodeKind = {+ InsightVizNode: 'InsightVizNode',} as const;- export interface KNNDetectorConfig {- /** Distance method: 'largest', 'mean', 'median' (default: 'largest') */- method?: Method | null;- /** Number of neighbors to consider (default: 5) */- n_neighbors?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'knn';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;- }-- export interface HBOSDetectorConfig {- /** Number of histogram bins (default: 10) */- n_bins?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'hbos';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;- }-- export interface LOFDetectorConfig {- /** Number of neighbors for LOF (default: 20) */- n_neighbors?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'lof';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;+ export interface Retention {+ hideLineGraph?: boolean | null;+ hideSizeColumn?: boolean | null;+ useSmallLayout?: boolean | null;}- export interface OCSVMDetectorConfig {- /** SVM kernel type (default: "rbf") */- kernel?: string | null;- /** Upper bound on training errors fraction (default: 0.1) */- nu?: number | null;- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'ocsvm';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;+ export interface VizSpecificOptions {+ ActionsPie?: ActionsPie | null;+ RETENTION?: Retention | null;}- export interface PCADetectorConfig {- /** Preprocessing transforms applied before detection */- preprocessing?: PreprocessingConfig | null;- /** Anomaly probability threshold (default: 0.9) */- threshold?: number | null;- type?: 'pca';- /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */- window?: number | null;+ export interface InsightVizNode {+ /** Query is embedded inside another bordered component */+ embedded?: boolean | null;+ /** Show with most visual options enabled. Used in insight scene. */+ full?: boolean | null;+ hidePersonsModal?: boolean | null;+ hideTooltipOnScroll?: boolean | null;+ kind: InsightVizNodeKind;+ showCorrelationTable?: boolean | null;+ showFilters?: boolean | null;+ showHeader?: boolean | null;+ showLastComputation?: boolean | null;+ showLastComputationRefresh?: boolean | null;+ showResults?: boolean | null;+ showTable?: boolean | null;+ source: TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | StickinessQuery | LifecycleQuery | WebStatsTableQuery | WebOverviewQuery;+ suppressSessionAnalysisWarning?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ vizSpecificOptions?: VizSpecificOptions | null;}- export type EnsembleOperator = typeof EnsembleOperator[keyof typeof EnsembleOperator];+ export type DataTableNodeViewPropsContextType = typeof DataTableNodeViewPropsContextType[keyof typeof DataTableNodeViewPropsContextType];- export const EnsembleOperator = {- And: 'and',- Or: 'or',+ export const DataTableNodeViewPropsContextType = {+ EventDefinition: 'event_definition',+ TeamColumns: 'team_columns',} as const;- export interface EnsembleDetectorConfig {- /** Sub-detector configurations (minimum 2) */- detectors: (ZScoreDetectorConfig | MADDetectorConfig | IQRDetectorConfig | ThresholdDetectorConfig | ECODDetectorConfig | COPODDetectorConfig | IsolationForestDetectorConfig | KNNDetectorConfig | HBOSDetectorConfig | LOFDetectorConfig | OCSVMDetectorConfig | PCADetectorConfig)[];- /** How to combine sub-detector results */- operator: EnsembleOperator;- type?: 'ensemble';+ export interface DataTableNodeViewPropsContext {+ eventDefinitionId?: string | null;+ type: DataTableNodeViewPropsContextType;}- /**- * Detector configuration types- */- export type DetectorConfig = EnsembleDetectorConfig | ZScoreDetectorConfig | MADDetectorConfig | IQRDetectorConfig | ThresholdDetectorConfig | ECODDetectorConfig | COPODDetectorConfig | IsolationForestDetectorConfig | KNNDetectorConfig | HBOSDetectorConfig | LOFDetectorConfig | OCSVMDetectorConfig | PCADetectorConfig;-- /**- * * `every_15_minutes` - every_15_minutes- * `hourly` - hourly- * `daily` - daily- * `weekly` - weekly- * `monthly` - monthly- */- export type CalculationIntervalEnum = typeof CalculationIntervalEnum[keyof typeof CalculationIntervalEnum];+ export type DataTableNodeKind = typeof DataTableNodeKind[keyof typeof DataTableNodeKind];- export const CalculationIntervalEnum = {- Every15Minutes: 'every_15_minutes',- Hourly: 'hourly',- Daily: 'daily',- Weekly: 'weekly',- Monthly: 'monthly',+ export const DataTableNodeKind = {+ DataTableNode: 'DataTableNode',} as const;- export interface AlertScheduleRestrictionWindow {- /** Start time HH:MM (24-hour, project timezone). Inclusive. Each window must span ≥ 30 minutes on the local daily timeline (half-open [start, end)). */- start: string;- /** End time HH:MM (24-hour). Exclusive (half-open interval). Each window must span ≥ 30 minutes locally. */- end: string;- }-- export interface AlertScheduleRestriction {- /** Blocked local time windows when the alert must not run. Overlapping or identical windows are merged when saved. At most five windows before normalization; empty array clears quiet hours. */- blocked_windows: AlertScheduleRestrictionWindow[];+ export interface Response {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Cursor for fetching the next page of results */+ nextCursor?: string | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- /**- * * `notify` - Notify- * `suppress` - Suppress- */- export type InvestigationInconclusiveActionEnum = typeof InvestigationInconclusiveActionEnum[keyof typeof InvestigationInconclusiveActionEnum];-+ export interface Response1 {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ limit: number;+ missing_actors_count?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset: number;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: string[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export const InvestigationInconclusiveActionEnum = {- Notify: 'notify',- Suppress: 'suppress',- } as const;+ export interface Response2 {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ kind?: 'GroupsQuery';+ limit: number;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset: number;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export interface Alert {- readonly id: string;- readonly created_by: UserBasic;- readonly created_at: string;- /** Insight ID monitored by this alert. Note: Response returns full InsightBasicSerializer object. */- insight: number;- /** Human-readable name for the alert. */- name?: string;- /** User IDs to subscribe to this alert. Note: Response returns full UserBasicSerializer object. */- subscribed_users: number[];- /** Threshold configuration with bounds and type for evaluating the alert. */- threshold: Threshold;- /** Alert condition type. Determines how the value is evaluated: absolute_value, relative_increase, or relative_decrease. */- condition?: AlertCondition | null;- /** Current alert state: Firing, Not firing, Errored, or Snoozed. */- readonly state: string;- /** Whether the alert is actively being evaluated. */- enabled?: boolean;- /** @nullable */- readonly last_notified_at: string | null;- /** @nullable */- readonly last_checked_at: string | null;- /** @nullable */- readonly next_check_at: string | null;- /** Alert check results. By default returns the last 5. Use checks_date_from and checks_date_to (e.g. '-24h', '-7d') to get checks within a time window, checks_limit to cap how many are returned (default 5, max 500), and checks_offset to skip the newest N checks for pagination (0-based). Newest checks first. Only populated on retrieve. */- readonly checks: readonly AlertCheck[];- /**- * Total alert checks matching the retrieve filters (date window). Only set on alert retrieve; omitted otherwise.- * @nullable- */- readonly checks_total: number | null;- /** Trends-specific alert configuration. Includes series_index (which series to monitor) and check_ongoing_interval (whether to check the current incomplete interval). */- config?: TrendsAlertConfig | null;- detector_config?: DetectorConfig | null;- /** How often the alert is checked: every 15 minutes (Boost+), hourly, daily, weekly, or monthly.+ export interface Response3 {+ /** Executed ClickHouse query */+ clickhouse?: string | null;+ /** Returned columns */+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Query explanation output */+ explain?: string[] | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Query metadata output */+ metadata?: HogQLMetadataResponse | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Input query string */+ query?: string | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Types of returned columns */+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- * `every_15_minutes` - every_15_minutes- * `hourly` - hourly- * `daily` - daily- * `weekly` - weekly- * `monthly` - monthly */- calculation_interval?: CalculationIntervalEnum;- /**- * Snooze the alert until this time. Pass a relative date string (e.g. '2h', '1d') or null to unsnooze.- * @nullable- */- snoozed_until?: string | null;- /**- * Skip alert evaluation on weekends (Saturday and Sunday, local to project timezone).- * @nullable- */- skip_weekend?: boolean | null;- /** Blocked local time windows (HH:MM in the project timezone). Interval is half-open [start, end): start inclusive, end exclusive. Use blocked_windows array of {start, end}. Null disables. */- schedule_restriction?: AlertScheduleRestriction | null;- /**- * The last calculated value from the most recent alert check.- * @nullable- */- readonly last_value: number | null;- /** When enabled, an investigation agent runs on the state transition to firing and writes findings to a Notebook linked from the alert check. Only effective for detector-based (anomaly) alerts. */- investigation_agent_enabled?: boolean;- /** When enabled (and investigation_agent_enabled is on), notification dispatch is held until the investigation agent produces a verdict. Notifications are suppressed when the verdict is false_positive (and optionally when inconclusive). A safety-net task force-fires after a few minutes if the investigation stalls. */- investigation_gates_notifications?: boolean;- /** How to handle an 'inconclusive' verdict when notifications are gated. 'notify' is the safe default — an agent that can't be sure is itself useful signal.+ export interface Response4 {+ dateFrom?: string | null;+ dateTo?: string | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: WebOverviewItem[];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ usedLazyPrecompute?: boolean | null;+ usedPreAggregatedTables?: boolean | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- * `notify` - Notify- * `suppress` - Suppress */- investigation_inconclusive_action?: InvestigationInconclusiveActionEnum;+ export interface Response5 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ usedLazyPrecompute?: boolean | null;+ usedPreAggregatedTables?: boolean | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface AlertSimulate {- /** Insight ID to simulate the detector on. */- insight: number;- /** Detector configuration to simulate. */- detector_config: DetectorConfig;- /** Zero-based index of the series to analyze. */- series_index?: number;- /**- * Relative date string for how far back to simulate (e.g. '-24h', '-30d', '-4w'). If not provided, uses the detector's minimum required samples.- * @nullable- */- date_from?: string | null;+ export interface Response6 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export type AlertSimulateResponseSubDetectorScoresItem = { [key: string]: unknown };+ export interface Response7 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Whether the response was served from the lazy precompute path. */+ usedLazyPrecompute?: boolean | null;+ /** Whether the response was served from a precomputed table. */+ usedPreAggregatedTables?: boolean | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export type BreakdownSimulationResultSubDetectorScoresItem = { [key: string]: unknown };+ export interface WebVitalsPathBreakdownResultItem {+ path: string;+ value: number;+ }- export interface BreakdownSimulationResult {- /** Breakdown value label. */- label: string;- /** Data values for each point. */- data: number[];- /** Date labels for each point. */- dates: string[];- /** Anomaly score for each point. */- scores: (number | null)[];- /** Indices of points flagged as anomalies. */- triggered_indices: number[];- /** Dates of points flagged as anomalies. */- triggered_dates: string[];- /** Total number of data points analyzed. */- total_points: number;- /** Number of anomalies detected. */- anomaly_count: number;- /** Per-sub-detector scores for ensemble detectors. */- sub_detector_scores?: BreakdownSimulationResultSubDetectorScoresItem[];+ export interface WebVitalsPathBreakdownResult {+ good: WebVitalsPathBreakdownResultItem[];+ needs_improvements: WebVitalsPathBreakdownResultItem[];+ poor: WebVitalsPathBreakdownResultItem[];}- export interface AlertSimulateResponse {- /** Data values for each point. */- data: number[];- /** Date labels for each point. */- dates: string[];- /** Anomaly score for each point (null if insufficient data). */- scores: (number | null)[];- /** Indices of points flagged as anomalies. */- triggered_indices: number[];- /** Dates of points flagged as anomalies. */- triggered_dates: string[];+ export interface Response8 {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;/**- * Interval of the trends query (hour, day, week, month).- * @nullable+ * @minItems 1+ * @maxItems 1*/- interval: string | null;- /** Total number of data points analyzed. */- total_points: number;- /** Number of anomalies detected. */- anomaly_count: number;- /** Per-sub-detector scores for ensemble detectors. Each entry has 'type' and 'scores' fields. */- sub_detector_scores?: AlertSimulateResponseSubDetectorScoresItem[];- /** Per-breakdown-value simulation results. Present only when the insight has breakdowns (up to 25 values). */- breakdown_results?: BreakdownSimulationResult[];+ results: WebVitalsPathBreakdownResult[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ usedLazyPrecompute?: boolean | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- /**- * * `USR` - user- * `GIT` - GitHub- */- export type CreationTypeEnum = typeof CreationTypeEnum[keyof typeof CreationTypeEnum];--- export const CreationTypeEnum = {- Usr: 'USR',- Git: 'GIT',- } as const;-- /**- * * `dashboard_item` - insight- * `dashboard` - dashboard- * `project` - project- * `organization` - organization- * `recording` - recording- */- export type AnnotationScopeEnum = typeof AnnotationScopeEnum[keyof typeof AnnotationScopeEnum];--- export const AnnotationScopeEnum = {- DashboardItem: 'dashboard_item',- Dashboard: 'dashboard',- Project: 'project',- Organization: 'organization',- Recording: 'recording',- } as const;+ export interface Response9 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export interface Annotation {- readonly id: number;- /**- * Annotation text shown on charts to describe the change, release, or incident.- * @maxLength 8192- * @nullable- */- content?: string | null;- /**- * When this annotation happened (ISO 8601 timestamp). Used to position it on charts.- * @nullable- */- date_marker?: string | null;- /** Who created this annotation. Use `USR` for user-created notes and `GIT` for bot/deployment notes.+ export interface Response10 {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- * `USR` - user- * `GIT` - GitHub */- creation_type?: CreationTypeEnum;- /** @nullable */- dashboard_item?: number | null;- /** @nullable */- dashboard_id?: number | null;- /** @nullable */- readonly dashboard_name: string | null;- /** @nullable */- readonly insight_short_id: string | null;- /** @nullable */- readonly insight_name: string | null;- /** @nullable */- readonly insight_derived_name: string | null;- readonly created_by: UserBasic;- /** @nullable */- readonly created_at: string | null;- readonly updated_at: string;- /** Soft-delete flag. Set to true to hide the annotation, or false to restore it. */- deleted?: boolean;- /** Annotation visibility scope: `project`, `organization`, `dashboard`, or `dashboard_item`. `recording` is deprecated and rejected.+ export interface Response11 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- * `dashboard_item` - insight- * `dashboard` - dashboard- * `project` - project- * `organization` - organization- * `recording` - recording */- scope?: AnnotationScopeEnum;+ export interface Response12 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface AppMetricSeries {- name: string;- values: number[];+ export interface RevenueAnalyticsMRRQueryResultItem {+ churn: unknown;+ contraction: unknown;+ expansion: unknown;+ new: unknown;+ total: unknown;}- export interface AppMetricsResponse {- labels: string[];- series: AppMetricSeries[];+ export interface Response13 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: RevenueAnalyticsMRRQueryResultItem[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export type AppMetricsTotalsResponseTotals = {[key: string]: number};+ export type RevenueAnalyticsOverviewItemKey = typeof RevenueAnalyticsOverviewItemKey[keyof typeof RevenueAnalyticsOverviewItemKey];- export interface AppMetricsTotalsResponse {- totals: AppMetricsTotalsResponseTotals;- }- /**- * Serializer for individual transcript segments from AssemblyAI- */- export interface TranscriptSegment {- /**- * Milliseconds from recording start- * @nullable- */- timestamp?: number | null;- /** @nullable */- speaker?: string | null;- text: string;- /**- * Transcription confidence score- * @nullable- */- confidence?: number | null;- /**- * Whether this is the final version- * @nullable- */- is_final?: boolean | null;+ export const RevenueAnalyticsOverviewItemKey = {+ Revenue: 'revenue',+ PayingCustomerCount: 'paying_customer_count',+ AvgRevenuePerCustomer: 'avg_revenue_per_customer',+ } as const;++ export interface RevenueAnalyticsOverviewItem {+ key: RevenueAnalyticsOverviewItemKey;+ value: number;}- /**- * Serializer for appending transcript segments (supports batched real-time uploads)- */- export interface AppendSegments {- /** @minItems 1 */- segments: TranscriptSegment[];+ export interface Response14 {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: RevenueAnalyticsOverviewItem[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface ApprovalPolicy {- readonly id: string;- /** @maxLength 128 */- action_key: string;- conditions?: unknown;- approver_config: unknown;- allow_self_approve?: boolean;- bypass_org_membership_levels?: unknown;- bypass_roles?: string[];- /** Auto-expire change requests after this duration */- expires_after?: string;- enabled?: boolean;- readonly created_by: UserBasic;- readonly created_at: string;- /** @nullable */- readonly updated_at: string | null;+ export interface Response15 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface ApproveSnapshotInput {- /** The snapshot identifier to approve (e.g. Storybook story id plus theme). */- identifier: string;- /** The content hash of the new baseline image to record for this identifier. */- new_hash: string;+ export interface Response16 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface ApproveRunRequestInput {- /** Specific snapshots to approve, each with `identifier` and `new_hash`. Ignored when `approve_all` is true. */- snapshots?: ApproveSnapshotInput[];- /** Approve every changed and new snapshot in the run. Mutually exclusive with `snapshots` — pass one or the other. */- approve_all?: boolean;- /** Whether to commit the updated baseline YAML to the PR branch on GitHub. Set to false to record the approval without pushing a commit. */- commit_to_github?: boolean;+ export interface MarketingAnalyticsItem {+ changeFromPreviousPct?: number | null;+ hasComparison?: boolean | null;+ isIncreaseBad?: boolean | null;+ key: string;+ kind: WebAnalyticsItemKind;+ previous?: number | string | null;+ value?: number | string | null;}- export interface Artifact {- id: string;- content_hash: string;- /** @nullable */- width: number | null;- /** @nullable */- height: number | null;- /** @nullable */- download_url: string | null;+ export interface Response18 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MarketingAnalyticsItem[][];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- /**- * * `user` - user- * `role` - role- */- export type AssigneeTypeEnum = typeof AssigneeTypeEnum[keyof typeof AssigneeTypeEnum];+ export type Response19Results = {[key: string]: MarketingAnalyticsItem};+ export interface Response19 {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: Response19Results;+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export const AssigneeTypeEnum = {+ export interface Response20 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MarketingAnalyticsItem[][];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }++ export interface VolumeBucket {+ label: string;+ value: number;+ }++ export interface ErrorTrackingIssueAggregations {+ occurrences: number;+ sessions: number;+ users: number;+ volumeRange?: number[] | null;+ volume_buckets: VolumeBucket[];+ }++ export type ErrorTrackingIssueAssigneeType = typeof ErrorTrackingIssueAssigneeType[keyof typeof ErrorTrackingIssueAssigneeType];+++ export const ErrorTrackingIssueAssigneeType = {User: 'user',Role: 'role',} as const;- export interface AsyncDeletionStatus {- /** The UUID of the person whose events are queued for deletion. */- person_uuid: string;- /** When the deletion was requested. */- created_at: string;- /** Current status: 'pending' or 'completed'. */- readonly status: string;- /**- * When the deletion was verified complete. Null if still pending.- * @nullable- */- delete_verified_at: string | null;+ export interface ErrorTrackingIssueAssignee {+ id: string | number;+ type: ErrorTrackingIssueAssigneeType;}- /**- * * `first_touch` - First Touch- * `last_touch` - Last Touch- * `linear` - Linear- * `time_decay` - Time Decay- * `position_based` - Position Based- */- export type AttributionModeEnum = typeof AttributionModeEnum[keyof typeof AttributionModeEnum];+ export interface ErrorTrackingIssueCohort {+ id: number;+ name: string;+ }+ export type IntegrationKind = typeof IntegrationKind[keyof typeof IntegrationKind];- export const AttributionModeEnum = {- FirstTouch: 'first_touch',- LastTouch: 'last_touch',++ export const IntegrationKind = {+ Slack: 'slack',+ SlackPosthogCode: 'slack-posthog-code',+ Salesforce: 'salesforce',+ Hubspot: 'hubspot',+ GooglePubsub: 'google-pubsub',+ GoogleCloudServiceAccount: 'google-cloud-service-account',+ GoogleCloudStorage: 'google-cloud-storage',+ GoogleAds: 'google-ads',+ GoogleSheets: 'google-sheets',+ LinkedinAds: 'linkedin-ads',+ Snapchat: 'snapchat',+ Stripe: 'stripe',+ Intercom: 'intercom',+ Email: 'email',+ Twilio: 'twilio',Linear: 'linear',- TimeDecay: 'time_decay',- PositionBased: 'position_based',+ Github: 'github',+ Gitlab: 'gitlab',+ MetaAds: 'meta-ads',+ Clickup: 'clickup',+ RedditAds: 'reddit-ads',+ Databricks: 'databricks',+ TiktokAds: 'tiktok-ads',+ BingAds: 'bing-ads',+ Vercel: 'vercel',+ AzureBlob: 'azure-blob',+ Firebase: 'firebase',+ Jira: 'jira',+ PinterestAds: 'pinterest-ads',+ CustomerioApp: 'customerio-app',+ CustomerioWebhook: 'customerio-webhook',+ CustomerioTrack: 'customerio-track',} as const;- export interface UserBasicInfo {+ export interface ErrorTrackingExternalReferenceIntegration {+ display_name: string;id: number;- first_name: string;- email: string;+ kind: IntegrationKind;}- export interface RunSummary {- total: number;- changed: number;- new: number;- removed: number;- unchanged: number;- unresolved?: number;- tolerated_matched?: number;+ export interface ErrorTrackingExternalReference {+ external_url: string;+ id: string;+ integration: ErrorTrackingExternalReferenceIntegration;}- export type RunMetadata = { [key: string]: unknown };-- export interface Run {- approved_by?: UserBasicInfo | null;- id: string;- repo_id: string;- status: string;- run_type: string;- commit_sha: string;- branch: string;- /** @nullable */- pr_number: number | null;- approved: boolean;- /** @nullable */- approved_at: string | null;- summary: RunSummary;- /** @nullable */- error_message: string | null;- created_at: string;- /** @nullable */- completed_at: string | null;- is_stale?: boolean;- /** @nullable */- superseded_by_id?: string | null;- metadata?: RunMetadata;+ export interface FirstEvent {+ distinct_id: string;+ properties: string;+ timestamp: string;+ uuid: string;}- export interface AutoApproveResult {- run: Run;- baseline_content: string;+ export interface LastEvent {+ distinct_id: string;+ properties: string;+ timestamp: string;+ uuid: string;}- export type AutocompleteCompletionItemKind = typeof AutocompleteCompletionItemKind[keyof typeof AutocompleteCompletionItemKind];+ export type ErrorTrackingIssueStatus = typeof ErrorTrackingIssueStatus[keyof typeof ErrorTrackingIssueStatus];- export const AutocompleteCompletionItemKind = {- Method: 'Method',- Function: 'Function',- Constructor: 'Constructor',- Field: 'Field',- Variable: 'Variable',- Class: 'Class',- Struct: 'Struct',- Interface: 'Interface',- Module: 'Module',- Property: 'Property',- Event: 'Event',- Operator: 'Operator',- Unit: 'Unit',- Value: 'Value',- Constant: 'Constant',- Enum: 'Enum',- EnumMember: 'EnumMember',- Keyword: 'Keyword',- Text: 'Text',- Color: 'Color',- File: 'File',- Reference: 'Reference',- Customcolor: 'Customcolor',- Folder: 'Folder',- TypeParameter: 'TypeParameter',- User: 'User',- Issue: 'Issue',- Snippet: 'Snippet',+ export const ErrorTrackingIssueStatus = {+ Archived: 'archived',+ Active: 'active',+ Resolved: 'resolved',+ PendingRelease: 'pending_release',+ Suppressed: 'suppressed',} as const;- export interface AutocompleteCompletionItem {- /** A human-readable string with additional information about this item, like type or symbol information. */- detail?: string | null;- /** A human-readable string that represents a doc-comment. */- documentation?: string | null;- /** A string or snippet that should be inserted in a document when selecting this completion. */- insertText: string;- /** The kind of this completion item. Based on the kind an icon is chosen by the editor. */- kind: AutocompleteCompletionItemKind;- /** The label of this completion item. By default this is also the text that is inserted when selecting this completion. */- label: string;+ export interface ErrorTrackingIssue {+ aggregations?: ErrorTrackingIssueAggregations | null;+ assignee?: ErrorTrackingIssueAssignee | null;+ cohort?: ErrorTrackingIssueCohort | null;+ description?: string | null;+ external_issues?: ErrorTrackingExternalReference[] | null;+ first_event?: FirstEvent | null;+ first_seen: string;+ function?: string | null;+ id: string;+ last_event?: LastEvent | null;+ last_seen: string;+ library?: string | null;+ name?: string | null;+ source?: string | null;+ status: ErrorTrackingIssueStatus;}- /**- * * `P0` - P0- * `P1` - P1- * `P2` - P2- * `P3` - P3- * `P4` - P4- */- export type AutonomyPriorityEnum = typeof AutonomyPriorityEnum[keyof typeof AutonomyPriorityEnum];+ export interface Response21 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: ErrorTrackingIssue[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }+ export interface Population {+ both: number;+ exception_only: number;+ neither: number;+ success_only: number;+ }- export const AutonomyPriorityEnum = {- P0: 'P0',- P1: 'P1',- P2: 'P2',- P3: 'P3',- P4: 'P4',- } as const;+ export interface ErrorTrackingCorrelatedIssue {+ assignee?: ErrorTrackingIssueAssignee | null;+ cohort?: ErrorTrackingIssueCohort | null;+ description?: string | null;+ event: string;+ external_issues?: ErrorTrackingExternalReference[] | null;+ first_seen: string;+ id: string;+ last_seen: string;+ library?: string | null;+ name?: string | null;+ odds_ratio: number;+ population: Population;+ status: ErrorTrackingIssueStatus;+ }- /**- * Discovered detail fields and their value distributions.- */- export type AvailableFiltersResponseDetailFields = { [key: string]: unknown };+ export interface Response22 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: ErrorTrackingCorrelatedIssue[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export type StaticFiltersUsersItem = { [key: string]: unknown };+ export type Response23CredibleIntervals = {[key: string]: number[]};- export type StaticFiltersScopesItem = { [key: string]: unknown };+ export type Response23InsightItemItem = { [key: string]: unknown };- export type StaticFiltersActivitiesItem = { [key: string]: unknown };+ export type Response23Probability = {[key: string]: number};- export type StaticFiltersClientsItem = { [key: string]: unknown };+ export interface Response23 {+ credible_intervals: Response23CredibleIntervals;+ expected_loss: number;+ funnels_query?: FunnelsQuery | null;+ insight: Response23InsightItemItem[][];+ kind?: 'ExperimentFunnelsQuery';+ probability: Response23Probability;+ significance_code: ExperimentSignificanceCode;+ significant: boolean;+ stats_version?: number | null;+ variants: ExperimentVariantFunnelsBaseStats[];+ /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export interface StaticFilters {- /** Users who have logged activity. */- users: StaticFiltersUsersItem[];- /** Available activity scopes. */- scopes: StaticFiltersScopesItem[];- /** Available activity types. */- activities: StaticFiltersActivitiesItem[];- /** API clients that have generated activity (from x-posthog-client header). */- clients: StaticFiltersClientsItem[];+ export type Response24CredibleIntervals = {[key: string]: number[]};++ export type Response24InsightItem = { [key: string]: unknown };++ export type Response24Probability = {[key: string]: number};++ export interface Response24 {+ count_query?: TrendsQuery | null;+ credible_intervals: Response24CredibleIntervals;+ exposure_query?: TrendsQuery | null;+ insight: Response24InsightItem[];+ kind?: 'ExperimentTrendsQuery';+ p_value: number;+ probability: Response24Probability;+ significance_code: ExperimentSignificanceCode;+ significant: boolean;+ stats_version?: number | null;+ variants: ExperimentVariantTrendsBaseStats[];+ /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface AvailableFiltersResponse {- /** Pre-computed filter options for scopes, activities, and users. */- static_filters: StaticFilters;- /** Discovered detail fields and their value distributions. */- detail_fields: AvailableFiltersResponseDetailFields;+ export type LLMTraceEventProperties = { [key: string]: unknown };++ export interface LLMTraceEvent {+ createdAt: string;+ event: AIEventType | string;+ id: string;+ properties: LLMTraceEventProperties;}- /**- * * `ingest_first_event` - ingest_first_event- * `set_up_reverse_proxy` - set_up_reverse_proxy- * `create_first_insight` - create_first_insight- * `create_first_dashboard` - create_first_dashboard- * `track_custom_events` - track_custom_events- * `define_actions` - define_actions- * `set_up_cohorts` - set_up_cohorts- * `explore_trends_insight` - explore_trends_insight- * `create_funnel` - create_funnel- * `explore_retention_insight` - explore_retention_insight- * `explore_paths_insight` - explore_paths_insight- * `explore_stickiness_insight` - explore_stickiness_insight- * `explore_lifecycle_insight` - explore_lifecycle_insight- * `add_authorized_domain` - add_authorized_domain- * `set_up_web_vitals` - set_up_web_vitals- * `review_web_analytics_dashboard` - review_web_analytics_dashboard- * `filter_web_analytics` - filter_web_analytics- * `set_up_web_analytics_conversion_goals` - set_up_web_analytics_conversion_goals- * `visit_web_vitals_dashboard` - visit_web_vitals_dashboard- * `setup_session_recordings` - setup_session_recordings- * `watch_session_recording` - watch_session_recording- * `configure_recording_settings` - configure_recording_settings- * `create_recording_playlist` - create_recording_playlist- * `enable_console_logs` - enable_console_logs- * `create_feature_flag` - create_feature_flag- * `implement_flag_in_code` - implement_flag_in_code- * `update_feature_flag_release_conditions` - update_feature_flag_release_conditions- * `create_multivariate_flag` - create_multivariate_flag- * `set_up_flag_payloads` - set_up_flag_payloads- * `set_up_flag_evaluation_runtimes` - set_up_flag_evaluation_runtimes- * `create_experiment` - create_experiment- * `implement_experiment_variants` - implement_experiment_variants- * `launch_experiment` - launch_experiment- * `review_experiment_results` - review_experiment_results- * `create_survey` - create_survey- * `launch_survey` - launch_survey- * `collect_survey_responses` - collect_survey_responses- * `connect_source` - connect_source- * `run_first_query` - run_first_query- * `join_external_data` - join_external_data- * `create_saved_view` - create_saved_view- * `enable_error_tracking` - enable_error_tracking- * `upload_source_maps` - upload_source_maps- * `view_first_error` - view_first_error- * `resolve_first_error` - resolve_first_error- * `ingest_first_llm_event` - ingest_first_llm_event- * `view_first_trace` - view_first_trace- * `track_costs` - track_costs- * `set_up_llm_evaluation` - set_up_llm_evaluation- * `run_ai_playground` - run_ai_playground- * `enable_revenue_analytics_viewset` - enable_revenue_analytics_viewset- * `connect_revenue_source` - connect_revenue_source- * `set_up_revenue_goal` - set_up_revenue_goal- * `enable_log_capture` - enable_log_capture- * `view_first_logs` - view_first_logs- * `create_first_workflow` - create_first_workflow- * `set_up_first_workflow_channel` - set_up_first_workflow_channel- * `configure_workflow_trigger` - configure_workflow_trigger- * `add_workflow_action` - add_workflow_action- * `launch_workflow` - launch_workflow- * `create_first_endpoint` - create_first_endpoint- * `configure_endpoint` - configure_endpoint- * `test_endpoint` - test_endpoint- * `create_early_access_feature` - create_early_access_feature- * `update_feature_stage` - update_feature_stage- */- export type AvailableSetupTaskIdsEnum = typeof AvailableSetupTaskIdsEnum[keyof typeof AvailableSetupTaskIdsEnum];+ export type LLMTracePersonProperties = { [key: string]: unknown };+ export interface LLMTracePerson {+ created_at: string;+ distinct_id: string;+ properties: LLMTracePersonProperties;+ uuid: string;+ }- export const AvailableSetupTaskIdsEnum = {- IngestFirstEvent: 'ingest_first_event',- SetUpReverseProxy: 'set_up_reverse_proxy',- CreateFirstInsight: 'create_first_insight',- CreateFirstDashboard: 'create_first_dashboard',- TrackCustomEvents: 'track_custom_events',- DefineActions: 'define_actions',- SetUpCohorts: 'set_up_cohorts',- ExploreTrendsInsight: 'explore_trends_insight',- CreateFunnel: 'create_funnel',- ExploreRetentionInsight: 'explore_retention_insight',- ExplorePathsInsight: 'explore_paths_insight',- ExploreStickinessInsight: 'explore_stickiness_insight',- ExploreLifecycleInsight: 'explore_lifecycle_insight',- AddAuthorizedDomain: 'add_authorized_domain',- SetUpWebVitals: 'set_up_web_vitals',- ReviewWebAnalyticsDashboard: 'review_web_analytics_dashboard',- FilterWebAnalytics: 'filter_web_analytics',- SetUpWebAnalyticsConversionGoals: 'set_up_web_analytics_conversion_goals',- VisitWebVitalsDashboard: 'visit_web_vitals_dashboard',- SetupSessionRecordings: 'setup_session_recordings',- WatchSessionRecording: 'watch_session_recording',- ConfigureRecordingSettings: 'configure_recording_settings',- CreateRecordingPlaylist: 'create_recording_playlist',- EnableConsoleLogs: 'enable_console_logs',- CreateFeatureFlag: 'create_feature_flag',- ImplementFlagInCode: 'implement_flag_in_code',- UpdateFeatureFlagReleaseConditions: 'update_feature_flag_release_conditions',- CreateMultivariateFlag: 'create_multivariate_flag',- SetUpFlagPayloads: 'set_up_flag_payloads',- SetUpFlagEvaluationRuntimes: 'set_up_flag_evaluation_runtimes',- CreateExperiment: 'create_experiment',- ImplementExperimentVariants: 'implement_experiment_variants',- LaunchExperiment: 'launch_experiment',- ReviewExperimentResults: 'review_experiment_results',- CreateSurvey: 'create_survey',- LaunchSurvey: 'launch_survey',- CollectSurveyResponses: 'collect_survey_responses',- ConnectSource: 'connect_source',- RunFirstQuery: 'run_first_query',- JoinExternalData: 'join_external_data',- CreateSavedView: 'create_saved_view',- EnableErrorTracking: 'enable_error_tracking',- UploadSourceMaps: 'upload_source_maps',- ViewFirstError: 'view_first_error',- ResolveFirstError: 'resolve_first_error',- IngestFirstLlmEvent: 'ingest_first_llm_event',- ViewFirstTrace: 'view_first_trace',- TrackCosts: 'track_costs',- SetUpLlmEvaluation: 'set_up_llm_evaluation',- RunAiPlayground: 'run_ai_playground',- EnableRevenueAnalyticsViewset: 'enable_revenue_analytics_viewset',- ConnectRevenueSource: 'connect_revenue_source',- SetUpRevenueGoal: 'set_up_revenue_goal',- EnableLogCapture: 'enable_log_capture',- ViewFirstLogs: 'view_first_logs',- CreateFirstWorkflow: 'create_first_workflow',- SetUpFirstWorkflowChannel: 'set_up_first_workflow_channel',- ConfigureWorkflowTrigger: 'configure_workflow_trigger',- AddWorkflowAction: 'add_workflow_action',- LaunchWorkflow: 'launch_workflow',- CreateFirstEndpoint: 'create_first_endpoint',- ConfigureEndpoint: 'configure_endpoint',- TestEndpoint: 'test_endpoint',- CreateEarlyAccessFeature: 'create_early_access_feature',- UpdateFeatureStage: 'update_feature_stage',- } as const;+ export interface LLMTrace {+ aiSessionId?: string | null;+ createdAt: string;+ distinctId: string;+ errorCount?: number | null;+ events: LLMTraceEvent[];+ id: string;+ inputCost?: number | null;+ inputState?: unknown;+ inputTokens?: number | null;+ isSupportTrace?: boolean | null;+ outputCost?: number | null;+ outputState?: unknown;+ outputTokens?: number | null;+ person?: LLMTracePerson | null;+ requestCost?: number | null;+ tools?: string[] | null;+ totalCost?: number | null;+ totalLatency?: number | null;+ traceName?: string | null;+ webSearchCost?: number | null;+ }- export type AzureBlobDestinationConfigType = typeof AzureBlobDestinationConfigType[keyof typeof AzureBlobDestinationConfigType];+ export interface Response25 {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: LLMTrace[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }+ export interface Response26 {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export const AzureBlobDestinationConfigType = {- AzureBlob: 'AzureBlob',- } as const;+ export interface Response27 {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ kind?: 'AccountsQuery';+ limit: number;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset: number;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- /**- * * `brotli` - brotli- * `gzip` - gzip- * `lz4` - lz4- * `snappy` - snappy- * `zstd` - zstd- */- export type CompressionEnum = typeof CompressionEnum[keyof typeof CompressionEnum];+ export type TaxonomicFilterGroupType = typeof TaxonomicFilterGroupType[keyof typeof TaxonomicFilterGroupType];- export const CompressionEnum = {- Brotli: 'brotli',- Gzip: 'gzip',- Lz4: 'lz4',- Snappy: 'snappy',- Zstd: 'zstd',+ export const TaxonomicFilterGroupType = {+ Metadata: 'metadata',+ Actions: 'actions',+ Cohorts: 'cohorts',+ CohortsWithAll: 'cohorts_with_all',+ DataWarehouse: 'data_warehouse',+ DataWarehouseProperties: 'data_warehouse_properties',+ DataWarehousePersonProperties: 'data_warehouse_person_properties',+ Elements: 'elements',+ Events: 'events',+ InternalEvents: 'internal_events',+ InternalEventProperties: 'internal_event_properties',+ EventProperties: 'event_properties',+ EventFeatureFlags: 'event_feature_flags',+ EventMetadata: 'event_metadata',+ NumericalEventProperties: 'numerical_event_properties',+ PersonProperties: 'person_properties',+ PageviewUrls: 'pageview_urls',+ PageviewEvents: 'pageview_events',+ Screens: 'screens',+ ScreenEvents: 'screen_events',+ EmailAddresses: 'email_addresses',+ AutocaptureEvents: 'autocapture_events',+ CustomEvents: 'custom_events',+ Wildcard: 'wildcard',+ Groups: 'groups',+ Persons: 'persons',+ FeatureFlags: 'feature_flags',+ Insights: 'insights',+ Experiments: 'experiments',+ Plugins: 'plugins',+ Dashboards: 'dashboards',+ NameGroups: 'name_groups',+ SessionProperties: 'session_properties',+ HogqlExpression: 'hogql_expression',+ Notebooks: 'notebooks',+ LogEntries: 'log_entries',+ ErrorTrackingIssues: 'error_tracking_issues',+ Logs: 'logs',+ LogAttributes: 'log_attributes',+ LogResourceAttributes: 'log_resource_attributes',+ Spans: 'spans',+ SpanAttributes: 'span_attributes',+ SpanResourceAttributes: 'span_resource_attributes',+ Replay: 'replay',+ ReplaySavedFilters: 'replay_saved_filters',+ RevenueAnalyticsProperties: 'revenue_analytics_properties',+ Resources: 'resources',+ ErrorTrackingProperties: 'error_tracking_properties',+ ActivityLogProperties: 'activity_log_properties',+ MaxAiContext: 'max_ai_context',+ WorkflowVariables: 'workflow_variables',+ SuggestedFilters: 'suggested_filters',+ RecentFilters: 'recent_filters',+ PinnedFilters: 'pinned_filters',+ Empty: 'empty',} as const;- /**- * * `JSONLines` - JSONLines- * `Parquet` - Parquet- */- export type FileFormatEnum = typeof FileFormatEnum[keyof typeof FileFormatEnum];+ export type HrefMatching = typeof HrefMatching[keyof typeof HrefMatching];- export const FileFormatEnum = {- JSONLines: 'JSONLines',- Parquet: 'Parquet',+ export const HrefMatching = {+ Contains: 'contains',+ Exact: 'exact',+ Regex: 'regex',} as const;- /**- * Typed configuration for an Azure Blob Storage batch-export destination.-- Credentials live in the linked Integration, not in this config. Mirrors- `AzureBlobBatchExportInputs` in `products/batch_exports/backend/service.py`.- */- export interface AzureBlobDestinationConfig {- /** Azure Blob Storage container name. */- container_name: string;- /** Object key prefix applied to every exported file. */- prefix?: string;- /** Optional compression codec applied to exported files. Valid codecs depend on file_format.+ export type TextMatching = typeof TextMatching[keyof typeof TextMatching];- * `brotli` - brotli- * `gzip` - gzip- * `lz4` - lz4- * `snappy` - snappy- * `zstd` - zstd */- compression?: CompressionEnum | null;- /** File format used for exported objects.- * `JSONLines` - JSONLines- * `Parquet` - Parquet */- file_format?: FileFormatEnum;- /**- * If set, rolls to a new file once the current file exceeds this size in MB.- * @nullable- */- max_file_size_mb?: number | null;- type: AzureBlobDestinationConfigType;- }+ export const TextMatching = {+ Contains: 'contains',+ Exact: 'exact',+ Regex: 'regex',+ } as const;- export type AzureBlobDestinationRequestType = typeof AzureBlobDestinationRequestType[keyof typeof AzureBlobDestinationRequestType];+ export type UrlMatching = typeof UrlMatching[keyof typeof UrlMatching];- export const AzureBlobDestinationRequestType = {- AzureBlob: 'AzureBlob',+ export const UrlMatching = {+ Contains: 'contains',+ Exact: 'exact',+ Regex: 'regex',} as const;- /**- * Request shape for creating or updating an Azure Blob Storage batch-export destination.- */- export interface AzureBlobDestinationRequest {- type: AzureBlobDestinationRequestType;- /** ID of an azure-blob-kind Integration. Use the integrations-list MCP tool to find one. */- integration_id: number;- config: AzureBlobDestinationConfig;+ export interface EventsQueryActionStep {+ event?: string | null;+ href?: string | null;+ href_matching?: HrefMatching | null;+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ selector?: string | null;+ tag_name?: string | null;+ text?: string | null;+ text_matching?: TextMatching | null;+ url?: string | null;+ url_matching?: UrlMatching | null;}- /**- * * `AzureBlob` - AzureBlob- */- export type AzureBlobDestinationRequestTypeEnum = typeof AzureBlobDestinationRequestTypeEnum[keyof typeof AzureBlobDestinationRequestTypeEnum];+ export interface EventsQueryResponse {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Cursor for fetching the next page of results */+ nextCursor?: string | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }+ export interface EventsQuery {+ /** Show events matching a given action */+ actionId?: number | null;+ /** Show events matching action steps directly, used when no actionId is provided (e.g. previewing unsaved actions). Ignored if actionId is set. */+ actionSteps?: EventsQueryActionStep[] | null;+ /** Only fetch events that happened after this timestamp */+ after?: string | null;+ /** Only fetch events that happened before this timestamp */+ before?: string | null;+ /** Limit to events matching this string */+ event?: string | null;+ /** Filter to events matching any of these event names */+ events?: string[] | null;+ /** Filter test accounts */+ filterTestAccounts?: boolean | null;+ /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */+ fixedProperties?: (PropertyGroupFilter | PropertyGroupFilterValue | EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ kind?: 'EventsQuery';+ /** Number of rows to return */+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Number of rows to skip before returning rows */+ offset?: number | null;+ /** Columns to order by */+ orderBy?: string[] | null;+ /** Show events for a given person */+ personId?: string | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: EventsQueryResponse | null;+ /** Return a limited set of data. Required. */+ select: string[];+ /** source for querying events for insights */+ source?: InsightActorsQuery | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ /** HogQL filters to apply on returned data */+ where?: string[] | null;+ }- export const AzureBlobDestinationRequestTypeEnum = {- AzureBlob: 'AzureBlob',- } as const;+ export type PersonsNodeResponse = { [key: string]: unknown } | null;- /**- * * `AED` - AED- * `AFN` - AFN- * `ALL` - ALL- * `AMD` - AMD- * `ANG` - ANG- * `AOA` - AOA- * `ARS` - ARS- * `AUD` - AUD- * `AWG` - AWG- * `AZN` - AZN- * `BAM` - BAM- * `BBD` - BBD- * `BDT` - BDT- * `BGN` - BGN- * `BHD` - BHD- * `BIF` - BIF- * `BMD` - BMD- * `BND` - BND- * `BOB` - BOB- * `BRL` - BRL- * `BSD` - BSD- * `BTC` - BTC- * `BTN` - BTN- * `BWP` - BWP- * `BYN` - BYN- * `BZD` - BZD- * `CAD` - CAD- * `CDF` - CDF- * `CHF` - CHF- * `CLP` - CLP- * `CNY` - CNY- * `COP` - COP- * `CRC` - CRC- * `CVE` - CVE- * `CZK` - CZK- * `DJF` - DJF- * `DKK` - DKK- * `DOP` - DOP- * `DZD` - DZD- * `EGP` - EGP- * `ERN` - ERN- * `ETB` - ETB- * `EUR` - EUR- * `FJD` - FJD- * `GBP` - GBP- * `GEL` - GEL- * `GHS` - GHS- * `GIP` - GIP- * `GMD` - GMD- * `GNF` - GNF- * `GTQ` - GTQ- * `GYD` - GYD- * `HKD` - HKD- * `HNL` - HNL- * `HRK` - HRK- * `HTG` - HTG- * `HUF` - HUF- * `IDR` - IDR- * `ILS` - ILS- * `INR` - INR- * `IQD` - IQD- * `IRR` - IRR- * `ISK` - ISK- * `JMD` - JMD- * `JOD` - JOD- * `JPY` - JPY- * `KES` - KES- * `KGS` - KGS- * `KHR` - KHR- * `KMF` - KMF- * `KRW` - KRW- * `KWD` - KWD- * `KYD` - KYD- * `KZT` - KZT- * `LAK` - LAK- * `LBP` - LBP- * `LKR` - LKR- * `LRD` - LRD- * `LTL` - LTL- * `LVL` - LVL- * `LSL` - LSL- * `LYD` - LYD- * `MAD` - MAD- * `MDL` - MDL- * `MGA` - MGA- * `MKD` - MKD- * `MMK` - MMK- * `MNT` - MNT- * `MOP` - MOP- * `MRU` - MRU- * `MTL` - MTL- * `MUR` - MUR- * `MVR` - MVR- * `MWK` - MWK- * `MXN` - MXN- * `MYR` - MYR- * `MZN` - MZN- * `NAD` - NAD- * `NGN` - NGN- * `NIO` - NIO- * `NOK` - NOK- * `NPR` - NPR- * `NZD` - NZD- * `OMR` - OMR- * `PAB` - PAB- * `PEN` - PEN- * `PGK` - PGK- * `PHP` - PHP- * `PKR` - PKR- * `PLN` - PLN- * `PYG` - PYG- * `QAR` - QAR- * `RON` - RON- * `RSD` - RSD- * `RUB` - RUB- * `RWF` - RWF- * `SAR` - SAR- * `SBD` - SBD- * `SCR` - SCR- * `SDG` - SDG- * `SEK` - SEK- * `SGD` - SGD- * `SRD` - SRD- * `SSP` - SSP- * `STN` - STN- * `SYP` - SYP- * `SZL` - SZL- * `THB` - THB- * `TJS` - TJS- * `TMT` - TMT- * `TND` - TND- * `TOP` - TOP- * `TRY` - TRY- * `TTD` - TTD- * `TWD` - TWD- * `TZS` - TZS- * `UAH` - UAH- * `UGX` - UGX- * `USD` - USD- * `UYU` - UYU- * `UZS` - UZS- * `VES` - VES- * `VND` - VND- * `VUV` - VUV- * `WST` - WST- * `XAF` - XAF- * `XCD` - XCD- * `XOF` - XOF- * `XPF` - XPF- * `YER` - YER- * `ZAR` - ZAR- * `ZMW` - ZMW- */- export type BaseCurrencyEnum = typeof BaseCurrencyEnum[keyof typeof BaseCurrencyEnum];--- export const BaseCurrencyEnum = {- Aed: 'AED',- Afn: 'AFN',- All: 'ALL',- Amd: 'AMD',- Ang: 'ANG',- Aoa: 'AOA',- Ars: 'ARS',- Aud: 'AUD',- Awg: 'AWG',- Azn: 'AZN',- Bam: 'BAM',- Bbd: 'BBD',- Bdt: 'BDT',- Bgn: 'BGN',- Bhd: 'BHD',- Bif: 'BIF',- Bmd: 'BMD',- Bnd: 'BND',- Bob: 'BOB',- Brl: 'BRL',- Bsd: 'BSD',- Btc: 'BTC',- Btn: 'BTN',- Bwp: 'BWP',- Byn: 'BYN',- Bzd: 'BZD',- Cad: 'CAD',- Cdf: 'CDF',- Chf: 'CHF',- Clp: 'CLP',- Cny: 'CNY',- Cop: 'COP',- Crc: 'CRC',- Cve: 'CVE',- Czk: 'CZK',- Djf: 'DJF',- Dkk: 'DKK',- Dop: 'DOP',- Dzd: 'DZD',- Egp: 'EGP',- Ern: 'ERN',- Etb: 'ETB',- Eur: 'EUR',- Fjd: 'FJD',- Gbp: 'GBP',- Gel: 'GEL',- Ghs: 'GHS',- Gip: 'GIP',- Gmd: 'GMD',- Gnf: 'GNF',- Gtq: 'GTQ',- Gyd: 'GYD',- Hkd: 'HKD',- Hnl: 'HNL',- Hrk: 'HRK',- Htg: 'HTG',- Huf: 'HUF',- Idr: 'IDR',- Ils: 'ILS',- Inr: 'INR',- Iqd: 'IQD',- Irr: 'IRR',- Isk: 'ISK',- Jmd: 'JMD',- Jod: 'JOD',- Jpy: 'JPY',- Kes: 'KES',- Kgs: 'KGS',- Khr: 'KHR',- Kmf: 'KMF',- Krw: 'KRW',- Kwd: 'KWD',- Kyd: 'KYD',- Kzt: 'KZT',- Lak: 'LAK',- Lbp: 'LBP',- Lkr: 'LKR',- Lrd: 'LRD',- Ltl: 'LTL',- Lvl: 'LVL',- Lsl: 'LSL',- Lyd: 'LYD',- Mad: 'MAD',- Mdl: 'MDL',- Mga: 'MGA',- Mkd: 'MKD',- Mmk: 'MMK',- Mnt: 'MNT',- Mop: 'MOP',- Mru: 'MRU',- Mtl: 'MTL',- Mur: 'MUR',- Mvr: 'MVR',- Mwk: 'MWK',- Mxn: 'MXN',- Myr: 'MYR',- Mzn: 'MZN',- Nad: 'NAD',- Ngn: 'NGN',- Nio: 'NIO',- Nok: 'NOK',- Npr: 'NPR',- Nzd: 'NZD',- Omr: 'OMR',- Pab: 'PAB',- Pen: 'PEN',- Pgk: 'PGK',- Php: 'PHP',- Pkr: 'PKR',- Pln: 'PLN',- Pyg: 'PYG',- Qar: 'QAR',- Ron: 'RON',- Rsd: 'RSD',- Rub: 'RUB',- Rwf: 'RWF',- Sar: 'SAR',- Sbd: 'SBD',- Scr: 'SCR',- Sdg: 'SDG',- Sek: 'SEK',- Sgd: 'SGD',- Srd: 'SRD',- Ssp: 'SSP',- Stn: 'STN',- Syp: 'SYP',- Szl: 'SZL',- Thb: 'THB',- Tjs: 'TJS',- Tmt: 'TMT',- Tnd: 'TND',- Top: 'TOP',- Try: 'TRY',- Ttd: 'TTD',- Twd: 'TWD',- Tzs: 'TZS',- Uah: 'UAH',- Ugx: 'UGX',- Usd: 'USD',- Uyu: 'UYU',- Uzs: 'UZS',- Ves: 'VES',- Vnd: 'VND',- Vuv: 'VUV',- Wst: 'WST',- Xaf: 'XAF',- Xcd: 'XCD',- Xof: 'XOF',- Xpf: 'XPF',- Yer: 'YER',- Zar: 'ZAR',- Zmw: 'ZMW',- } as const;-- export interface QuarantineSourceRun {- id: string;- branch: string;- commit_sha: string;- created_at: string;- /** @nullable */- pr_number?: number | null;- }-- export interface BaselineQuarantineSummary {- created_by?: UserBasicInfo | null;- source_run?: QuarantineSourceRun | null;- id: string;- reason: string;- /** @nullable */- expires_at: string | null;- created_at: string;- }-- export interface BaselineEntry {- /** Active quarantine details when `is_quarantined` is true. Null otherwise. */- quarantine?: BaselineQuarantineSummary | null;- identifier: string;- run_type: string;- /** @nullable */- browser: string | null;- /** @nullable */- thumbnail_hash: string | null;- /** @nullable */- width: number | null;- /** @nullable */- height: number | null;- tolerate_count_30d: number;- tolerate_count_90d: number;- is_quarantined: boolean;- last_run_at: string;- baseline_change_count: number;- /** @nullable */- recent_drift_avg: number | null;+ export interface PersonsNode {+ cohort?: number | null;+ distinctId?: string | null;+ /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */+ fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ kind?: 'PersonsNode';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: PersonsNodeResponse;+ search?: string | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export type BaselineTotalsByRunType = {[key: string]: number};-- export interface BaselineTotals {- by_run_type: BaselineTotalsByRunType;- all_snapshots: number;- recently_tolerated: number;- frequently_tolerated: number;- currently_quarantined: number;+ export interface GroupsQueryResponse {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ kind?: 'GroupsQuery';+ limit: number;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset: number;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface BaselineOverview {- entries: BaselineEntry[];- totals: BaselineTotals;- truncated: boolean;- generated_at: string;+ export interface GroupsQuery {+ group_type_index: number;+ kind?: 'GroupsQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ orderBy?: string[] | null;+ properties?: (GroupPropertyFilter | HogQLPropertyFilter)[] | null;+ response?: GroupsQueryResponse | null;+ search?: string | null;+ select?: string[] | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * * `minimal` - minimal- * `detailed` - detailed- */- export type DetailModeValueEnum = typeof DetailModeValueEnum[keyof typeof DetailModeValueEnum];--- export const DetailModeValueEnum = {- Minimal: 'minimal',- Detailed: 'detailed',- } as const;-- export interface BatchCheckRequest {- /**- * List of trace IDs to check for cached summaries- * @maxItems 100- */- trace_ids: string[];- /** Summary detail level to check for-- * `minimal` - minimal- * `detailed` - detailed */- mode?: DetailModeValueEnum;- /**- * LLM model used for cached summaries- * @nullable- */- model?: string | null;+ export interface WebExternalClicksTableQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface CachedSummary {- trace_id: string;- title: string;- cached?: boolean;+ export interface WebExternalClicksTableQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'WebExternalClicksTableQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: WebExternalClicksTableQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ stripQueryParams?: boolean | null;+ tags?: QueryLogTags | null;+ useSessionsTable?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface BatchCheckResponse {- summaries: CachedSummary[];+ export interface WebGoalsQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Whether the response was served from the lazy precompute path. */+ usedLazyPrecompute?: boolean | null;+ /** Whether the response was served from a precomputed table. */+ usedPreAggregatedTables?: boolean | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- /**- * * `events` - Events- * `persons` - Persons- * `sessions` - Sessions- */- export type ModelEnum = typeof ModelEnum[keyof typeof ModelEnum];-+ export interface WebGoalsQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'WebGoalsQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: WebGoalsQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ tags?: QueryLogTags | null;+ useSessionsTable?: boolean | null;+ /** Opt this specific query into the web_goals_query precompute path. Requires the `web-analytics-precompute-toggle` PostHog feature flag to be on for the team's organization for the gate to pass. * */+ useWebAnalyticsPrecompute?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- export const ModelEnum = {- Events: 'events',- Persons: 'persons',- Sessions: 'sessions',- } as const;+ export interface WebVitalsQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'WebVitalsQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: WebGoalsQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ source: TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | StickinessQuery | LifecycleQuery | WebStatsTableQuery | WebOverviewQuery;+ tags?: QueryLogTags | null;+ useSessionsTable?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- /**- * * `S3` - S3- * `Snowflake` - Snowflake- * `Postgres` - Postgres- * `Redshift` - Redshift- * `BigQuery` - Bigquery- * `Databricks` - Databricks- * `AzureBlob` - Azure Blob- * `Workflows` - Workflows- * `HTTP` - Http- * `NoOp` - Noop- * `FileDownload` - File Download- */- export type BatchExportDestinationTypeEnum = typeof BatchExportDestinationTypeEnum[keyof typeof BatchExportDestinationTypeEnum];+ export type WebVitalsMetric = typeof WebVitalsMetric[keyof typeof WebVitalsMetric];- export const BatchExportDestinationTypeEnum = {- S3: 'S3',- Snowflake: 'Snowflake',- Postgres: 'Postgres',- Redshift: 'Redshift',- BigQuery: 'BigQuery',- Databricks: 'Databricks',- AzureBlob: 'AzureBlob',- Workflows: 'Workflows',- Http: 'HTTP',- NoOp: 'NoOp',- FileDownload: 'FileDownload',+ export const WebVitalsMetric = {+ Inp: 'INP',+ Lcp: 'LCP',+ Cls: 'CLS',+ Fcp: 'FCP',} as const;- export type DatabricksDestinationConfigType = typeof DatabricksDestinationConfigType[keyof typeof DatabricksDestinationConfigType];+ export type WebVitalsPercentile = typeof WebVitalsPercentile[keyof typeof WebVitalsPercentile];- export const DatabricksDestinationConfigType = {- Databricks: 'Databricks',+ export const WebVitalsPercentile = {+ P75: 'p75',+ P90: 'p90',+ P99: 'p99',} as const;- /**- * Typed configuration for a Databricks batch-export destination.+ export interface WebVitalsPathBreakdownQueryResponse {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ /**+ * @minItems 1+ * @maxItems 1+ */+ results: WebVitalsPathBreakdownResult[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ usedLazyPrecompute?: boolean | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- Credentials live in the linked Integration, not in this config. Mirrors- `DatabricksBatchExportInputs` in `products/batch_exports/backend/service.py`.- */- export interface DatabricksDestinationConfig {- /** Databricks SQL warehouse HTTP path. */- http_path: string;- /** Unity Catalog name. */- catalog: string;- /** Schema (database) name inside the catalog. */- schema: string;- /** Destination table name. */- table_name: string;- /** Whether to use the Databricks VARIANT type for JSON-like columns. */- use_variant_type?: boolean;- /** Whether to let Databricks evolve the destination table schema automatically. */- use_automatic_schema_evolution?: boolean;- type: DatabricksDestinationConfigType;+ export interface WebVitalsPathBreakdownQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'WebVitalsPathBreakdownQuery';+ metric: WebVitalsMetric;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;+ percentile: WebVitalsPercentile;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: WebVitalsPathBreakdownQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ tags?: QueryLogTags | null;+ /**+ * @minItems 2+ * @maxItems 2+ */+ thresholds: number[];+ useSessionsTable?: boolean | null;+ /** Opt this specific query into the web vitals path breakdown precompute path. Requires the `web-analytics-precompute-toggle` PostHog feature flag to be on for the team's organization for the gate to pass. * */+ useWebAnalyticsPrecompute?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export type BigQueryDestinationConfigType = typeof BigQueryDestinationConfigType[keyof typeof BigQueryDestinationConfigType];+ export interface Filters {+ dateRange?: DateRange | null;+ properties?: SessionPropertyFilter[] | null;+ }+ export type SessionAttributionGroupBy = typeof SessionAttributionGroupBy[keyof typeof SessionAttributionGroupBy];- export const BigQueryDestinationConfigType = {- BigQuery: 'BigQuery',- } as const;- /**- * Typed configuration for a BigQuery batch-export destination.+ export const SessionAttributionGroupBy = {+ ChannelType: 'ChannelType',+ Medium: 'Medium',+ Source: 'Source',+ Campaign: 'Campaign',+ AdIds: 'AdIds',+ ReferringDomain: 'ReferringDomain',+ InitialURL: 'InitialURL',+ } as const;- Credentials live in the linked Integration, not in this config. Mirrors the- non-credential fields of `BigQueryBatchExportInputs` in- `products/batch_exports/backend/service.py`.- */- export interface BigQueryDestinationConfig {- /** BigQuery dataset ID to write to. */- dataset_id: string;- /** BigQuery table ID inside the dataset. */- table_id?: string;- /** Whether to export 'properties', 'set', and 'set_once' fields as the BigQuery JSON type rather than STRING. Cannot be changed after the export is created. */- use_json_type?: boolean;- type: BigQueryDestinationConfigType;+ export interface SessionAttributionExplorerQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export type BatchExportDestinationConfig = DatabricksDestinationConfig | AzureBlobDestinationConfig | BigQueryDestinationConfig;+ export interface SessionAttributionExplorerQuery {+ filters?: Filters | null;+ groupBy: SessionAttributionGroupBy[];+ kind?: 'SessionAttributionExplorerQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ response?: SessionAttributionExplorerQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- /**- * Serializer for an BatchExportDestination model.+ export interface SessionsQueryResponse {+ columns: unknown[];+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql: string;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[][];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types: string[];+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- The `config` field is polymorphic and typed only for destinations that keep- credentials in the linked Integration (currently Databricks, AzureBlob, BigQuery).- Other destination types accept the same JSON shape but without a typed- OpenAPI schema. Secret fields are stripped from `config` on read.- */- export interface BatchExportDestination {- /** A choice of supported BatchExportDestination types.+ export interface SessionsQuery {+ /** Filter sessions by action - sessions that contain events matching this action */+ actionId?: number | null;+ /** Only fetch sessions that started after this timestamp */+ after?: string | null;+ /** Only fetch sessions that started before this timestamp */+ before?: string | null;+ /** Filter sessions by event name - sessions that contain this event */+ event?: string | null;+ /** Event property filters - filters sessions that contain events matching these properties */+ eventProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ /** Filter test accounts */+ filterTestAccounts?: boolean | null;+ /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */+ fixedProperties?: (PropertyGroupFilter | PropertyGroupFilterValue | EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ kind?: 'SessionsQuery';+ /** Number of rows to return */+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Number of rows to skip before returning rows */+ offset?: number | null;+ /** Columns to order by */+ orderBy?: string[] | null;+ /** Show sessions for a given person */+ personId?: string | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: SessionsQueryResponse | null;+ /** Return a limited set of data. Required. */+ select: string[];+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ /** HogQL filters to apply on returned data */+ where?: string[] | null;+ }- * `S3` - S3- * `Snowflake` - Snowflake- * `Postgres` - Postgres- * `Redshift` - Redshift- * `BigQuery` - Bigquery- * `Databricks` - Databricks- * `AzureBlob` - Azure Blob- * `Workflows` - Workflows- * `HTTP` - Http- * `NoOp` - Noop- * `FileDownload` - File Download */- type: BatchExportDestinationTypeEnum;- /** Destination-specific configuration. Fields depend on `type`. Credentials for integration-backed destinations (Databricks, AzureBlob, BigQuery) are NOT stored here — they live in the linked Integration. Secret fields are stripped from responses. */- config: BatchExportDestinationConfig;- /**- * The integration for this destination.- * @nullable- */- integration?: number | null;- /**- * ID of a team-scoped Integration providing credentials. Required for Databricks, AzureBlob, and BigQuery destinations; unused for other types.- * @nullable- */- integration_id?: number | null;+ export interface RevenueAnalyticsBreakdown {+ property: string;+ type?: 'revenue_analytics';}- /**- * * `hour` - hour- * `day` - day- * `week` - week- * `every 5 minutes` - every 5 minutes- * `every 15 minutes` - every 15 minutes- */- export type IntervalEnum = typeof IntervalEnum[keyof typeof IntervalEnum];+ export type SimpleIntervalType = typeof SimpleIntervalType[keyof typeof SimpleIntervalType];- export const IntervalEnum = {- Hour: 'hour',+ export const SimpleIntervalType = {Day: 'day',- Week: 'week',- Every5Minutes: 'every 5 minutes',- Every15Minutes: 'every 15 minutes',+ Month: 'month',} as const;- /**- * * `Cancelled` - Cancelled- * `Completed` - Completed- * `ContinuedAsNew` - Continued As New- * `Failed` - Failed- * `FailedRetryable` - Failed Retryable- * `FailedBilling` - Failed Billing- * `Terminated` - Terminated- * `TimedOut` - Timedout- * `Running` - Running- * `Starting` - Starting- */- export type BatchExportRunStatusEnum = typeof BatchExportRunStatusEnum[keyof typeof BatchExportRunStatusEnum];+ export interface RevenueAnalyticsGrossRevenueQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }+ export interface RevenueAnalyticsGrossRevenueQuery {+ breakdown: RevenueAnalyticsBreakdown[];+ dateRange?: DateRange | null;+ interval: SimpleIntervalType;+ kind?: 'RevenueAnalyticsGrossRevenueQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties: RevenueAnalyticsPropertyFilter[];+ response?: RevenueAnalyticsGrossRevenueQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- export const BatchExportRunStatusEnum = {- Cancelled: 'Cancelled',- Completed: 'Completed',- ContinuedAsNew: 'ContinuedAsNew',- Failed: 'Failed',- FailedRetryable: 'FailedRetryable',- FailedBilling: 'FailedBilling',- Terminated: 'Terminated',- TimedOut: 'TimedOut',- Running: 'Running',- Starting: 'Starting',- } as const;+ export interface RevenueAnalyticsMetricsQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- /**- * Serializer for a BatchExportRun model.- */- export interface BatchExportRun {- readonly id: string;- /** The status of this run.+ export interface RevenueAnalyticsMetricsQuery {+ breakdown: RevenueAnalyticsBreakdown[];+ dateRange?: DateRange | null;+ interval: SimpleIntervalType;+ kind?: 'RevenueAnalyticsMetricsQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties: RevenueAnalyticsPropertyFilter[];+ response?: RevenueAnalyticsMetricsQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- * `Cancelled` - Cancelled- * `Completed` - Completed- * `ContinuedAsNew` - Continued As New- * `Failed` - Failed- * `FailedRetryable` - Failed Retryable- * `FailedBilling` - Failed Billing- * `Terminated` - Terminated- * `TimedOut` - Timedout- * `Running` - Running- * `Starting` - Starting */- status: BatchExportRunStatusEnum;- /**- * The number of records that have been exported.- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- records_completed?: number | null;- /**- * The number of records that failed downstream processing (e.g. hog function execution errors).- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- records_failed?: number | null;- /**- * The latest error that occurred during this run.- * @nullable- */- latest_error?: string | null;- /**- * The start of the data interval.- * @nullable- */- data_interval_start?: string | null;- /** The end of the data interval. */- data_interval_end: string;- /**- * An opaque cursor that may be used to resume.- * @nullable- */- cursor?: string | null;- /** The timestamp at which this BatchExportRun was created. */- readonly created_at: string;- /**- * The timestamp at which this BatchExportRun finished, successfully or not.- * @nullable- */- finished_at?: string | null;- /** The timestamp at which this BatchExportRun was last updated. */- readonly last_updated_at: string;- /**- * The total count of records that should be exported in this BatchExportRun.- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- records_total_count?: number | null;- /**- * The number of bytes that have been exported in this BatchExportRun.- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- bytes_exported?: number | null;- /**- * The `BatchExport` this run belongs to.- * @nullable- */- readonly batch_export: string | null;- /**- * The `BatchExportOnDemand` this run belongs to.- * @nullable- */- batch_export_on_demand?: string | null;- /**- * The backfill this run belongs to.- * @nullable- */- backfill?: string | null;- }-- /**- * Serializer for a BatchExport model.- */- export interface BatchExport {- readonly id: string;- /** The team this belongs to. */- readonly team_id: number;- /** A human-readable name for this BatchExport. */- name: string;- /** Which model this BatchExport is exporting.-- * `events` - Events- * `persons` - Persons- * `sessions` - Sessions */- model?: ModelEnum | BlankEnum | null;- /** Destination configuration (type, config, and optional integration). */- destination: BatchExportDestination;- /** How often the batch export should run.-- * `hour` - hour- * `day` - day- * `week` - week- * `every 5 minutes` - every 5 minutes- * `every 15 minutes` - every 15 minutes */- interval: IntervalEnum;- /** Whether this BatchExport is paused or not. */- paused?: boolean;- /** The timestamp at which this BatchExport was created. */- readonly created_at: string;- /** The timestamp at which this BatchExport was last updated. */- readonly last_updated_at: string;- /**- * The timestamp at which this BatchExport was last paused.- * @nullable- */- last_paused_at?: string | null;- /**- * Time before which any Batch Export runs won't be triggered.- * @nullable- */- start_at?: string | null;- /**- * Time after which any Batch Export runs won't be triggered.- * @nullable- */- end_at?: string | null;- /** The 10 most recent runs of this batch export, ordered newest first. */- readonly latest_runs: readonly BatchExportRun[];- /** Optional HogQL SELECT defining a custom model schema. Only recommended in advanced use cases. */- hogql_query?: string;- /** A schema of custom fields to select when exporting data. */- readonly schema: unknown;- filters?: unknown;- /** IANA timezone name controlling daily and weekly interval boundaries. Defaults to UTC.-- * `Africa/Abidjan` - Africa/Abidjan- * `Africa/Accra` - Africa/Accra- * `Africa/Addis_Ababa` - Africa/Addis_Ababa- * `Africa/Algiers` - Africa/Algiers- * `Africa/Asmara` - Africa/Asmara- * `Africa/Asmera` - Africa/Asmera- * `Africa/Bamako` - Africa/Bamako- * `Africa/Bangui` - Africa/Bangui- * `Africa/Banjul` - Africa/Banjul- * `Africa/Bissau` - Africa/Bissau- * `Africa/Blantyre` - Africa/Blantyre- * `Africa/Brazzaville` - Africa/Brazzaville- * `Africa/Bujumbura` - Africa/Bujumbura- * `Africa/Cairo` - Africa/Cairo- * `Africa/Casablanca` - Africa/Casablanca- * `Africa/Ceuta` - Africa/Ceuta- * `Africa/Conakry` - Africa/Conakry- * `Africa/Dakar` - Africa/Dakar- * `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam- * `Africa/Djibouti` - Africa/Djibouti- * `Africa/Douala` - Africa/Douala- * `Africa/El_Aaiun` - Africa/El_Aaiun- * `Africa/Freetown` - Africa/Freetown- * `Africa/Gaborone` - Africa/Gaborone- * `Africa/Harare` - Africa/Harare- * `Africa/Johannesburg` - Africa/Johannesburg- * `Africa/Juba` - Africa/Juba- * `Africa/Kampala` - Africa/Kampala- * `Africa/Khartoum` - Africa/Khartoum- * `Africa/Kigali` - Africa/Kigali- * `Africa/Kinshasa` - Africa/Kinshasa- * `Africa/Lagos` - Africa/Lagos- * `Africa/Libreville` - Africa/Libreville- * `Africa/Lome` - Africa/Lome- * `Africa/Luanda` - Africa/Luanda- * `Africa/Lubumbashi` - Africa/Lubumbashi- * `Africa/Lusaka` - Africa/Lusaka- * `Africa/Malabo` - Africa/Malabo- * `Africa/Maputo` - Africa/Maputo- * `Africa/Maseru` - Africa/Maseru- * `Africa/Mbabane` - Africa/Mbabane- * `Africa/Mogadishu` - Africa/Mogadishu- * `Africa/Monrovia` - Africa/Monrovia- * `Africa/Nairobi` - Africa/Nairobi- * `Africa/Ndjamena` - Africa/Ndjamena- * `Africa/Niamey` - Africa/Niamey- * `Africa/Nouakchott` - Africa/Nouakchott- * `Africa/Ouagadougou` - Africa/Ouagadougou- * `Africa/Porto-Novo` - Africa/Porto-Novo- * `Africa/Sao_Tome` - Africa/Sao_Tome- * `Africa/Timbuktu` - Africa/Timbuktu- * `Africa/Tripoli` - Africa/Tripoli- * `Africa/Tunis` - Africa/Tunis- * `Africa/Windhoek` - Africa/Windhoek- * `America/Adak` - America/Adak- * `America/Anchorage` - America/Anchorage- * `America/Anguilla` - America/Anguilla- * `America/Antigua` - America/Antigua- * `America/Araguaina` - America/Araguaina- * `America/Argentina/Buenos_Aires` - America/Argentina/Buenos_Aires- * `America/Argentina/Catamarca` - America/Argentina/Catamarca- * `America/Argentina/ComodRivadavia` - America/Argentina/ComodRivadavia- * `America/Argentina/Cordoba` - America/Argentina/Cordoba- * `America/Argentina/Jujuy` - America/Argentina/Jujuy- * `America/Argentina/La_Rioja` - America/Argentina/La_Rioja- * `America/Argentina/Mendoza` - America/Argentina/Mendoza- * `America/Argentina/Rio_Gallegos` - America/Argentina/Rio_Gallegos- * `America/Argentina/Salta` - America/Argentina/Salta- * `America/Argentina/San_Juan` - America/Argentina/San_Juan- * `America/Argentina/San_Luis` - America/Argentina/San_Luis- * `America/Argentina/Tucuman` - America/Argentina/Tucuman- * `America/Argentina/Ushuaia` - America/Argentina/Ushuaia- * `America/Aruba` - America/Aruba- * `America/Asuncion` - America/Asuncion- * `America/Atikokan` - America/Atikokan- * `America/Atka` - America/Atka- * `America/Bahia` - America/Bahia- * `America/Bahia_Banderas` - America/Bahia_Banderas- * `America/Barbados` - America/Barbados- * `America/Belem` - America/Belem- * `America/Belize` - America/Belize- * `America/Blanc-Sablon` - America/Blanc-Sablon- * `America/Boa_Vista` - America/Boa_Vista- * `America/Bogota` - America/Bogota- * `America/Boise` - America/Boise- * `America/Buenos_Aires` - America/Buenos_Aires- * `America/Cambridge_Bay` - America/Cambridge_Bay- * `America/Campo_Grande` - America/Campo_Grande- * `America/Cancun` - America/Cancun- * `America/Caracas` - America/Caracas- * `America/Catamarca` - America/Catamarca- * `America/Cayenne` - America/Cayenne- * `America/Cayman` - America/Cayman- * `America/Chicago` - America/Chicago- * `America/Chihuahua` - America/Chihuahua- * `America/Ciudad_Juarez` - America/Ciudad_Juarez- * `America/Coral_Harbour` - America/Coral_Harbour- * `America/Cordoba` - America/Cordoba- * `America/Costa_Rica` - America/Costa_Rica- * `America/Creston` - America/Creston- * `America/Cuiaba` - America/Cuiaba- * `America/Curacao` - America/Curacao- * `America/Danmarkshavn` - America/Danmarkshavn- * `America/Dawson` - America/Dawson- * `America/Dawson_Creek` - America/Dawson_Creek- * `America/Denver` - America/Denver- * `America/Detroit` - America/Detroit- * `America/Dominica` - America/Dominica- * `America/Edmonton` - America/Edmonton- * `America/Eirunepe` - America/Eirunepe- * `America/El_Salvador` - America/El_Salvador- * `America/Ensenada` - America/Ensenada- * `America/Fort_Nelson` - America/Fort_Nelson- * `America/Fort_Wayne` - America/Fort_Wayne- * `America/Fortaleza` - America/Fortaleza- * `America/Glace_Bay` - America/Glace_Bay- * `America/Godthab` - America/Godthab- * `America/Goose_Bay` - America/Goose_Bay- * `America/Grand_Turk` - America/Grand_Turk- * `America/Grenada` - America/Grenada- * `America/Guadeloupe` - America/Guadeloupe- * `America/Guatemala` - America/Guatemala- * `America/Guayaquil` - America/Guayaquil- * `America/Guyana` - America/Guyana- * `America/Halifax` - America/Halifax- * `America/Havana` - America/Havana- * `America/Hermosillo` - America/Hermosillo- * `America/Indiana/Indianapolis` - America/Indiana/Indianapolis- * `America/Indiana/Knox` - America/Indiana/Knox- * `America/Indiana/Marengo` - America/Indiana/Marengo- * `America/Indiana/Petersburg` - America/Indiana/Petersburg- * `America/Indiana/Tell_City` - America/Indiana/Tell_City- * `America/Indiana/Vevay` - America/Indiana/Vevay- * `America/Indiana/Vincennes` - America/Indiana/Vincennes- * `America/Indiana/Winamac` - America/Indiana/Winamac- * `America/Indianapolis` - America/Indianapolis- * `America/Inuvik` - America/Inuvik- * `America/Iqaluit` - America/Iqaluit- * `America/Jamaica` - America/Jamaica- * `America/Jujuy` - America/Jujuy- * `America/Juneau` - America/Juneau- * `America/Kentucky/Louisville` - America/Kentucky/Louisville- * `America/Kentucky/Monticello` - America/Kentucky/Monticello- * `America/Knox_IN` - America/Knox_IN- * `America/Kralendijk` - America/Kralendijk- * `America/La_Paz` - America/La_Paz- * `America/Lima` - America/Lima- * `America/Los_Angeles` - America/Los_Angeles- * `America/Louisville` - America/Louisville- * `America/Lower_Princes` - America/Lower_Princes- * `America/Maceio` - America/Maceio- * `America/Managua` - America/Managua- * `America/Manaus` - America/Manaus- * `America/Marigot` - America/Marigot- * `America/Martinique` - America/Martinique- * `America/Matamoros` - America/Matamoros- * `America/Mazatlan` - America/Mazatlan- * `America/Mendoza` - America/Mendoza- * `America/Menominee` - America/Menominee- * `America/Merida` - America/Merida- * `America/Metlakatla` - America/Metlakatla- * `America/Mexico_City` - America/Mexico_City- * `America/Miquelon` - America/Miquelon- * `America/Moncton` - America/Moncton- * `America/Monterrey` - America/Monterrey- * `America/Montevideo` - America/Montevideo- * `America/Montreal` - America/Montreal- * `America/Montserrat` - America/Montserrat- * `America/Nassau` - America/Nassau- * `America/New_York` - America/New_York- * `America/Nipigon` - America/Nipigon- * `America/Nome` - America/Nome- * `America/Noronha` - America/Noronha- * `America/North_Dakota/Beulah` - America/North_Dakota/Beulah- * `America/North_Dakota/Center` - America/North_Dakota/Center- * `America/North_Dakota/New_Salem` - America/North_Dakota/New_Salem- * `America/Nuuk` - America/Nuuk- * `America/Ojinaga` - America/Ojinaga- * `America/Panama` - America/Panama- * `America/Pangnirtung` - America/Pangnirtung- * `America/Paramaribo` - America/Paramaribo- * `America/Phoenix` - America/Phoenix- * `America/Port-au-Prince` - America/Port-au-Prince- * `America/Port_of_Spain` - America/Port_of_Spain- * `America/Porto_Acre` - America/Porto_Acre- * `America/Porto_Velho` - America/Porto_Velho- * `America/Puerto_Rico` - America/Puerto_Rico- * `America/Punta_Arenas` - America/Punta_Arenas- * `America/Rainy_River` - America/Rainy_River- * `America/Rankin_Inlet` - America/Rankin_Inlet- * `America/Recife` - America/Recife- * `America/Regina` - America/Regina- * `America/Resolute` - America/Resolute- * `America/Rio_Branco` - America/Rio_Branco- * `America/Rosario` - America/Rosario- * `America/Santa_Isabel` - America/Santa_Isabel- * `America/Santarem` - America/Santarem- * `America/Santiago` - America/Santiago- * `America/Santo_Domingo` - America/Santo_Domingo- * `America/Sao_Paulo` - America/Sao_Paulo- * `America/Scoresbysund` - America/Scoresbysund- * `America/Shiprock` - America/Shiprock- * `America/Sitka` - America/Sitka- * `America/St_Barthelemy` - America/St_Barthelemy- * `America/St_Johns` - America/St_Johns- * `America/St_Kitts` - America/St_Kitts- * `America/St_Lucia` - America/St_Lucia- * `America/St_Thomas` - America/St_Thomas- * `America/St_Vincent` - America/St_Vincent- * `America/Swift_Current` - America/Swift_Current- * `America/Tegucigalpa` - America/Tegucigalpa- * `America/Thule` - America/Thule- * `America/Thunder_Bay` - America/Thunder_Bay- * `America/Tijuana` - America/Tijuana- * `America/Toronto` - America/Toronto- * `America/Tortola` - America/Tortola- * `America/Vancouver` - America/Vancouver- * `America/Virgin` - America/Virgin- * `America/Whitehorse` - America/Whitehorse- * `America/Winnipeg` - America/Winnipeg- * `America/Yakutat` - America/Yakutat- * `America/Yellowknife` - America/Yellowknife- * `Antarctica/Casey` - Antarctica/Casey- * `Antarctica/Davis` - Antarctica/Davis- * `Antarctica/DumontDUrville` - Antarctica/DumontDUrville- * `Antarctica/Macquarie` - Antarctica/Macquarie- * `Antarctica/Mawson` - Antarctica/Mawson- * `Antarctica/McMurdo` - Antarctica/McMurdo- * `Antarctica/Palmer` - Antarctica/Palmer- * `Antarctica/Rothera` - Antarctica/Rothera- * `Antarctica/South_Pole` - Antarctica/South_Pole- * `Antarctica/Syowa` - Antarctica/Syowa- * `Antarctica/Troll` - Antarctica/Troll- * `Antarctica/Vostok` - Antarctica/Vostok- * `Arctic/Longyearbyen` - Arctic/Longyearbyen- * `Asia/Aden` - Asia/Aden- * `Asia/Almaty` - Asia/Almaty- * `Asia/Amman` - Asia/Amman- * `Asia/Anadyr` - Asia/Anadyr- * `Asia/Aqtau` - Asia/Aqtau- * `Asia/Aqtobe` - Asia/Aqtobe- * `Asia/Ashgabat` - Asia/Ashgabat- * `Asia/Ashkhabad` - Asia/Ashkhabad- * `Asia/Atyrau` - Asia/Atyrau- * `Asia/Baghdad` - Asia/Baghdad- * `Asia/Bahrain` - Asia/Bahrain- * `Asia/Baku` - Asia/Baku- * `Asia/Bangkok` - Asia/Bangkok- * `Asia/Barnaul` - Asia/Barnaul- * `Asia/Beirut` - Asia/Beirut- * `Asia/Bishkek` - Asia/Bishkek- * `Asia/Brunei` - Asia/Brunei- * `Asia/Calcutta` - Asia/Calcutta- * `Asia/Chita` - Asia/Chita- * `Asia/Choibalsan` - Asia/Choibalsan- * `Asia/Chongqing` - Asia/Chongqing- * `Asia/Chungking` - Asia/Chungking- * `Asia/Colombo` - Asia/Colombo- * `Asia/Dacca` - Asia/Dacca- * `Asia/Damascus` - Asia/Damascus- * `Asia/Dhaka` - Asia/Dhaka- * `Asia/Dili` - Asia/Dili- * `Asia/Dubai` - Asia/Dubai- * `Asia/Dushanbe` - Asia/Dushanbe- * `Asia/Famagusta` - Asia/Famagusta- * `Asia/Gaza` - Asia/Gaza- * `Asia/Harbin` - Asia/Harbin- * `Asia/Hebron` - Asia/Hebron- * `Asia/Ho_Chi_Minh` - Asia/Ho_Chi_Minh- * `Asia/Hong_Kong` - Asia/Hong_Kong- * `Asia/Hovd` - Asia/Hovd- * `Asia/Irkutsk` - Asia/Irkutsk- * `Asia/Istanbul` - Asia/Istanbul- * `Asia/Jakarta` - Asia/Jakarta- * `Asia/Jayapura` - Asia/Jayapura- * `Asia/Jerusalem` - Asia/Jerusalem- * `Asia/Kabul` - Asia/Kabul- * `Asia/Kamchatka` - Asia/Kamchatka- * `Asia/Karachi` - Asia/Karachi- * `Asia/Kashgar` - Asia/Kashgar- * `Asia/Kathmandu` - Asia/Kathmandu- * `Asia/Katmandu` - Asia/Katmandu- * `Asia/Khandyga` - Asia/Khandyga- * `Asia/Kolkata` - Asia/Kolkata- * `Asia/Krasnoyarsk` - Asia/Krasnoyarsk- * `Asia/Kuala_Lumpur` - Asia/Kuala_Lumpur- * `Asia/Kuching` - Asia/Kuching- * `Asia/Kuwait` - Asia/Kuwait- * `Asia/Macao` - Asia/Macao- * `Asia/Macau` - Asia/Macau- * `Asia/Magadan` - Asia/Magadan- * `Asia/Makassar` - Asia/Makassar- * `Asia/Manila` - Asia/Manila- * `Asia/Muscat` - Asia/Muscat- * `Asia/Nicosia` - Asia/Nicosia- * `Asia/Novokuznetsk` - Asia/Novokuznetsk- * `Asia/Novosibirsk` - Asia/Novosibirsk- * `Asia/Omsk` - Asia/Omsk- * `Asia/Oral` - Asia/Oral- * `Asia/Phnom_Penh` - Asia/Phnom_Penh- * `Asia/Pontianak` - Asia/Pontianak- * `Asia/Pyongyang` - Asia/Pyongyang- * `Asia/Qatar` - Asia/Qatar- * `Asia/Qostanay` - Asia/Qostanay- * `Asia/Qyzylorda` - Asia/Qyzylorda- * `Asia/Rangoon` - Asia/Rangoon- * `Asia/Riyadh` - Asia/Riyadh- * `Asia/Saigon` - Asia/Saigon- * `Asia/Sakhalin` - Asia/Sakhalin- * `Asia/Samarkand` - Asia/Samarkand- * `Asia/Seoul` - Asia/Seoul- * `Asia/Shanghai` - Asia/Shanghai- * `Asia/Singapore` - Asia/Singapore- * `Asia/Srednekolymsk` - Asia/Srednekolymsk- * `Asia/Taipei` - Asia/Taipei- * `Asia/Tashkent` - Asia/Tashkent- * `Asia/Tbilisi` - Asia/Tbilisi- * `Asia/Tehran` - Asia/Tehran- * `Asia/Tel_Aviv` - Asia/Tel_Aviv- * `Asia/Thimbu` - Asia/Thimbu- * `Asia/Thimphu` - Asia/Thimphu- * `Asia/Tokyo` - Asia/Tokyo- * `Asia/Tomsk` - Asia/Tomsk- * `Asia/Ujung_Pandang` - Asia/Ujung_Pandang- * `Asia/Ulaanbaatar` - Asia/Ulaanbaatar- * `Asia/Ulan_Bator` - Asia/Ulan_Bator- * `Asia/Urumqi` - Asia/Urumqi- * `Asia/Ust-Nera` - Asia/Ust-Nera- * `Asia/Vientiane` - Asia/Vientiane- * `Asia/Vladivostok` - Asia/Vladivostok- * `Asia/Yakutsk` - Asia/Yakutsk- * `Asia/Yangon` - Asia/Yangon- * `Asia/Yekaterinburg` - Asia/Yekaterinburg- * `Asia/Yerevan` - Asia/Yerevan- * `Atlantic/Azores` - Atlantic/Azores- * `Atlantic/Bermuda` - Atlantic/Bermuda- * `Atlantic/Canary` - Atlantic/Canary- * `Atlantic/Cape_Verde` - Atlantic/Cape_Verde- * `Atlantic/Faeroe` - Atlantic/Faeroe- * `Atlantic/Faroe` - Atlantic/Faroe- * `Atlantic/Jan_Mayen` - Atlantic/Jan_Mayen- * `Atlantic/Madeira` - Atlantic/Madeira- * `Atlantic/Reykjavik` - Atlantic/Reykjavik- * `Atlantic/South_Georgia` - Atlantic/South_Georgia- * `Atlantic/St_Helena` - Atlantic/St_Helena- * `Atlantic/Stanley` - Atlantic/Stanley- * `Australia/ACT` - Australia/ACT- * `Australia/Adelaide` - Australia/Adelaide- * `Australia/Brisbane` - Australia/Brisbane- * `Australia/Broken_Hill` - Australia/Broken_Hill- * `Australia/Canberra` - Australia/Canberra- * `Australia/Currie` - Australia/Currie- * `Australia/Darwin` - Australia/Darwin- * `Australia/Eucla` - Australia/Eucla- * `Australia/Hobart` - Australia/Hobart- * `Australia/LHI` - Australia/LHI- * `Australia/Lindeman` - Australia/Lindeman- * `Australia/Lord_Howe` - Australia/Lord_Howe- * `Australia/Melbourne` - Australia/Melbourne- * `Australia/NSW` - Australia/NSW- * `Australia/North` - Australia/North- * `Australia/Perth` - Australia/Perth- * `Australia/Queensland` - Australia/Queensland- * `Australia/South` - Australia/South- * `Australia/Sydney` - Australia/Sydney- * `Australia/Tasmania` - Australia/Tasmania- * `Australia/Victoria` - Australia/Victoria- * `Australia/West` - Australia/West- * `Australia/Yancowinna` - Australia/Yancowinna- * `Brazil/Acre` - Brazil/Acre- * `Brazil/DeNoronha` - Brazil/DeNoronha- * `Brazil/East` - Brazil/East- * `Brazil/West` - Brazil/West- * `CET` - CET- * `CST6CDT` - CST6CDT- * `Canada/Atlantic` - Canada/Atlantic- * `Canada/Central` - Canada/Central- * `Canada/Eastern` - Canada/Eastern- * `Canada/Mountain` - Canada/Mountain- * `Canada/Newfoundland` - Canada/Newfoundland- * `Canada/Pacific` - Canada/Pacific- * `Canada/Saskatchewan` - Canada/Saskatchewan- * `Canada/Yukon` - Canada/Yukon- * `Chile/Continental` - Chile/Continental- * `Chile/EasterIsland` - Chile/EasterIsland- * `Cuba` - Cuba- * `EET` - EET- * `EST` - EST- * `EST5EDT` - EST5EDT- * `Egypt` - Egypt- * `Eire` - Eire- * `Etc/GMT` - Etc/GMT- * `Etc/GMT+0` - Etc/GMT+0- * `Etc/GMT+1` - Etc/GMT+1- * `Etc/GMT+10` - Etc/GMT+10- * `Etc/GMT+11` - Etc/GMT+11- * `Etc/GMT+12` - Etc/GMT+12- * `Etc/GMT+2` - Etc/GMT+2- * `Etc/GMT+3` - Etc/GMT+3- * `Etc/GMT+4` - Etc/GMT+4- * `Etc/GMT+5` - Etc/GMT+5- * `Etc/GMT+6` - Etc/GMT+6- * `Etc/GMT+7` - Etc/GMT+7- * `Etc/GMT+8` - Etc/GMT+8- * `Etc/GMT+9` - Etc/GMT+9- * `Etc/GMT-0` - Etc/GMT-0- * `Etc/GMT-1` - Etc/GMT-1- * `Etc/GMT-10` - Etc/GMT-10- * `Etc/GMT-11` - Etc/GMT-11- * `Etc/GMT-12` - Etc/GMT-12- * `Etc/GMT-13` - Etc/GMT-13- * `Etc/GMT-14` - Etc/GMT-14- * `Etc/GMT-2` - Etc/GMT-2- * `Etc/GMT-3` - Etc/GMT-3- * `Etc/GMT-4` - Etc/GMT-4- * `Etc/GMT-5` - Etc/GMT-5- * `Etc/GMT-6` - Etc/GMT-6- * `Etc/GMT-7` - Etc/GMT-7- * `Etc/GMT-8` - Etc/GMT-8- * `Etc/GMT-9` - Etc/GMT-9- * `Etc/GMT0` - Etc/GMT0- * `Etc/Greenwich` - Etc/Greenwich- * `Etc/UCT` - Etc/UCT- * `Etc/UTC` - Etc/UTC- * `Etc/Universal` - Etc/Universal- * `Etc/Zulu` - Etc/Zulu- * `Europe/Amsterdam` - Europe/Amsterdam- * `Europe/Andorra` - Europe/Andorra- * `Europe/Astrakhan` - Europe/Astrakhan- * `Europe/Athens` - Europe/Athens- * `Europe/Belfast` - Europe/Belfast- * `Europe/Belgrade` - Europe/Belgrade- * `Europe/Berlin` - Europe/Berlin- * `Europe/Bratislava` - Europe/Bratislava- * `Europe/Brussels` - Europe/Brussels- * `Europe/Bucharest` - Europe/Bucharest- * `Europe/Budapest` - Europe/Budapest- * `Europe/Busingen` - Europe/Busingen- * `Europe/Chisinau` - Europe/Chisinau- * `Europe/Copenhagen` - Europe/Copenhagen- * `Europe/Dublin` - Europe/Dublin- * `Europe/Gibraltar` - Europe/Gibraltar- * `Europe/Guernsey` - Europe/Guernsey- * `Europe/Helsinki` - Europe/Helsinki- * `Europe/Isle_of_Man` - Europe/Isle_of_Man- * `Europe/Istanbul` - Europe/Istanbul- * `Europe/Jersey` - Europe/Jersey- * `Europe/Kaliningrad` - Europe/Kaliningrad- * `Europe/Kiev` - Europe/Kiev- * `Europe/Kirov` - Europe/Kirov- * `Europe/Kyiv` - Europe/Kyiv- * `Europe/Lisbon` - Europe/Lisbon- * `Europe/Ljubljana` - Europe/Ljubljana- * `Europe/London` - Europe/London- * `Europe/Luxembourg` - Europe/Luxembourg- * `Europe/Madrid` - Europe/Madrid- * `Europe/Malta` - Europe/Malta- * `Europe/Mariehamn` - Europe/Mariehamn- * `Europe/Minsk` - Europe/Minsk- * `Europe/Monaco` - Europe/Monaco- * `Europe/Moscow` - Europe/Moscow- * `Europe/Nicosia` - Europe/Nicosia- * `Europe/Oslo` - Europe/Oslo- * `Europe/Paris` - Europe/Paris- * `Europe/Podgorica` - Europe/Podgorica- * `Europe/Prague` - Europe/Prague- * `Europe/Riga` - Europe/Riga- * `Europe/Rome` - Europe/Rome- * `Europe/Samara` - Europe/Samara- * `Europe/San_Marino` - Europe/San_Marino- * `Europe/Sarajevo` - Europe/Sarajevo- * `Europe/Saratov` - Europe/Saratov- * `Europe/Simferopol` - Europe/Simferopol- * `Europe/Skopje` - Europe/Skopje- * `Europe/Sofia` - Europe/Sofia- * `Europe/Stockholm` - Europe/Stockholm- * `Europe/Tallinn` - Europe/Tallinn- * `Europe/Tirane` - Europe/Tirane- * `Europe/Tiraspol` - Europe/Tiraspol- * `Europe/Ulyanovsk` - Europe/Ulyanovsk- * `Europe/Uzhgorod` - Europe/Uzhgorod- * `Europe/Vaduz` - Europe/Vaduz- * `Europe/Vatican` - Europe/Vatican- * `Europe/Vienna` - Europe/Vienna- * `Europe/Vilnius` - Europe/Vilnius- * `Europe/Volgograd` - Europe/Volgograd- * `Europe/Warsaw` - Europe/Warsaw- * `Europe/Zagreb` - Europe/Zagreb- * `Europe/Zaporozhye` - Europe/Zaporozhye- * `Europe/Zurich` - Europe/Zurich- * `GB` - GB- * `GB-Eire` - GB-Eire- * `GMT` - GMT- * `GMT+0` - GMT+0- * `GMT-0` - GMT-0- * `GMT0` - GMT0- * `Greenwich` - Greenwich- * `HST` - HST- * `Hongkong` - Hongkong- * `Iceland` - Iceland- * `Indian/Antananarivo` - Indian/Antananarivo- * `Indian/Chagos` - Indian/Chagos- * `Indian/Christmas` - Indian/Christmas- * `Indian/Cocos` - Indian/Cocos- * `Indian/Comoro` - Indian/Comoro- * `Indian/Kerguelen` - Indian/Kerguelen- * `Indian/Mahe` - Indian/Mahe- * `Indian/Maldives` - Indian/Maldives- * `Indian/Mauritius` - Indian/Mauritius- * `Indian/Mayotte` - Indian/Mayotte- * `Indian/Reunion` - Indian/Reunion- * `Iran` - Iran- * `Israel` - Israel- * `Jamaica` - Jamaica- * `Japan` - Japan- * `Kwajalein` - Kwajalein- * `Libya` - Libya- * `MET` - MET- * `MST` - MST- * `MST7MDT` - MST7MDT- * `Mexico/BajaNorte` - Mexico/BajaNorte- * `Mexico/BajaSur` - Mexico/BajaSur- * `Mexico/General` - Mexico/General- * `NZ` - NZ- * `NZ-CHAT` - NZ-CHAT- * `Navajo` - Navajo- * `PRC` - PRC- * `PST8PDT` - PST8PDT- * `Pacific/Apia` - Pacific/Apia- * `Pacific/Auckland` - Pacific/Auckland- * `Pacific/Bougainville` - Pacific/Bougainville- * `Pacific/Chatham` - Pacific/Chatham- * `Pacific/Chuuk` - Pacific/Chuuk- * `Pacific/Easter` - Pacific/Easter- * `Pacific/Efate` - Pacific/Efate- * `Pacific/Enderbury` - Pacific/Enderbury- * `Pacific/Fakaofo` - Pacific/Fakaofo- * `Pacific/Fiji` - Pacific/Fiji- * `Pacific/Funafuti` - Pacific/Funafuti- * `Pacific/Galapagos` - Pacific/Galapagos- * `Pacific/Gambier` - Pacific/Gambier- * `Pacific/Guadalcanal` - Pacific/Guadalcanal- * `Pacific/Guam` - Pacific/Guam- * `Pacific/Honolulu` - Pacific/Honolulu- * `Pacific/Johnston` - Pacific/Johnston- * `Pacific/Kanton` - Pacific/Kanton- * `Pacific/Kiritimati` - Pacific/Kiritimati- * `Pacific/Kosrae` - Pacific/Kosrae- * `Pacific/Kwajalein` - Pacific/Kwajalein- * `Pacific/Majuro` - Pacific/Majuro- * `Pacific/Marquesas` - Pacific/Marquesas- * `Pacific/Midway` - Pacific/Midway- * `Pacific/Nauru` - Pacific/Nauru- * `Pacific/Niue` - Pacific/Niue- * `Pacific/Norfolk` - Pacific/Norfolk- * `Pacific/Noumea` - Pacific/Noumea- * `Pacific/Pago_Pago` - Pacific/Pago_Pago- * `Pacific/Palau` - Pacific/Palau- * `Pacific/Pitcairn` - Pacific/Pitcairn- * `Pacific/Pohnpei` - Pacific/Pohnpei- * `Pacific/Ponape` - Pacific/Ponape- * `Pacific/Port_Moresby` - Pacific/Port_Moresby- * `Pacific/Rarotonga` - Pacific/Rarotonga- * `Pacific/Saipan` - Pacific/Saipan- * `Pacific/Samoa` - Pacific/Samoa- * `Pacific/Tahiti` - Pacific/Tahiti- * `Pacific/Tarawa` - Pacific/Tarawa- * `Pacific/Tongatapu` - Pacific/Tongatapu- * `Pacific/Truk` - Pacific/Truk- * `Pacific/Wake` - Pacific/Wake- * `Pacific/Wallis` - Pacific/Wallis- * `Pacific/Yap` - Pacific/Yap- * `Poland` - Poland- * `Portugal` - Portugal- * `ROC` - ROC- * `ROK` - ROK- * `Singapore` - Singapore- * `Turkey` - Turkey- * `UCT` - UCT- * `US/Alaska` - US/Alaska- * `US/Aleutian` - US/Aleutian- * `US/Arizona` - US/Arizona- * `US/Central` - US/Central- * `US/East-Indiana` - US/East-Indiana- * `US/Eastern` - US/Eastern- * `US/Hawaii` - US/Hawaii- * `US/Indiana-Starke` - US/Indiana-Starke- * `US/Michigan` - US/Michigan- * `US/Mountain` - US/Mountain- * `US/Pacific` - US/Pacific- * `US/Samoa` - US/Samoa- * `UTC` - UTC- * `Universal` - Universal- * `W-SU` - W-SU- * `WET` - WET- * `Zulu` - Zulu */- timezone?: string | null;- /**- * Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday). Only valid when interval is 'week'.- * @minimum 0- * @maximum 6- * @nullable- */- offset_day?: number | null;- /**- * Hour-of-day offset (0-23) for daily and weekly intervals. Only valid when interval is 'day' or 'week'.- * @minimum 0- * @maximum 23- * @nullable- */- offset_hour?: number | null;- }-- /**- * @nullable- */- export type BatchExportBackfillProgress = {- /** @nullable */- readonly total_runs?: number | null;- /** @nullable */- readonly finished_runs?: number | null;- /** @nullable */- readonly progress?: number | null;- } | null;-- /**- * * `Cancelled` - Cancelled- * `Completed` - Completed- * `ContinuedAsNew` - Continued As New- * `Failed` - Failed- * `FailedRetryable` - Failed Retryable- * `Terminated` - Terminated- * `TimedOut` - Timedout- * `Running` - Running- * `Starting` - Starting- */- export type BatchExportBackfillStatusEnum = typeof BatchExportBackfillStatusEnum[keyof typeof BatchExportBackfillStatusEnum];--- export const BatchExportBackfillStatusEnum = {- Cancelled: 'Cancelled',- Completed: 'Completed',- ContinuedAsNew: 'ContinuedAsNew',- Failed: 'Failed',- FailedRetryable: 'FailedRetryable',- Terminated: 'Terminated',- TimedOut: 'TimedOut',- Running: 'Running',- Starting: 'Starting',- } as const;-- export interface BatchExportBackfill {- readonly id: string;- /** @nullable */- readonly progress: BatchExportBackfillProgress;- /**- * The start of the data interval.- * @nullable- */- start_at?: string | null;- /**- * The end of the data interval.- * @nullable- */- end_at?: string | null;- /** The status of this backfill.-- * `Cancelled` - Cancelled- * `Completed` - Completed- * `ContinuedAsNew` - Continued As New- * `Failed` - Failed- * `FailedRetryable` - Failed Retryable- * `Terminated` - Terminated- * `TimedOut` - Timedout- * `Running` - Running- * `Starting` - Starting */- status: BatchExportBackfillStatusEnum;- /** The timestamp at which this BatchExportBackfill was created. */- readonly created_at: string;- /**- * The timestamp at which this BatchExportBackfill finished, successfully or not.- * @nullable- */- finished_at?: string | null;- /** The timestamp at which this BatchExportBackfill was last updated. */- readonly last_updated_at: string;- /**- * The total number of records to export. Initially estimated, updated with actual count after completion.- * @minimum -2147483648- * @maximum 2147483647- * @nullable- */- total_records_count?: number | null;- /**- * The actual start time after adjustment for earliest available data. May differ from start_at if user requested a date before data exists.- * @nullable- */- adjusted_start_at?: string | null;- /** The team this belongs to. */- team: number;- /** The BatchExport this backfill belongs to. */- batch_export: string;- }-- export type DatabricksDestinationRequestType = typeof DatabricksDestinationRequestType[keyof typeof DatabricksDestinationRequestType];--- export const DatabricksDestinationRequestType = {- Databricks: 'Databricks',- } as const;-- /**- * Request shape for creating or updating a Databricks batch-export destination.- */- export interface DatabricksDestinationRequest {- type: DatabricksDestinationRequestType;- /** ID of a databricks-kind Integration. Use the integrations-list MCP tool to find one. */- integration_id: number;- config: DatabricksDestinationConfig;- }-- export type BigQueryDestinationRequestType = typeof BigQueryDestinationRequestType[keyof typeof BigQueryDestinationRequestType];--- export const BigQueryDestinationRequestType = {- BigQuery: 'BigQuery',- } as const;-- /**- * Request shape for creating or updating a BigQuery batch-export destination.- */- export interface BigQueryDestinationRequest {- type: BigQueryDestinationRequestType;- /** ID of a google-cloud-service-account-kind Integration. Use the integrations-list MCP tool to find one. */- integration_id: number;- config: BigQueryDestinationConfig;- }-- export type BatchExportDestinationRequest = DatabricksDestinationRequest | AzureBlobDestinationRequest | BigQueryDestinationRequest;-- /**- * Request body for create/partial_update on BatchExportViewSet.-- Mirrors the writeable fields of `BatchExportSerializer` but uses a polymorphic- `destination` schema so integration_id is marked required on the types that need- it. Responses continue to use `BatchExportSerializer`.- */- export interface BatchExportRequest {- /** Human-readable name for the batch export. */- name: string;- /** Which data model to export (events, persons, sessions).-- * `events` - Events- * `persons` - Persons- * `sessions` - Sessions */- model?: ModelEnum;- /** Destination configuration. Required integration_id is enforced per destination type. */- destination: BatchExportDestinationRequest;- /** How often the batch export should run.-- * `hour` - hour- * `day` - day- * `week` - week- * `every 5 minutes` - every 5 minutes- * `every 15 minutes` - every 15 minutes */- interval: IntervalEnum;- /** Whether the batch export is paused. */- paused?: boolean;- /** Optional HogQL SELECT defining a custom model schema. Only recommended in advanced use cases. */- hogql_query?: string;- filters?: unknown;- /**- * IANA timezone name (e.g. 'America/New_York', 'Europe/London', 'UTC') controlling daily and weekly interval boundaries.- * @nullable- */- timezone?: string | null;- /**- * Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday).- * @minimum 0- * @maximum 6- * @nullable- */- offset_day?: number | null;- /**- * Hour-of-day offset (0-23) for daily and weekly intervals.- * @minimum 0- * @maximum 23- * @nullable- */- offset_hour?: number | null;- }-- /**- * @nullable- */- export type BatchImportCreatedBy = { [key: string]: unknown } | null;-- /**- * * `completed` - Completed- * `failed` - Failed- * `paused` - Paused- * `running` - Running- */- export type BatchImportStatusEnum = typeof BatchImportStatusEnum[keyof typeof BatchImportStatusEnum];--- export const BatchImportStatusEnum = {- Completed: 'completed',- Failed: 'failed',- Paused: 'paused',- Running: 'running',- } as const;-- /**- * Serializer for BatchImport model- */- export interface BatchImport {- readonly id: string;- readonly team_id: number;- readonly created_at: string;- readonly updated_at: string;- readonly state: unknown;- /** @nullable */- readonly created_by: BatchImportCreatedBy;- readonly status: BatchImportStatusEnum;- /** @nullable */- readonly display_status_message: string | null;- readonly import_config: unknown;- }-- export type EventPropFilterTypeEnum = typeof EventPropFilterTypeEnum[keyof typeof EventPropFilterTypeEnum];--- export const EventPropFilterTypeEnum = {- Event: 'event',- Element: 'element',- } as const;-- export interface EventPropFilter {- type: EventPropFilterTypeEnum;- key: string;- value: unknown;- operator?: string | null;- }-- export interface HogQLFilter {- type: 'hogql';- key: string;- value?: unknown;- }-- export interface BehavioralFilter {- bytecode?: unknown[] | null;- bytecode_error?: string | null;- conditionHash?: string | null;- type: 'behavioral';- key: string | number;- value: string;- event_type: string;- time_value?: number | null;- time_interval?: string | null;- negation?: boolean;- operator?: string | null;- operator_value?: number | null;- seq_time_interval?: string | null;- seq_time_value?: number | null;- seq_event?: string | number | null;- seq_event_type?: string | null;- total_periods?: number | null;- min_periods?: number | null;- event_filters?: (EventPropFilter | HogQLFilter)[] | null;- explicit_datetime?: string | null;- explicit_datetime_to?: string | null;- }-- export interface BiasRisk {- /** Observed share of users assigned to `$multiple`, as a percentage (0-100). */- multiple_variant_percentage: number;- }-- /**- * * `BigQuery` - BigQuery- */- export type BigQueryDestinationRequestTypeEnum = typeof BigQueryDestinationRequestTypeEnum[keyof typeof BigQueryDestinationRequestTypeEnum];--- export const BigQueryDestinationRequestTypeEnum = {- BigQuery: 'BigQuery',- } as const;-- export interface BlastRadius {- /** Number of users matching the filters */- affected: number;- /** Total number of users */- total: number;- }-- /**- * Property filters to apply- */- export type BlastRadiusRequestFilters = { [key: string]: unknown };-- export interface BlastRadiusRequest {- /** Property filters to apply */- filters: BlastRadiusRequestFilters;- /**- * Group type index for group-based targeting- * @nullable- */- group_type_index?: number | null;- }-- export interface BooleanScoreDefinitionConfig {- /** Optional label for a true value. */- true_label?: string;- /** Optional label for a false value. */- false_label?: string;- }-- export interface BreakdownItem {- label: string;- value: string | number;- }-- export interface BreakdownValue {- count: number;- value: string;- }-- /**- * Local variables at the time of the hit- */- export type BreakpointHitVariables = { [key: string]: unknown };-- /**- * Schema for a single breakpoint hit event- */- export interface BreakpointHit {- /** Unique identifier for the hit event */- id: string;- /** Line number where the breakpoint was hit */- lineNumber: number;- /** Name of the function where breakpoint was hit */- functionName: string;- /** When the breakpoint was hit */- timestamp: string;- /** Local variables at the time of the hit */- variables: BreakpointHitVariables;- /** Stack trace at the time of the hit */- stackTrace: unknown[];- /** ID of the breakpoint that was hit */- breakpoint_id: string;- /** Filename where the breakpoint was hit */- filename: string;+ export interface RevenueAnalyticsMRRQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: RevenueAnalyticsMRRQueryResultItem[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- /**- * Response schema for breakpoint hits endpoint- */- export interface BreakpointHitsResponse {- /** List of breakpoint hit events */- results: BreakpointHit[];- /** Number of results returned */- count: number;- /** Whether there are more results available */- has_more: boolean;+ export interface RevenueAnalyticsMRRQuery {+ breakdown: RevenueAnalyticsBreakdown[];+ dateRange?: DateRange | null;+ interval: SimpleIntervalType;+ kind?: 'RevenueAnalyticsMRRQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties: RevenueAnalyticsPropertyFilter[];+ response?: RevenueAnalyticsMRRQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * * `distinct_id` - User ID (default)- * `device_id` - Device ID- */- export type BucketingIdentifierEnum = typeof BucketingIdentifierEnum[keyof typeof BucketingIdentifierEnum];--- export const BucketingIdentifierEnum = {- DistinctId: 'distinct_id',- DeviceId: 'device_id',- } as const;-- /**- * * `fully_rolled_out` - fully_rolled_out- * `not_rolled_out` - not_rolled_out- * `partial` - partial- */- export type RolloutStateEnum = typeof RolloutStateEnum[keyof typeof RolloutStateEnum];--- export const RolloutStateEnum = {- FullyRolledOut: 'fully_rolled_out',- NotRolledOut: 'not_rolled_out',- Partial: 'partial',- } as const;-- export interface BulkDeleteDeletedItem {- /** ID of the soft-deleted flag. */- id: number;- /** The flag key at the time of deletion. */- key: string;- /** Rollout state captured before deletion.-- * `fully_rolled_out` - fully_rolled_out- * `not_rolled_out` - not_rolled_out- * `partial` - partial */- rollout_state: RolloutStateEnum;- /**- * Variant key when a multivariate flag was fully rolled out to a single variant; otherwise null.- * @nullable- */- active_variant: string | null;+ export interface RevenueAnalyticsOverviewQueryResponse {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: RevenueAnalyticsOverviewItem[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface BulkDeleteErrorItem {- /** Feature flag ID — integer for valid inputs; the original raw value for invalid inputs. */- id: unknown;- /** The flag key, when known. */- key?: string;- /** Human-readable reason the flag could not be deleted. */- reason: string;+ export interface RevenueAnalyticsOverviewQuery {+ dateRange?: DateRange | null;+ kind?: 'RevenueAnalyticsOverviewQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties: RevenueAnalyticsPropertyFilter[];+ response?: RevenueAnalyticsOverviewQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * * `boolean` - boolean- * `multivariant` - multivariant- * `experiment` - experiment- * `remote_config` - remote_config- */- export type BulkDeleteFiltersTypeEnum = typeof BulkDeleteFiltersTypeEnum[keyof typeof BulkDeleteFiltersTypeEnum];--- export const BulkDeleteFiltersTypeEnum = {- Boolean: 'boolean',- Multivariant: 'multivariant',- Experiment: 'experiment',- RemoteConfig: 'remote_config',- } as const;-- /**- * * `server` - Server- * `client` - Client- * `all` - All- */- export type EvaluationRuntimeEnum = typeof EvaluationRuntimeEnum[keyof typeof EvaluationRuntimeEnum];+ export type RevenueAnalyticsTopCustomersGroupBy = typeof RevenueAnalyticsTopCustomersGroupBy[keyof typeof RevenueAnalyticsTopCustomersGroupBy];- export const EvaluationRuntimeEnum = {- Server: 'server',- Client: 'client',+ export const RevenueAnalyticsTopCustomersGroupBy = {+ Month: 'month',All: 'all',} as const;- /**- * Allowed filter keys for bulk_delete — same shape as the list endpoint's query params.- */- export interface BulkDeleteFilters {- /** Filter by active state.-- * `true` - true- * `false` - false- * `STALE` - STALE */- active?: ActiveEnum;- /** Filter to flags created by a specific user ID. */- created_by_id?: number;- /** Search by feature flag key or name (case-insensitive). */- search?: string;- /** Filter by flag type.-- * `boolean` - boolean- * `multivariant` - multivariant- * `experiment` - experiment- * `remote_config` - remote_config */- type?: BulkDeleteFiltersTypeEnum;- /** Filter by evaluation runtime.-- * `server` - Server- * `client` - Client- * `all` - All */- evaluation_runtime?: EvaluationRuntimeEnum;- /** JSON-encoded property filter to exclude. Same shape as the list endpoint. */- excluded_properties?: string;- /** Tag names to filter by. Flags carrying at least one of these tags match. */- tags?: string[];- /** When true, only matches flags with at least one evaluation context. */- has_evaluation_contexts?: boolean;+ export interface RevenueAnalyticsTopCustomersQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface BulkDeleteRequest {- /** Filter criteria — same shape as the list endpoint's query params. Mutually exclusive with `ids`. Use this to bulk-delete by search/active/tags/etc. instead of supplying explicit IDs. */- filters?: BulkDeleteFilters;- /** Explicit feature flag IDs to soft-delete. Mutually exclusive with `filters`. */- ids?: number[];+ export interface RevenueAnalyticsTopCustomersQuery {+ dateRange?: DateRange | null;+ groupBy: RevenueAnalyticsTopCustomersGroupBy;+ kind?: 'RevenueAnalyticsTopCustomersQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties: RevenueAnalyticsPropertyFilter[];+ response?: RevenueAnalyticsTopCustomersQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * Schema-only — referenced from ``@extend_schema(responses=...)`` to describe the wire format.- Never instantiate this for validation or call ``.is_valid()`` / ``.errors`` on it: the- declared ``errors`` field shadows DRF's inherited ``Serializer.errors`` ReturnDict property,- so accessing ``serializer.errors`` would return this field descriptor instead of validation- errors. The handler builds the response dict directly; this class exists only so drf-spectacular- can render the response in the OpenAPI spec and downstream generated clients.- */- export interface BulkDeleteResponse {- /** Flags successfully soft-deleted. */- deleted: BulkDeleteDeletedItem[];- /** Flags that could not be deleted, with reasons. */- errors: BulkDeleteErrorItem[];+ export interface RevenueExampleEventsQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface BulkIntervieweeContextItem {- /**- * Identifier for the interviewee — typically an email address or PostHog distinct ID. Must match a value in the parent topic's interviewee_emails or interviewee_distinct_ids.- * @maxLength 400- */- interviewee_identifier: string;- /**- * Extra context the voice agent should know about this specific interviewee — e.g. 'uses the replay product but has never used summarization'.- * @maxLength 10000- */- agent_context: string;+ export interface RevenueExampleEventsQuery {+ kind?: 'RevenueExampleEventsQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ response?: RevenueExampleEventsQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface BulkIntervieweeContextRequest {- /** List of interviewee context rows to create. Each item has an `interviewee_identifier` and an `agent_context`. At most 500 items per request. */- items: BulkIntervieweeContextItem[];+ export interface RevenueExampleDataWarehouseTablesQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface BulkIntervieweeContextResponse {- /** Number of rows inserted by this request. */- inserted_count: number;- /** Number of items skipped because a row for that (topic, interviewee_identifier) already existed. */- skipped_count: number;- /** Identifiers from the request whose rows were skipped because a row for that (topic, interviewee_identifier) already existed. */- skipped_identifiers: string[];+ export interface RevenueExampleDataWarehouseTablesQuery {+ kind?: 'RevenueExampleDataWarehouseTablesQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ response?: RevenueExampleDataWarehouseTablesQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface BulkKeysRequest {- /** Feature flag IDs to look up keys for. Strings of digits are also accepted; any other value is reported in the response `warning` field and otherwise ignored. */- ids?: unknown[];- }+ export type ConversionGoalFilter1Response = { [key: string]: unknown } | null;- /**- * Mapping of feature flag ID (as a string) to flag key, for IDs that exist in this project.- */- export type BulkKeysResponseKeys = {[key: string]: string};+ export type ConversionGoalFilter1SchemaMap = {[key: string]: string | unknown};- export interface BulkKeysResponse {- /** Mapping of feature flag ID (as a string) to flag key, for IDs that exist in this project. */- keys: BulkKeysResponseKeys;- /** Present when some submitted IDs were not numeric and were ignored. */- warning?: string;+ export interface ConversionGoalFilter1 {+ conversion_goal_id: string;+ conversion_goal_name: string;+ custom_name?: string | null;+ /** The event or `null` for all events. */+ event?: string | null;+ /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */+ fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ kind?: 'EventsNode';+ limit?: number | null;+ math?: BaseMathType | FunnelMathType | PropertyMathType | CountPerActorMathType | ExperimentMetricMathType | CalendarHeatmapMathType | 'unique_group' | 'hogql' | null;+ math_group_type_index?: MathGroupTypeIndex | null;+ math_hogql?: string | null;+ math_multiplier?: number | null;+ math_property?: string | null;+ math_property_revenue_currency?: RevenueCurrencyPropertyConfig | null;+ math_property_type?: string | null;+ name?: string | null;+ optionalInFunnel?: boolean | null;+ /** Columns to order by */+ orderBy?: string[] | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: ConversionGoalFilter1Response;+ schema_map: ConversionGoalFilter1SchemaMap;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface BulkNotificationIdsRequest {- /**- * UUIDs of notification events to mark in bulk (max 500). Events the user is not a recipient of are silently skipped.- * @maxItems 500- */- notification_ids: string[];- }+ export type ConversionGoalFilter2Response = { [key: string]: unknown } | null;- export interface BulkUpdateTagsError {- id: number;- reason: string;- }+ export type ConversionGoalFilter2SchemaMap = {[key: string]: string | unknown};- export interface BulkUpdateTagsItem {+ export interface ConversionGoalFilter2 {+ conversion_goal_id: string;+ conversion_goal_name: string;+ custom_name?: string | null;+ /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */+ fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;id: number;- tags: string[];+ kind?: 'ActionsNode';+ math?: BaseMathType | FunnelMathType | PropertyMathType | CountPerActorMathType | ExperimentMetricMathType | CalendarHeatmapMathType | 'unique_group' | 'hogql' | null;+ math_group_type_index?: MathGroupTypeIndex | null;+ math_hogql?: string | null;+ math_multiplier?: number | null;+ math_property?: string | null;+ math_property_revenue_currency?: RevenueCurrencyPropertyConfig | null;+ math_property_type?: string | null;+ name?: string | null;+ optionalInFunnel?: boolean | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: ConversionGoalFilter2Response;+ schema_map: ConversionGoalFilter2SchemaMap;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface BulkUpdateTagsRequest {- /**- * List of object IDs to update tags on.- * @maxItems 500- */- ids: number[];- /** 'add' merges with existing tags, 'remove' deletes specific tags, 'set' replaces all tags.+ export type ConversionGoalFilter3Response = { [key: string]: unknown } | null;- * `add` - add- * `remove` - remove- * `set` - set */- action: ActionEnum;- /** Tag names to add, remove, or set. */- tags: string[];- }+ export type ConversionGoalFilter3SchemaMap = {[key: string]: string | unknown};- export interface BulkUpdateTagsResponse {- updated: BulkUpdateTagsItem[];- skipped: BulkUpdateTagsError[];+ export interface ConversionGoalFilter3 {+ conversion_goal_id: string;+ conversion_goal_name: string;+ custom_name?: string | null;+ distinct_id_field: string;+ dw_source_type?: string | null;+ /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */+ fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ id: string;+ id_field: string;+ kind?: 'DataWarehouseNode';+ math?: BaseMathType | FunnelMathType | PropertyMathType | CountPerActorMathType | ExperimentMetricMathType | CalendarHeatmapMathType | 'unique_group' | 'hogql' | null;+ math_group_type_index?: MathGroupTypeIndex | null;+ math_hogql?: string | null;+ math_multiplier?: number | null;+ math_property?: string | null;+ math_property_revenue_currency?: RevenueCurrencyPropertyConfig | null;+ math_property_type?: string | null;+ name?: string | null;+ optionalInFunnel?: boolean | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: ConversionGoalFilter3Response;+ schema_map: ConversionGoalFilter3SchemaMap;+ table_name: string;+ timestamp_field: string;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * * `b2b` - B2B- * `b2c` - B2C- * `other` - Other- */- export type BusinessModelEnum = typeof BusinessModelEnum[keyof typeof BusinessModelEnum];+ export type MarketingAnalyticsDrillDownLevel = typeof MarketingAnalyticsDrillDownLevel[keyof typeof MarketingAnalyticsDrillDownLevel];- export const BusinessModelEnum = {- B2b: 'b2b',- B2c: 'b2c',- Other: 'other',+ export const MarketingAnalyticsDrillDownLevel = {+ Channel: 'channel',+ Source: 'source',+ Campaign: 'campaign',+ AdGroup: 'ad_group',+ Ad: 'ad',+ Medium: 'medium',+ Content: 'content',+ Term: 'term',} as const;- /**- * * `left` - left- * `right` - right- */- export type PlacementEnum = typeof PlacementEnum[keyof typeof PlacementEnum];+ export interface IntegrationFilter {+ /** Selected integration source IDs to filter by (e.g., table IDs or source map IDs) */+ integrationSourceIds?: string[] | null;+ }+ export type MarketingAnalyticsOrderByEnum = typeof MarketingAnalyticsOrderByEnum[keyof typeof MarketingAnalyticsOrderByEnum];- export const PlacementEnum = {- Left: 'left',- Right: 'right',++ export const MarketingAnalyticsOrderByEnum = {+ Asc: 'ASC',+ Desc: 'DESC',} as const;- export interface DashboardTileBasic {- readonly id: number;- readonly dashboard_id: number;- /** @nullable */- deleted?: boolean | null;+ export interface MarketingAnalyticsTableQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MarketingAnalyticsItem[][];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- /**- * * `primary` - Primary- * `secondary` - Secondary- */- export type StyleEnum = typeof StyleEnum[keyof typeof StyleEnum];-+ export interface MarketingAnalyticsTableQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ /** Compare to date range */+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ /** Draft conversion goal that can be set in the UI without saving */+ draftConversionGoal?: ConversionGoalFilter1 | ConversionGoalFilter2 | ConversionGoalFilter3 | null;+ /** Drill-down hierarchy level: channel, source, or campaign (default) */+ drillDownLevel?: MarketingAnalyticsDrillDownLevel | null;+ /** Filter test accounts */+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Filter by integration type */+ integrationFilter?: IntegrationFilter | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'MarketingAnalyticsTableQuery';+ /** Number of rows to return */+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Number of rows to skip before returning rows */+ offset?: number | null;+ /** Columns to order by - similar to EventsQuery format */+ orderBy?: ((string | MarketingAnalyticsOrderByEnum)[])[] | null;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: MarketingAnalyticsTableQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ /** Return a limited set of data. Will use default columns if empty. */+ select?: string[] | null;+ tags?: QueryLogTags | null;+ useSessionsTable?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- export const StyleEnum = {- Primary: 'primary',- Secondary: 'secondary',- } as const;+ export type MarketingAnalyticsAggregatedQueryResponseResults = {[key: string]: MarketingAnalyticsItem};- export interface ButtonTile {- readonly id: string;- readonly created_by: UserBasic;- readonly last_modified_by: UserBasic;- /** @maxLength 2000 */- url: string;- /** @maxLength 200 */- text: string;- placement?: PlacementEnum;- readonly dashboard_tiles: readonly DashboardTileBasic[];- style?: StyleEnum;- readonly last_modified_at: string;- team: number;+ export interface MarketingAnalyticsAggregatedQueryResponse {+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MarketingAnalyticsAggregatedQueryResponseResults;+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface CIMDVerificationToken {- readonly id: string;- /** @maxLength 40 */- label: string;- /** @nullable */- readonly mask_value: string | null;- readonly created_by: UserBasic;- readonly created_at: string;- /** @nullable */- readonly last_used_at: string | null;+ export interface MarketingAnalyticsAggregatedQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ /** Draft conversion goal that can be set in the UI without saving */+ draftConversionGoal?: ConversionGoalFilter1 | ConversionGoalFilter2 | ConversionGoalFilter3 | null;+ /** Drill-down hierarchy level: channel, source, or campaign (default) */+ drillDownLevel?: MarketingAnalyticsDrillDownLevel | null;+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Filter by integration IDs */+ integrationFilter?: IntegrationFilter | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'MarketingAnalyticsAggregatedQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: MarketingAnalyticsAggregatedQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ /** Return a limited set of data. Will use default columns if empty. */+ select?: string[] | null;+ tags?: QueryLogTags | null;+ useSessionsTable?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * Create-response variant that includes the plaintext token.-- Only emitted from the create endpoint - storage-side we only persist the- hash, so subsequent reads use the base serializer.- */- export interface CIMDVerificationTokenWithValue {- readonly id: string;- /** @maxLength 40 */- label: string;- /** @nullable */- readonly mask_value: string | null;- readonly created_by: UserBasic;- readonly created_at: string;- /** @nullable */- readonly last_used_at: string | null;- /** Plaintext token, only returned on creation */- readonly value: string;+ export interface NonIntegratedConversionsTableQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: MarketingAnalyticsItem[][];+ samplingRate?: SamplingRate | null;+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface EventsHeatMapColumnAggregationResult {- column: number;- value: number;+ export interface NonIntegratedConversionsTableQuery {+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */+ aggregation_group_type_index?: number | null;+ /** Compare to date range */+ compareFilter?: CompareFilter | null;+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */+ dataColorTheme?: number | null;+ dateRange?: DateRange | null;+ doPathCleaning?: boolean | null;+ /** Draft conversion goal that can be set in the UI without saving */+ draftConversionGoal?: ConversionGoalFilter1 | ConversionGoalFilter2 | ConversionGoalFilter3 | null;+ /** Filter test accounts */+ filterTestAccounts?: boolean | null;+ includeRevenue?: boolean | null;+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */+ interval?: IntervalType | null;+ kind?: 'NonIntegratedConversionsTableQuery';+ /** Number of rows to return */+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Number of rows to skip before returning rows */+ offset?: number | null;+ /** Columns to order by */+ orderBy?: ((string | MarketingAnalyticsOrderByEnum)[])[] | null;+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];+ response?: NonIntegratedConversionsTableQueryResponse | null;+ sampling?: WebAnalyticsSampling | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ /** Return a limited set of data. Will use default columns if empty. */+ select?: string[] | null;+ tags?: QueryLogTags | null;+ useSessionsTable?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface EventsHeatMapDataResult {- column: number;- row: number;- value: number;+ export type ErrorTrackingOrderBy = typeof ErrorTrackingOrderBy[keyof typeof ErrorTrackingOrderBy];+++ export const ErrorTrackingOrderBy = {+ LastSeen: 'last_seen',+ FirstSeen: 'first_seen',+ Occurrences: 'occurrences',+ Users: 'users',+ Sessions: 'sessions',+ } as const;++ export type OrderDirection2 = typeof OrderDirection2[keyof typeof OrderDirection2];+++ export const OrderDirection2 = {+ Asc: 'ASC',+ Desc: 'DESC',+ } as const;++ export interface ErrorTrackingPendingFingerprintIssueStateUpdate {+ assigned_role_id?: string | null;+ assigned_user_id?: number | null;+ fingerprint: string;+ /** ISO 8601 datetime string. */+ first_seen: string;+ is_deleted: number;+ issue_description?: string | null;+ issue_id: string;+ issue_name?: string | null;+ issue_status: string;+ /** Client-stamped monotonic version (`Date.now()` ms at mutation success). */+ version: number;}- export interface EventsHeatMapRowAggregationResult {- row: number;- value: number;+ export interface ErrorTrackingQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: ErrorTrackingIssue[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface EventsHeatMapStructuredResult {- allAggregations: number;- columnAggregations: EventsHeatMapColumnAggregationResult[];- data: EventsHeatMapDataResult[];- rowAggregations: EventsHeatMapRowAggregationResult[];+ export interface ErrorTrackingQuery {+ assignee?: ErrorTrackingIssueAssignee | null;+ /** Date range to filter results. */+ dateRange: DateRange;+ filterGroup?: PropertyGroupFilter | null;+ /** Whether to filter out test accounts. */+ filterTestAccounts?: boolean | null;+ groupKey?: string | null;+ groupTypeIndex?: number | null;+ /** Filter to a specific error tracking issue by ID. */+ issueId?: string | null;+ kind?: 'ErrorTrackingQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Field to sort results by. */+ orderBy: ErrorTrackingOrderBy;+ /** Sort direction. */+ orderDirection?: OrderDirection2 | null;+ /** Pending fingerprint issue state updates UNIONed into the fingerprint issue state subquery (V3 only). The backend caps the list at 50 entries; extras are dropped silently. */+ pendingFingerprintIssueStateUpdates?: ErrorTrackingPendingFingerprintIssueStateUpdate[] | null;+ personId?: string | null;+ response?: ErrorTrackingQueryResponse | null;+ /** Free-text search across exception type, message, and stack frames. */+ searchQuery?: string | null;+ /** Filter by issue status. */+ status?: ErrorTrackingIssueStatus | string | null;+ tags?: QueryLogTags | null;+ /** Use V2 query path (ClickHouse postgres connector join instead of separate Postgres queries) */+ useQueryV2?: boolean | null;+ /** Use V3 query path (denormalized ClickHouse table, no Postgres joins) */+ useQueryV3?: boolean | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ volumeResolution: number;+ withAggregations?: boolean | null;+ withFirstEvent?: boolean | null;+ withLastEvent?: boolean | null;}- export interface CalendarHeatmapResponse {+ export interface ErrorTrackingIssueCorrelationQueryResponse {+ columns?: string[] | null;/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;- /** Wether more breakdown values are available. */hasMore?: boolean | null;/** Generated HogQL query. */hogql?: string | null;+ limit?: number | null;/** Modifiers used when performing the query */modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;/** Query status indicates whether next to the provided data, a query is still running. */query_status?: QueryStatus | null;/** The date range used for the query */resolved_date_range?: ResolvedDateRangeResponse | null;- results: EventsHeatMapStructuredResult;+ results: ErrorTrackingCorrelatedIssue[];/** Measured timings for different parts of the query generation process */timings?: QueryTiming[] | null;/** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */warnings?: DataWarehouseSyncWarning[] | null;}- export interface CalendarHeatmapQuery {- /** Groups aggregation */- aggregation_group_type_index?: number | null;- /** Properties specific to the trends insight */- calendarHeatmapFilter?: CalendarHeatmapFilter | null;- /** Whether we should be comparing against a specific conversion goal */- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization */- dataColorTheme?: number | null;- /** Date range for the query */- dateRange?: DateRange | null;- /** Exclude internal and test users by applying the respective filters */- filterTestAccounts?: boolean | null;- /** Granularity of the response. Can be one of `hour`, `day`, `week` or `month` */- interval?: IntervalType | null;- kind?: 'CalendarHeatmapQuery';+ export interface ErrorTrackingIssueCorrelationQuery {+ events: string[];+ kind?: 'ErrorTrackingIssueCorrelationQuery';/** Modifiers used when performing the query */modifiers?: HogQLQueryModifiers | null;- /** Property filters for all series */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | PropertyGroupFilter | null;- response?: CalendarHeatmapResponse | null;- /** Sampling rate */- samplingFactor?: number | null;- /** Events and actions to include */- series: (EventsNode | ActionsNode | DataWarehouseNode)[];- /** Tags that will be added to the Query log comment */+ response?: ErrorTrackingIssueCorrelationQueryResponse | null;tags?: QueryLogTags | null;/** version of the node, used for schema migrations */version?: number | null;}- /**- * * `error` - error- * `warning` - warning- */- export type UtmIssueSeverityEnum = typeof UtmIssueSeverityEnum[keyof typeof UtmIssueSeverityEnum];-+ export type ExperimentFunnelsQueryResponseCredibleIntervals = {[key: string]: number[]};- export const UtmIssueSeverityEnum = {- Error: 'error',- Warning: 'warning',- } as const;+ export type ExperimentFunnelsQueryResponseInsightItemItem = { [key: string]: unknown };- export interface UtmIssue {- /** The UTM field with the issue (e.g. utm_campaign, utm_source) */- field: string;- /** Issue severity level+ export type ExperimentFunnelsQueryResponseProbability = {[key: string]: number};- * `error` - error- * `warning` - warning */- severity: UtmIssueSeverityEnum;- /** Human-readable description of the issue */- message: string;+ export interface ExperimentFunnelsQueryResponse {+ credible_intervals: ExperimentFunnelsQueryResponseCredibleIntervals;+ expected_loss: number;+ funnels_query?: FunnelsQuery | null;+ insight: ExperimentFunnelsQueryResponseInsightItemItem[][];+ kind?: 'ExperimentFunnelsQuery';+ probability: ExperimentFunnelsQueryResponseProbability;+ significance_code: ExperimentSignificanceCode;+ significant: boolean;+ stats_version?: number | null;+ variants: ExperimentVariantFunnelsBaseStats[];+ /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface CampaignAuditResult {- /** Campaign name from the ad platform */- campaign_name: string;- /** Campaign ID from the ad platform */- campaign_id: string;- /** Integration source name (e.g. google, meta) */- source_name: string;- /** Total spend for this campaign in the period */- spend: number;- /** Total clicks for this campaign */- clicks: number;- /** Total impressions for this campaign */- impressions: number;- /** Whether matching UTM pageview events were found */- has_utm_events: boolean;- /** Number of matching UTM pageview events */- event_count: number;- /** List of detected UTM configuration issues */- issues: UtmIssue[];+ export interface ExperimentFunnelsQuery {+ experiment_id?: number | null;+ fingerprint?: string | null;+ funnels_query: FunnelsQuery;+ kind?: 'ExperimentFunnelsQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ name?: string | null;+ response?: ExperimentFunnelsQueryResponse | null;+ tags?: QueryLogTags | null;+ uuid?: string | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * Supporting evidence- */- export type CapabilityStateEvidence = { [key: string]: unknown };+ export type ExperimentTrendsQueryResponseCredibleIntervals = {[key: string]: number[]};- /**- * * `needs_setup` - needs_setup- * `detected` - detected- * `waiting_for_data` - waiting_for_data- * `ready` - ready- * `not_applicable` - not_applicable- * `unknown` - unknown- */- export type CapabilityStateStateEnum = typeof CapabilityStateStateEnum[keyof typeof CapabilityStateStateEnum];+ export type ExperimentTrendsQueryResponseInsightItem = { [key: string]: unknown };+ export type ExperimentTrendsQueryResponseProbability = {[key: string]: number};- export const CapabilityStateStateEnum = {- NeedsSetup: 'needs_setup',- Detected: 'detected',- WaitingForData: 'waiting_for_data',- Ready: 'ready',- NotApplicable: 'not_applicable',- Unknown: 'unknown',- } as const;+ export interface ExperimentTrendsQueryResponse {+ count_query?: TrendsQuery | null;+ credible_intervals: ExperimentTrendsQueryResponseCredibleIntervals;+ exposure_query?: TrendsQuery | null;+ insight: ExperimentTrendsQueryResponseInsightItem[];+ kind?: 'ExperimentTrendsQuery';+ p_value: number;+ probability: ExperimentTrendsQueryResponseProbability;+ significance_code: ExperimentSignificanceCode;+ significant: boolean;+ stats_version?: number | null;+ variants: ExperimentVariantTrendsBaseStats[];+ /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }- export interface CapabilityState {- /** Current state of the capability+ export interface ExperimentTrendsQuery {+ count_query: TrendsQuery;+ experiment_id?: number | null;+ exposure_query?: TrendsQuery | null;+ fingerprint?: string | null;+ kind?: 'ExperimentTrendsQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ name?: string | null;+ response?: ExperimentTrendsQueryResponse | null;+ tags?: QueryLogTags | null;+ uuid?: string | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- * `needs_setup` - needs_setup- * `detected` - detected- * `waiting_for_data` - waiting_for_data- * `ready` - ready- * `not_applicable` - not_applicable- * `unknown` - unknown */- state: CapabilityStateStateEnum;- /** Whether the state is estimated from static analysis */- estimated: boolean;- /** Human-readable explanation */- reason: string;- /** Supporting evidence */- evidence?: CapabilityStateEvidence;+ export interface TracesQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: LLMTrace[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;}- export interface CategoricalScoreOption {- /**- * Stable option key. Use lowercase letters, numbers, underscores, or hyphens.- * @maxLength 128- */- key: string;- /**- * Human-readable option label.- * @maxLength 256- */- label: string;+ export interface TracesQuery {+ dateRange?: DateRange | null;+ filterSupportTraces?: boolean | null;+ filterTestAccounts?: boolean | null;+ groupKey?: string | null;+ groupTypeIndex?: number | null;+ kind?: 'TracesQuery';+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Person who performed the event */+ personId?: string | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ /** Use random ordering instead of timestamp DESC. Useful for representative sampling to avoid recency bias. */+ randomOrder?: boolean | null;+ response?: TracesQueryResponse | null;+ showColumnConfigurator?: boolean | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * * `single` - single- * `multiple` - multiple- */- export type SelectionModeEnum = typeof SelectionModeEnum[keyof typeof SelectionModeEnum];+ export interface TraceQueryResponse {+ columns?: string[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: LLMTrace[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }+ export interface TraceQuery {+ dateRange?: DateRange | null;+ kind?: 'TraceQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Properties configurable in the interface */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ response?: TraceQueryResponse | null;+ tags?: QueryLogTags | null;+ traceId: string;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- export const SelectionModeEnum = {- Single: 'single',- Multiple: 'multiple',- } as const;+ export type EndpointsUsageBreakdown = typeof EndpointsUsageBreakdown[keyof typeof EndpointsUsageBreakdown];- export interface CategoricalScoreDefinitionConfig {- /** Ordered categorical options available to the scorer. */- options: CategoricalScoreOption[];- /** Whether reviewers can select one option or multiple options. Defaults to `single`.- * `single` - single- * `multiple` - multiple */- selection_mode?: SelectionModeEnum;- /**- * Optional minimum number of options that can be selected when `selection_mode` is `multiple`.- * @minimum 1- * @nullable- */- min_selections?: number | null;- /**- * Optional maximum number of options that can be selected when `selection_mode` is `multiple`.- * @minimum 1- * @nullable- */- max_selections?: number | null;- }+ export const EndpointsUsageBreakdown = {+ Endpoint: 'Endpoint',+ MaterializationType: 'MaterializationType',+ ApiKey: 'ApiKey',+ Status: 'Status',+ } as const;- /**- * * `marketing` - Marketing- * `transactional` - Transactional- */- export type CategoryTypeEnum = typeof CategoryTypeEnum[keyof typeof CategoryTypeEnum];+ export type MaterializationType = typeof MaterializationType[keyof typeof MaterializationType];- export const CategoryTypeEnum = {- Marketing: 'marketing',- Transactional: 'transactional',+ export const MaterializationType = {+ Materialized: 'materialized',+ Inline: 'inline',} as const;- /**- * * `consolidated` - consolidated- * `cdc_only` - cdc_only- * `both` - both- */- export type CdcTableModeEnum = typeof CdcTableModeEnum[keyof typeof CdcTableModeEnum];+ export type EndpointsUsageOrderByField = typeof EndpointsUsageOrderByField[keyof typeof EndpointsUsageOrderByField];- export const CdcTableModeEnum = {- Consolidated: 'consolidated',- CdcOnly: 'cdc_only',- Both: 'both',+ export const EndpointsUsageOrderByField = {+ Requests: 'requests',+ BytesRead: 'bytes_read',+ CpuSeconds: 'cpu_seconds',+ AvgQueryDurationMs: 'avg_query_duration_ms',+ ErrorRate: 'error_rate',} as const;- export type ChangeRequestApprovalsItem = { [key: string]: unknown };-- /**- * * `valid` - Valid- * `invalid` - Invalid- * `expired` - Expired- * `stale` - Stale (resource changed)- */- export type ValidationStatusEnum = typeof ValidationStatusEnum[keyof typeof ValidationStatusEnum];+ export type EndpointsUsageOrderByDirection = typeof EndpointsUsageOrderByDirection[keyof typeof EndpointsUsageOrderByDirection];- export const ValidationStatusEnum = {- Valid: 'valid',- Invalid: 'invalid',- Expired: 'expired',- Stale: 'stale',+ export const EndpointsUsageOrderByDirection = {+ Asc: 'ASC',+ Desc: 'DESC',} as const;- /**- * * `pending` - Pending- * `approved` - Approved (awaiting application)- * `applied` - Applied- * `rejected` - Rejected- * `expired` - Expired- * `failed` - Failed to apply- */- export type ChangeRequestStateEnum = typeof ChangeRequestStateEnum[keyof typeof ChangeRequestStateEnum];+ export interface EndpointsUsageTableQueryResponse {+ columns?: unknown[] | null;+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */+ error?: string | null;+ hasMore?: boolean | null;+ /** Generated HogQL query. */+ hogql?: string | null;+ limit?: number | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ /** Query status indicates whether next to the provided data, a query is still running. */+ query_status?: QueryStatus | null;+ /** The date range used for the query */+ resolved_date_range?: ResolvedDateRangeResponse | null;+ results: unknown[];+ /** Measured timings for different parts of the query generation process */+ timings?: QueryTiming[] | null;+ types?: unknown[] | null;+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */+ warnings?: DataWarehouseSyncWarning[] | null;+ }+ export interface EndpointsUsageTableQuery {+ breakdownBy: EndpointsUsageBreakdown;+ dateRange?: DateRange | null;+ /** Filter to specific endpoints by name */+ endpointNames?: string[] | null;+ kind?: 'EndpointsUsageTableQuery';+ limit?: number | null;+ /** Filter by materialization type */+ materializationType?: MaterializationType | null;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ offset?: number | null;+ orderBy?: (EndpointsUsageOrderByField | EndpointsUsageOrderByDirection)[] | null;+ response?: EndpointsUsageTableQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- export const ChangeRequestStateEnum = {- Pending: 'pending',- Approved: 'approved',- Applied: 'applied',- Rejected: 'rejected',- Expired: 'expired',- Failed: 'failed',- } as const;+ export type DataTableNodeResponse = { [key: string]: unknown } | Response | Response1 | Response2 | Response3 | Response4 | Response5 | Response6 | Response7 | Response8 | Response9 | Response10 | Response11 | Response12 | Response13 | Response14 | Response15 | Response16 | Response18 | Response19 | Response20 | Response21 | Response22 | Response23 | Response24 | Response25 | Response26 | Response27 | null;- export interface ChangeRequest {- readonly id: string;- readonly action_key: string;- readonly action_version: number;- readonly resource_type: string;- /** @nullable */- readonly resource_id: string | null;- readonly intent: unknown;- readonly intent_display: unknown;- readonly policy_snapshot: unknown;- readonly validation_status: ValidationStatusEnum;- readonly validation_errors: unknown;- /** @nullable */- readonly validated_at: string | null;- readonly state: ChangeRequestStateEnum;- readonly created_by: UserBasic;- readonly applied_by: UserBasic;- readonly created_at: string;- /** @nullable */- readonly updated_at: string | null;- readonly expires_at: string;- /** @nullable */- readonly applied_at: string | null;- readonly apply_error: string;- readonly result_data: unknown;- readonly approvals: readonly ChangeRequestApprovalsItem[];- /** Check if current user can approve this change request. */- readonly can_approve: boolean;- readonly can_cancel: boolean;- /** Check if current user is the requester. */- readonly is_requester: boolean;- /**- * Get the current user's approval decision if they have voted.- * @nullable- */- readonly user_decision: string | null;+ export interface DataTableNode {+ /** Can the user click on column headers to sort the table? (default: true) */+ allowSorting?: boolean | null;+ /** Columns shown in the table, unless the `source` provides them. */+ columns?: string[] | null;+ /** Context for the table, used by components like ColumnConfigurator */+ context?: DataTableNodeViewPropsContext | null;+ /** Context key for universal column configuration (e.g., "survey:123") */+ contextKey?: string | null;+ /** Default columns to use when resetting column configuration */+ defaultColumns?: string[] | null;+ /** Uses the embedded version of LemonTable */+ embedded?: boolean | null;+ /** Can expand row to show raw event data (default: true) */+ expandable?: boolean | null;+ /** Show with most visual options enabled. Used in scenes. */+ full?: boolean | null;+ /** Columns that aren't shown in the table, even if in columns or returned data */+ hiddenColumns?: string[] | null;+ kind: DataTableNodeKind;+ /** Columns that are sticky when scrolling horizontally */+ pinnedColumns?: string[] | null;+ /** Link properties via the URL (default: false) */+ propertiesViaUrl?: boolean | null;+ response?: DataTableNodeResponse;+ /** Render date-time columns (timestamp, created_at, last_seen, last_seen_at, session_start, session_end) as absolute date+time instead of relative ("X ago"). The toggle is exposed in the column header menu only on EventsQuery / ActorsQuery sources. */+ showAbsoluteTime?: boolean | null;+ /** Show the kebab menu at the end of the row */+ showActions?: boolean | null;+ /** Show a button to configure the table's columns if possible */+ showColumnConfigurator?: boolean | null;+ /** Show count of total and filtered results */+ showCount?: boolean | null;+ /** Show date range selector */+ showDateRange?: boolean | null;+ /** Show the time it takes to run a query */+ showElapsedTime?: boolean | null;+ /** Include an event filter above the table (EventsNode only) */+ showEventFilter?: boolean | null;+ /** Include an events filter above the table to filter by multiple events (EventsQuery only) */+ showEventsFilter?: boolean | null;+ /** Show the export button */+ showExport?: boolean | null;+ /** Include a HogQL query editor above HogQL tables */+ showHogQLEditor?: boolean | null;+ /** Show a button to open the current query as a new insight. (default: true) */+ showOpenEditorButton?: boolean | null;+ /** Show a button to configure and persist the table's default columns if possible */+ showPersistentColumnConfigurator?: boolean | null;+ /** Include a property filter above the table */+ showPropertyFilter?: boolean | TaxonomicFilterGroupType[] | null;+ /** Show a recording column for events with session recordings */+ showRecordingColumn?: boolean | null;+ /** Show a reload button */+ showReload?: boolean | null;+ /** Show a results table */+ showResultsTable?: boolean | null;+ /** Show saved filters feature for this table (requires uniqueKey) */+ showSavedFilters?: boolean | null;+ /** Shows a list of saved queries */+ showSavedQueries?: boolean | null;+ /** Include a free text search field (PersonsNode only) */+ showSearch?: boolean | null;+ /** Show actors query options and back to source */+ showSourceQueryOptions?: boolean | null;+ /** Show table views feature for this table (requires uniqueKey) */+ showTableViews?: boolean | null;+ /** Show filter to exclude test accounts */+ showTestAccountFilters?: boolean | null;+ /** Show a detailed query timing breakdown */+ showTimings?: boolean | null;+ /** Source of the events */+ source: EventsNode | EventsQuery | PersonsNode | ActorsQuery | GroupsQuery | HogQLQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | SessionAttributionExplorerQuery | SessionsQuery | RevenueAnalyticsGrossRevenueQuery | RevenueAnalyticsMetricsQuery | RevenueAnalyticsMRRQuery | RevenueAnalyticsOverviewQuery | RevenueAnalyticsTopCustomersQuery | RevenueExampleEventsQuery | RevenueExampleDataWarehouseTablesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | NonIntegratedConversionsTableQuery | ErrorTrackingQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | TracesQuery | TraceQuery | EndpointsUsageTableQuery | AccountsQuery;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- /**- * * `slack_channel_message` - Channel message- * `slack_bot_mention` - Bot mention- * `slack_emoji_reaction` - Emoji reaction- * `teams_channel_message` - Teams channel message- * `teams_bot_mention` - Teams bot mention- * `widget_embedded` - Widget- * `widget_api` - API- * `github_issue` - GitHub issue- */- export type ChannelDetailEnum = typeof ChannelDetailEnum[keyof typeof ChannelDetailEnum];+ export interface HeatmapGradientStop {+ color: string;+ value: number;+ }++ export type GradientScaleMode = typeof GradientScaleMode[keyof typeof GradientScaleMode];- export const ChannelDetailEnum = {- SlackChannelMessage: 'slack_channel_message',- SlackBotMention: 'slack_bot_mention',- SlackEmojiReaction: 'slack_emoji_reaction',- TeamsChannelMessage: 'teams_channel_message',- TeamsBotMention: 'teams_bot_mention',- WidgetEmbedded: 'widget_embedded',- WidgetApi: 'widget_api',- GithubIssue: 'github_issue',+ export const GradientScaleMode = {+ Absolute: 'absolute',+ Relative: 'relative',} as const;- /**- * * `widget` - Widget- * `email` - Email- * `slack` - Slack- * `teams` - Microsoft Teams- * `github` - GitHub- */- export type ChannelSourceEnum = typeof ChannelSourceEnum[keyof typeof ChannelSourceEnum];+ export type HeatmapSortOrder = typeof HeatmapSortOrder[keyof typeof HeatmapSortOrder];- export const ChannelSourceEnum = {- Widget: 'widget',- Email: 'email',- Slack: 'slack',- Teams: 'teams',- Github: 'github',+ export const HeatmapSortOrder = {+ Asc: 'asc',+ Desc: 'desc',+ } as const;++ export interface HeatmapSettings {+ gradient?: HeatmapGradientStop[] | null;+ gradientPreset?: string | null;+ gradientScaleMode?: GradientScaleMode | null;+ nullLabel?: string | null;+ nullValue?: string | null;+ sortColumn?: string | null;+ sortOrder?: HeatmapSortOrder | null;+ valueColumn?: string | null;+ xAxisColumn?: string | null;+ xAxisLabel?: string | null;+ yAxisColumn?: string | null;+ yAxisLabel?: string | null;+ }++ export type Scale = typeof Scale[keyof typeof Scale];+++ export const Scale = {+ Linear: 'linear',+ Logarithmic: 'logarithmic',} as const;+ export interface YAxisSettings {+ label?: string | null;+ scale?: Scale | null;+ showGridLines?: boolean | null;+ showTicks?: boolean | null;+ /** Whether the Y axis should start at zero */+ startAtZero?: boolean | null;+ }+export type DisplayType = typeof DisplayType[keyof typeof DisplayType];@@ -7354,59 +6518,6 @@ export namespace Schemas {*/export type ChartSettingsResultCustomizations = {[key: string]: ResultCustomizationByValue} | null;- export interface HeatmapGradientStop {- color: string;- value: number;- }-- export type GradientScaleMode = typeof GradientScaleMode[keyof typeof GradientScaleMode];--- export const GradientScaleMode = {- Absolute: 'absolute',- Relative: 'relative',- } as const;-- export type HeatmapSortOrder = typeof HeatmapSortOrder[keyof typeof HeatmapSortOrder];--- export const HeatmapSortOrder = {- Asc: 'asc',- Desc: 'desc',- } as const;-- export interface HeatmapSettings {- gradient?: HeatmapGradientStop[] | null;- gradientPreset?: string | null;- gradientScaleMode?: GradientScaleMode | null;- nullLabel?: string | null;- nullValue?: string | null;- sortColumn?: string | null;- sortOrder?: HeatmapSortOrder | null;- valueColumn?: string | null;- xAxisColumn?: string | null;- xAxisLabel?: string | null;- yAxisColumn?: string | null;- yAxisLabel?: string | null;- }-- export type Scale = typeof Scale[keyof typeof Scale];--- export const Scale = {- Linear: 'linear',- Logarithmic: 'logarithmic',- } as const;-- export interface YAxisSettings {- label?: string | null;- scale?: Scale | null;- showGridLines?: boolean | null;- showTicks?: boolean | null;- /** Whether the Y axis should start at zero */- startAtZero?: boolean | null;- }-export interface ChartSettings {goalLines?: GoalLine[] | null;heatmap?: HeatmapSettings | null;@@ -7432,4367 +6543,5414 @@ export namespace Schemas {yAxisAtZero?: boolean | null;}- export interface CheckDatabaseNameResponse {- name: string;- available: boolean;- }-- /**- * * `claude` - claude- */- export type ClaudeRuntimeAdapterEnum = typeof ClaudeRuntimeAdapterEnum[keyof typeof ClaudeRuntimeAdapterEnum];+ export type DataVisualizationNodeKind = typeof DataVisualizationNodeKind[keyof typeof DataVisualizationNodeKind];- export const ClaudeRuntimeAdapterEnum = {- Claude: 'claude',+ export const DataVisualizationNodeKind = {+ DataVisualizationNode: 'DataVisualizationNode',} as const;- /**- * * `interactive` - interactive- * `background` - background- */- export type TaskExecutionModeEnum = typeof TaskExecutionModeEnum[keyof typeof TaskExecutionModeEnum];+ export type ColorMode = typeof ColorMode[keyof typeof ColorMode];- export const TaskExecutionModeEnum = {- Interactive: 'interactive',- Background: 'background',+ export const ColorMode = {+ Light: 'light',+ Dark: 'dark',} as const;- /**- * * `user` - user- * `bot` - bot- */- export type PrAuthorshipModeEnum = typeof PrAuthorshipModeEnum[keyof typeof PrAuthorshipModeEnum];+ export interface ConditionalFormattingRule {+ bytecode: unknown[];+ color: string;+ colorMode?: ColorMode | null;+ columnName: string;+ id: string;+ input: string;+ templateId: string;+ }+ export interface TableSettings {+ columns?: ChartAxis[] | null;+ conditionalFormatting?: ConditionalFormattingRule[] | null;+ pinnedColumns?: string[] | null;+ transpose?: boolean | null;+ }- export const PrAuthorshipModeEnum = {- User: 'user',- Bot: 'bot',- } as const;+ export interface DataVisualizationNode {+ chartSettings?: ChartSettings | null;+ display?: ChartDisplayType | null;+ kind: DataVisualizationNodeKind;+ source: HogQLQuery;+ tableSettings?: TableSettings | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }- /**- * * `manual` - manual- * `signal_report` - signal_report- */- export type RunSourceEnum = typeof RunSourceEnum[keyof typeof RunSourceEnum];+ export type HogQueryKind = typeof HogQueryKind[keyof typeof HogQueryKind];- export const RunSourceEnum = {- Manual: 'manual',- SignalReport: 'signal_report',+ export const HogQueryKind = {+ HogQuery: 'HogQuery',} as const;- /**- * * `low` - low- * `medium` - medium- * `high` - high- * `xhigh` - xhigh- * `max` - max- */- export type ReasoningEffortEnum = typeof ReasoningEffortEnum[keyof typeof ReasoningEffortEnum];-+ export interface HogQueryResponse {+ bytecode?: unknown[] | null;+ coloredBytecode?: unknown[] | null;+ results: unknown;+ stdout?: string | null;+ }- export const ReasoningEffortEnum = {- Low: 'low',- Medium: 'medium',- High: 'high',- Xhigh: 'xhigh',- Max: 'max',- } as const;+ export interface HogQuery {+ code?: string | null;+ kind: HogQueryKind;+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ response?: HogQueryResponse | null;+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;+ }/**- * * `default` - default- * `acceptEdits` - acceptEdits- * `plan` - plan- * `bypassPermissions` - bypassPermissions- * `auto` - auto+ * The query definition for this insight. The `kind` field determines the query type:+ - `InsightVizNode` — product analytics (trends, funnels, retention, paths, stickiness, lifecycle)+ - `DataVisualizationNode` — SQL insights using HogQL+ - `DataTableNode` — raw data tables+ - `HogQuery` — Hog language queries*/- export type ClaudeTaskRunCreateSchemaInitialPermissionModeEnum = typeof ClaudeTaskRunCreateSchemaInitialPermissionModeEnum[keyof typeof ClaudeTaskRunCreateSchemaInitialPermissionModeEnum];+ export type _InsightQuerySchema = InsightVizNode | DataTableNode | DataVisualizationNode | HogQuery;+ export interface DashboardTileBasic {+ readonly id: number;+ readonly dashboard_id: number;+ /** @nullable */+ deleted?: boolean | null;+ }- export const ClaudeTaskRunCreateSchemaInitialPermissionModeEnum = {- Default: 'default',- AcceptEdits: 'acceptEdits',- Plan: 'plan',- BypassPermissions: 'bypassPermissions',- Auto: 'auto',+ export type EffectivePrivilegeLevelEnum = typeof EffectivePrivilegeLevelEnum[keyof typeof EffectivePrivilegeLevelEnum];+++ export const EffectivePrivilegeLevelEnum = {+ Number21: 21,+ Number37: 37,} as const;/**- * Request body for creating a new task run+ * @nullable*/- export interface ClaudeTaskRunCreateSchema {- /** Execution mode: 'interactive' for user-connected runs, 'background' for autonomous runs+ export type InsightResolvedDateRange = {+ readonly date_from?: string;+ readonly date_to?: string;+ } | null;- * `interactive` - interactive- * `background` - background */- mode?: TaskExecutionModeEnum;+ /**+ * Simplified serializer to speed response times when loading large amounts of objects.+ */+ export interface Insight {+ readonly id: number;+ readonly short_id: string;/**- * Git branch to checkout in the sandbox- * @maxLength 255+ * @maxLength 400* @nullable*/- branch?: string | null;- /** ID of a previous run to resume from. Must belong to the same task. */- resume_from_run_id?: string;- /** Initial or follow-up user message to include in the run prompt. */- pending_user_message?: string;- /** Identifiers for staged task artifacts that should be attached to the initial run prompt. */- pending_user_artifact_ids?: string[];- /** Optional sandbox environment to apply for this cloud run. */- sandbox_environment_id?: string;- /** Whether pull requests for this run should be authored by the user or the bot.-- * `user` - user- * `bot` - bot */- pr_authorship_mode?: PrAuthorshipModeEnum;- /** High-level source that triggered this run, used to distinguish manual and signal-based cloud runs.-- * `manual` - manual- * `signal_report` - signal_report */- run_source?: RunSourceEnum;- /** Optional signal report identifier when this run was started from Inbox. */- signal_report_id?: string;- /** Agent runtime adapter to launch for this run. Must be 'claude' for Claude runtimes.-- * `claude` - claude */- runtime_adapter: ClaudeRuntimeAdapterEnum;- /** LLM model identifier to run in the Claude runtime. */- model: string;- /** Reasoning effort to request for models that expose an effort control.-- * `low` - low- * `medium` - medium- * `high` - high- * `xhigh` - xhigh- * `max` - max */- reasoning_effort?: ReasoningEffortEnum;- /** Optional GitHub user token from PostHog Code for user-authored cloud pull requests. Prefer linking GitHub from Settings → Linked accounts so the server can manage tokens; this field remains supported for callers that still manage their own tokens. */- github_user_token?: string;- /** Initial permission mode for Claude runtimes.-- * `default` - default- * `acceptEdits` - acceptEdits- * `plan` - plan- * `bypassPermissions` - bypassPermissions- * `auto` - auto */- initial_permission_mode?: ClaudeTaskRunCreateSchemaInitialPermissionModeEnum;- }-- export type ClickhouseEventProperties = { [key: string]: unknown };-- /**- * @nullable- */- export type ClickhouseEventPerson = { [key: string]: unknown } | null;+ name?: string | null;+ /**+ * @maxLength 400+ * @nullable+ */+ derived_name?: string | null;+ query?: _InsightQuerySchema | null;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ order?: number | null;+ deleted?: boolean;+ /**+ DEPRECATED. Will be removed in a future release. Use dashboard_tiles instead.+ A dashboard ID for each of the dashboards that this insight is displayed on.+ */+ dashboards?: number[];+ /**+ A dashboard tile ID and dashboard_id for each of the dashboards that this insight is displayed on.+ */+ readonly dashboard_tiles: readonly DashboardTileBasic[];+ /**+ *+ The datetime this insight's results were generated.+ If added to one or more dashboards the insight can be refreshed separately on each.+ Returns the appropriate last_refresh datetime for the context the insight is viewed in+ (see from_dashboard query parameter).- export interface EventElement {- event: string;+ * @nullable+ */+ readonly last_refresh: string | null;/**- * @maxLength 10000+ * The target age of the cached results for this insight.* @nullable*/- text?: string | null;+ readonly cache_target_age: string | null;/**- * @maxLength 1000+ *+ The earliest possible datetime at which we'll allow the cached results for this insight to be refreshed+ by querying the database.+* @nullable*/- tag_name?: string | null;+ readonly next_allowed_client_refresh: string | null;+ readonly result: unknown;/** @nullable */- attr_class?: string[] | null;+ readonly hasMore: boolean | null;+ /** @nullable */+ readonly columns: readonly string[] | null;+ /** @nullable */+ readonly created_at: string | null;+ readonly created_by: UserBasic;/**- * @maxLength 10000+ * @maxLength 400* @nullable*/- href?: string | null;+ description?: string | null;+ readonly updated_at: string;+ tags?: unknown[];+ favorited?: boolean;+ readonly last_modified_at: string;+ readonly last_modified_by: UserBasic;+ readonly is_sample: boolean;+ readonly effective_restriction_level: EffectivePrivilegeLevelEnum;+ readonly effective_privilege_level: EffectivePrivilegeLevelEnum;/**- * @maxLength 10000+ * The effective access level the user has for this object* @nullable*/- attr_id?: string | null;+ readonly user_access_level: string | null;/**- * @minimum -2147483648- * @maximum 2147483647+ * The timezone this chart is displayed in.* @nullable*/- nth_child?: number | null;+ readonly timezone: string | null;+ readonly is_cached: boolean;+ readonly query_status: unknown;+ /** @nullable */+ readonly hogql: string | null;+ /** @nullable */+ readonly types: readonly unknown[] | null;+ /** @nullable */+ readonly resolved_date_range: InsightResolvedDateRange;+ _create_in_folder?: string;+ readonly alerts: readonly unknown[];+ /** @nullable */+ readonly last_viewed_at: string | null;+ }++ export interface Text {+ readonly id: number;+ readonly created_by: UserBasic;+ readonly last_modified_by: UserBasic;+ /**+ * @maxLength 4000+ * @nullable+ */+ body?: string | null;+ readonly dashboard_tiles: readonly DashboardTileBasic[];+ readonly last_modified_at: string;+ team: number;+ }++ /**+ * * `left` - left+ * `right` - right+ */+ export type PlacementEnum = typeof PlacementEnum[keyof typeof PlacementEnum];+++ export const PlacementEnum = {+ Left: 'left',+ Right: 'right',+ } as const;++ /**+ * * `primary` - Primary+ * `secondary` - Secondary+ */+ export type StyleEnum = typeof StyleEnum[keyof typeof StyleEnum];+++ export const StyleEnum = {+ Primary: 'primary',+ Secondary: 'secondary',+ } as const;++ export interface ButtonTile {+ readonly id: string;+ readonly created_by: UserBasic;+ readonly last_modified_by: UserBasic;+ /** @maxLength 2000 */+ url: string;+ /** @maxLength 200 */+ text: string;+ placement?: PlacementEnum;+ readonly dashboard_tiles: readonly DashboardTileBasic[];+ style?: StyleEnum;+ readonly last_modified_at: string;+ team: number;+ }++ export interface DashboardWidget {+ readonly id: string;+ readonly created_by: UserBasic;+ readonly last_modified_by: UserBasic;+ /**+ * Widget type identifier from the dashboard widget catalog.+ * @maxLength 64+ */+ widget_type: string;+ /**+ * Optional custom display name for this widget tile. Falls back to the widget catalog label when unset.+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** Optional markdown description shown on the dashboard tile when enabled. */+ description?: string;+ /** Widget-specific configuration JSON for this widget type. */+ config?: ErrorTrackingListWidgetConfig;+ readonly dashboard_tiles: readonly DashboardTileBasic[];+ readonly last_modified_at: string;+ team: number;+ }++ export interface DashboardTile {+ id?: number;+ insight: Insight;+ text: Text;+ button_tile: ButtonTile;+ widget?: DashboardWidget | null;+ layouts?: unknown;/**- * @minimum -2147483648- * @maximum 2147483647+ * @maxLength 400* @nullable*/- nth_of_type?: number | null;- attributes?: unknown;+ color?: string | null;+ filters_overrides?: unknown;+ /** @nullable */+ show_description?: boolean | null;+ /** @nullable */+ transparent_background?: boolean | null;+ }++ export interface AddDashboardWidgetsBatchResponse {+ /** Created dashboard widget tiles in request order. */+ tiles: DashboardTile[];+ }++ export interface AddOptOutRequest {/**- * @minimum -2147483648- * @maximum 2147483647- * @nullable+ * The recipient identifier to opt out (e.g. email address).+ * @maxLength 512*/- order?: number | null;+ identifier: string;+ /** Optional message category key. If omitted, the recipient is opted out of all marketing messages. */+ category_key?: string;}- export interface ClickhouseEvent {- readonly id: string;- readonly distinct_id: string;- readonly properties: ClickhouseEventProperties;- readonly event: string;- readonly timestamp: string;+ export type AddSnapshotsInputBaselineHashes = {[key: string]: string};++ export type SnapshotManifestItemMetadata = { [key: string]: unknown };++ export interface SnapshotManifestItem {+ identifier: string;+ content_hash: string;/** @nullable */- readonly person: ClickhouseEventPerson;- readonly elements: readonly EventElement[];- readonly elements_chain: string;+ width?: number | null;+ /** @nullable */+ height?: number | null;+ metadata?: SnapshotManifestItemMetadata;}- export interface DiffCluster {- x: number;- y: number;- width: number;- height: number;- pixel_count: number;- centroid_x: number;- centroid_y: number;+ export interface AddSnapshotsInput {+ snapshots: SnapshotManifestItem[];+ baseline_hashes?: AddSnapshotsInputBaselineHashes;}- export interface ClusterSummary {- items: DiffCluster[];- total: number;- truncated: boolean;+ export type UploadTargetFields = {[key: string]: string};++ export interface UploadTarget {+ content_hash: string;+ url: string;+ fields: UploadTargetFields;+ }++ export interface AddSnapshotsResult {+ added: number;+ uploads: UploadTarget[];}/**- * * `trace` - trace- * `generation` - generation- * `evaluation` - evaluation+ * * `product_analytics` - product_analytics+ * `sql` - sql+ * `session_replay` - session_replay+ * `error_tracking` - error_tracking+ * `plan` - plan+ * `execution` - execution+ * `survey` - survey+ * `research` - research+ * `flags` - flags+ * `llm_analytics` - llm_analytics+ * `sandbox` - sandbox+ * `user_interview` - user_interview*/- export type ClusteringJobAnalysisLevelEnum = typeof ClusteringJobAnalysisLevelEnum[keyof typeof ClusteringJobAnalysisLevelEnum];+ export type AgentModeEnum = typeof AgentModeEnum[keyof typeof AgentModeEnum];- export const ClusteringJobAnalysisLevelEnum = {- Trace: 'trace',- Generation: 'generation',- Evaluation: 'evaluation',+ export const AgentModeEnum = {+ ProductAnalytics: 'product_analytics',+ Sql: 'sql',+ SessionReplay: 'session_replay',+ ErrorTracking: 'error_tracking',+ Plan: 'plan',+ Execution: 'execution',+ Survey: 'survey',+ Research: 'research',+ Flags: 'flags',+ LlmAnalytics: 'llm_analytics',+ Sandbox: 'sandbox',+ UserInterview: 'user_interview',} as const;- export interface ClusteringJob {- readonly id: string;- /** @maxLength 100 */+ export interface AggregatedSpanRow {+ avg_duration_nano: number;+ count: number;+ error_count: number;name: string;- analysis_level: ClusteringJobAnalysisLevelEnum;- event_filters?: unknown;- enabled?: boolean;- readonly created_at: string;- readonly updated_at: string;+ p50_duration_nano: number;+ p95_duration_nano: number;+ service_name: string;+ total_duration_nano: number;}/**- * * `hdbscan` - hdbscan- * `kmeans` - kmeans+ * * `sum` - sum+ * `avg` - avg+ * `count` - count+ * `p95` - p95*/- export type ClusteringMethodEnum = typeof ClusteringMethodEnum[keyof typeof ClusteringMethodEnum];+ export type AggregationEnum = typeof AggregationEnum[keyof typeof AggregationEnum];- export const ClusteringMethodEnum = {- Hdbscan: 'hdbscan',- Kmeans: 'kmeans',+ export const AggregationEnum = {+ Sum: 'sum',+ Avg: 'avg',+ Count: 'count',+ P95: 'p95',} as const;- export type ClusteringRunRequestEventFiltersItem = { [key: string]: unknown };+ export interface InsightsThresholdBounds {+ /** Alert fires when the value drops below this number. */+ lower?: number | null;+ /** Alert fires when the value exceeds this number. */+ upper?: number | null;+ }- /**- * * `none` - none- * `l2` - l2- */- export type EmbeddingNormalizationEnum = typeof EmbeddingNormalizationEnum[keyof typeof EmbeddingNormalizationEnum];+ export type InsightThresholdType = typeof InsightThresholdType[keyof typeof InsightThresholdType];- export const EmbeddingNormalizationEnum = {- None: 'none',- L2: 'l2',+ export const InsightThresholdType = {+ Absolute: 'absolute',+ Percentage: 'percentage',+ } as const;++ export interface InsightThreshold {+ bounds?: InsightsThresholdBounds | null;+ /** Whether bounds are compared as absolute values or as percentage change from the previous interval. */+ type: InsightThresholdType;+ }++ export interface Threshold {+ readonly id: string;+ readonly created_at: string;+ /** Optional name for the threshold. */+ name?: string;+ /** Threshold bounds and type. Includes bounds (lower/upper floats) and type (absolute or percentage). */+ configuration: InsightThreshold;+ }++ export type AlertConditionType = typeof AlertConditionType[keyof typeof AlertConditionType];+++ export const AlertConditionType = {+ AbsoluteValue: 'absolute_value',+ RelativeIncrease: 'relative_increase',+ RelativeDecrease: 'relative_decrease',} as const;+ export interface AlertCondition {+ type: AlertConditionType;+ }+/**- * * `none` - none- * `umap` - umap- * `pca` - pca+ * * `Firing` - Firing+ * `Not firing` - Not firing+ * `Errored` - Errored+ * `Snoozed` - Snoozed*/- export type DimensionalityReductionMethodEnum = typeof DimensionalityReductionMethodEnum[keyof typeof DimensionalityReductionMethodEnum];+ export type AlertCheckStateEnum = typeof AlertCheckStateEnum[keyof typeof AlertCheckStateEnum];- export const DimensionalityReductionMethodEnum = {- None: 'none',- Umap: 'umap',- Pca: 'pca',+ export const AlertCheckStateEnum = {+ Firing: 'Firing',+ NotFiring: 'Not firing',+ Errored: 'Errored',+ Snoozed: 'Snoozed',} as const;/**- * * `umap` - umap- * `pca` - pca- * `tsne` - tsne+ * * `pending` - pending+ * `running` - running+ * `done` - done+ * `failed` - failed+ * `skipped` - skipped*/- export type VisualizationMethodEnum = typeof VisualizationMethodEnum[keyof typeof VisualizationMethodEnum];+ export type InvestigationStatusEnum = typeof InvestigationStatusEnum[keyof typeof InvestigationStatusEnum];- export const VisualizationMethodEnum = {- Umap: 'umap',- Pca: 'pca',- Tsne: 'tsne',+ export const InvestigationStatusEnum = {+ Pending: 'pending',+ Running: 'running',+ Done: 'done',+ Failed: 'failed',+ Skipped: 'skipped',} as const;/**- * Serializer for clustering workflow request parameters.+ * * `true_positive` - true_positive+ * `false_positive` - false_positive+ * `inconclusive` - inconclusive*/- export interface ClusteringRunRequest {- /**- * Number of days to look back for traces- * @minimum 1- * @maximum 90- */- lookback_days?: number;- /**- * Maximum number of traces to sample for clustering- * @minimum 20- * @maximum 10000- */- max_samples?: number;- /** Embedding normalization method: 'none' (raw embeddings) or 'l2' (L2 normalize before clustering)-- * `none` - none- * `l2` - l2 */- embedding_normalization?: EmbeddingNormalizationEnum;- /** Dimensionality reduction method: 'none' (cluster on raw), 'umap', or 'pca'+ export type InvestigationVerdictEnum = typeof InvestigationVerdictEnum[keyof typeof InvestigationVerdictEnum];- * `none` - none- * `umap` - umap- * `pca` - pca */- dimensionality_reduction_method?: DimensionalityReductionMethodEnum;- /**- * Target dimensions for dimensionality reduction (ignored if method is 'none')- * @minimum 2- * @maximum 500- */- dimensionality_reduction_ndims?: number;- /** Clustering algorithm: 'hdbscan' (density-based, auto-determines k) or 'kmeans' (centroid-based)- * `hdbscan` - hdbscan- * `kmeans` - kmeans */- clustering_method?: ClusteringMethodEnum;- /**- * Minimum cluster size as fraction of total samples (e.g., 0.02 = 2%)- * @minimum 0.02- * @maximum 0.5- */- min_cluster_size_fraction?: number;- /**- * HDBSCAN min_samples parameter (higher = more conservative clustering)- * @minimum 1- * @maximum 100- */- hdbscan_min_samples?: number;- /**- * Minimum number of clusters to try for k-means- * @minimum 2- * @maximum 50- */- kmeans_min_k?: number;- /**- * Maximum number of clusters to try for k-means- * @minimum 2- * @maximum 100- */- kmeans_max_k?: number;- /**- * Optional label/tag for the clustering run (used as suffix in run_id for tracking experiments)- * @maxLength 50- */- run_label?: string;- /** Method for 2D scatter plot visualization: 'umap', 'pca', or 'tsne'+ export const InvestigationVerdictEnum = {+ TruePositive: 'true_positive',+ FalsePositive: 'false_positive',+ Inconclusive: 'inconclusive',+ } as const;- * `umap` - umap- * `pca` - pca- * `tsne` - tsne */- visualization_method?: VisualizationMethodEnum;- /** Property filters to scope which traces are included in clustering (PostHog standard format) */- event_filters?: ClusteringRunRequestEventFiltersItem[];+ export interface AlertCheck {+ readonly id: string;+ readonly created_at: string;+ /** @nullable */+ readonly calculated_value: number | null;+ readonly state: AlertCheckStateEnum;+ readonly targets_notified: boolean;+ readonly anomaly_scores: unknown;+ readonly triggered_points: unknown;+ readonly triggered_dates: unknown;+ /** @nullable */+ readonly interval: string | null;+ readonly triggered_metadata: unknown;+ readonly investigation_status: InvestigationStatusEnum | null;+ readonly investigation_verdict: InvestigationVerdictEnum | null;+ /** @nullable */+ readonly investigation_summary: string | null;/**- * If provided, use this clustering job's analysis_level and event_filters instead of request params+ * Short ID of the Notebook produced by the investigation agent, when the agent ran for this check.* @nullable*/- clustering_job_id?: string | null;+ readonly investigation_notebook_short_id: string | null;+ /** @nullable */+ readonly notification_sent_at: string | null;+ readonly notification_suppressed_by_agent: boolean;}- export interface CodeInviteRedeemRequest {- /** @maxLength 50 */- code: string;+ export interface TrendsAlertConfig {+ /** When true, evaluate the current (still incomplete) time interval in addition to completed ones. */+ check_ongoing_interval?: boolean | null;+ /** Zero-based index of the series in the insight's query to monitor. */+ series_index: number;+ type?: 'TrendsAlertConfig';+ }++ export interface PreprocessingConfig {+ /** Order of differencing. 0 = raw values, 1 = first-order diffs (default: 0) */+ diffs_n?: number | null;+ /** Number of lag features. 0 = none, >0 = include n lagged values (default: 0) */+ lags_n?: number | null;+ /** Moving average window size. 0 = no smoothing, >1 = smooth over n points (default: 0) */+ smooth_n?: number | null;+ }++ export interface ZScoreDetectorConfig {+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9) */+ threshold?: number | null;+ type?: 'zscore';+ /** Rolling window size for calculating mean/std (default: 30) */+ window?: number | null;+ }++ export interface MADDetectorConfig {+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold [0-1]. Points above this probability are flagged (default: 0.9) */+ threshold?: number | null;+ type?: 'mad';+ /** Rolling window size for calculating median/MAD (default: 30) */+ window?: number | null;+ }++ export interface IQRDetectorConfig {+ /** IQR multiplier for fence calculation (default: 1.5, use 3.0 for far outliers) */+ multiplier?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ type?: 'iqr';+ /** Rolling window size for calculating quartiles (default: 30) */+ window?: number | null;+ }++ export interface ThresholdDetectorConfig {+ /** Lower bound - values below this are anomalies */+ lower_bound?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ type?: 'threshold';+ /** Upper bound - values above this are anomalies */+ upper_bound?: number | null;+ }++ export interface ECODDetectorConfig {+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'ecod';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export interface COPODDetectorConfig {+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'copod';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export interface IsolationForestDetectorConfig {+ /** Number of trees in the forest (default: 100) */+ n_estimators?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'isolation_forest';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export type Method = typeof Method[keyof typeof Method];+++ export const Method = {+ Largest: 'largest',+ Mean: 'mean',+ Median: 'median',+ } as const;++ export interface KNNDetectorConfig {+ /** Distance method: 'largest', 'mean', 'median' (default: 'largest') */+ method?: Method | null;+ /** Number of neighbors to consider (default: 5) */+ n_neighbors?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'knn';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export interface HBOSDetectorConfig {+ /** Number of histogram bins (default: 10) */+ n_bins?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'hbos';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export interface LOFDetectorConfig {+ /** Number of neighbors for LOF (default: 20) */+ n_neighbors?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'lof';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export interface OCSVMDetectorConfig {+ /** SVM kernel type (default: "rbf") */+ kernel?: string | null;+ /** Upper bound on training errors fraction (default: 0.1) */+ nu?: number | null;+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'ocsvm';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export interface PCADetectorConfig {+ /** Preprocessing transforms applied before detection */+ preprocessing?: PreprocessingConfig | null;+ /** Anomaly probability threshold (default: 0.9) */+ threshold?: number | null;+ type?: 'pca';+ /** Rolling window size — how many historical data points to train on (default: based on calculation interval) */+ window?: number | null;+ }++ export type EnsembleOperator = typeof EnsembleOperator[keyof typeof EnsembleOperator];+++ export const EnsembleOperator = {+ And: 'and',+ Or: 'or',+ } as const;++ export interface EnsembleDetectorConfig {+ /** Sub-detector configurations (minimum 2) */+ detectors: (ZScoreDetectorConfig | MADDetectorConfig | IQRDetectorConfig | ThresholdDetectorConfig | ECODDetectorConfig | COPODDetectorConfig | IsolationForestDetectorConfig | KNNDetectorConfig | HBOSDetectorConfig | LOFDetectorConfig | OCSVMDetectorConfig | PCADetectorConfig)[];+ /** How to combine sub-detector results */+ operator: EnsembleOperator;+ type?: 'ensemble';}/**- * * `codex` - codex+ * Detector configuration types+ */+ export type DetectorConfig = EnsembleDetectorConfig | ZScoreDetectorConfig | MADDetectorConfig | IQRDetectorConfig | ThresholdDetectorConfig | ECODDetectorConfig | COPODDetectorConfig | IsolationForestDetectorConfig | KNNDetectorConfig | HBOSDetectorConfig | LOFDetectorConfig | OCSVMDetectorConfig | PCADetectorConfig;++ /**+ * * `every_15_minutes` - every_15_minutes+ * `hourly` - hourly+ * `daily` - daily+ * `weekly` - weekly+ * `monthly` - monthly*/- export type CodexRuntimeAdapterEnum = typeof CodexRuntimeAdapterEnum[keyof typeof CodexRuntimeAdapterEnum];+ export type CalculationIntervalEnum = typeof CalculationIntervalEnum[keyof typeof CalculationIntervalEnum];- export const CodexRuntimeAdapterEnum = {- Codex: 'codex',+ export const CalculationIntervalEnum = {+ Every15Minutes: 'every_15_minutes',+ Hourly: 'hourly',+ Daily: 'daily',+ Weekly: 'weekly',+ Monthly: 'monthly',} as const;+ export interface AlertScheduleRestrictionWindow {+ /** Start time HH:MM (24-hour, project timezone). Inclusive. Each window must span ≥ 30 minutes on the local daily timeline (half-open [start, end)). */+ start: string;+ /** End time HH:MM (24-hour). Exclusive (half-open interval). Each window must span ≥ 30 minutes locally. */+ end: string;+ }++ export interface AlertScheduleRestriction {+ /** Blocked local time windows when the alert must not run. Overlapping or identical windows are merged when saved. At most five windows before normalization; empty array clears quiet hours. */+ blocked_windows: AlertScheduleRestrictionWindow[];+ }+/**- * * `auto` - auto- * `read-only` - read-only- * `full-access` - full-access+ * * `notify` - Notify+ * `suppress` - Suppress*/- export type CodexTaskRunCreateSchemaInitialPermissionModeEnum = typeof CodexTaskRunCreateSchemaInitialPermissionModeEnum[keyof typeof CodexTaskRunCreateSchemaInitialPermissionModeEnum];+ export type InvestigationInconclusiveActionEnum = typeof InvestigationInconclusiveActionEnum[keyof typeof InvestigationInconclusiveActionEnum];- export const CodexTaskRunCreateSchemaInitialPermissionModeEnum = {- Auto: 'auto',- ReadOnly: 'read-only',- FullAccess: 'full-access',+ export const InvestigationInconclusiveActionEnum = {+ Notify: 'notify',+ Suppress: 'suppress',} as const;- /**- * Request body for creating a new task run- */- export interface CodexTaskRunCreateSchema {- /** Execution mode: 'interactive' for user-connected runs, 'background' for autonomous runs-- * `interactive` - interactive- * `background` - background */- mode?: TaskExecutionModeEnum;+ export interface Alert {+ readonly id: string;+ readonly created_by: UserBasic;+ readonly created_at: string;+ /** Insight ID monitored by this alert. Note: Response returns full InsightBasicSerializer object. */+ insight: number;+ /** Human-readable name for the alert. */+ name?: string;+ /** User IDs to subscribe to this alert. Note: Response returns full UserBasicSerializer object. */+ subscribed_users: number[];+ /** Threshold configuration with bounds and type for evaluating the alert. */+ threshold: Threshold;+ /** Alert condition type. Determines how the value is evaluated: absolute_value, relative_increase, or relative_decrease. */+ condition?: AlertCondition | null;+ /** Current alert state: Firing, Not firing, Errored, or Snoozed. */+ readonly state: string;+ /** Whether the alert is actively being evaluated. */+ enabled?: boolean;+ /** @nullable */+ readonly last_notified_at: string | null;+ /** @nullable */+ readonly last_checked_at: string | null;+ /** @nullable */+ readonly next_check_at: string | null;+ /** Alert check results. By default returns the last 5. Use checks_date_from and checks_date_to (e.g. '-24h', '-7d') to get checks within a time window, checks_limit to cap how many are returned (default 5, max 500), and checks_offset to skip the newest N checks for pagination (0-based). Newest checks first. Only populated on retrieve. */+ readonly checks: readonly AlertCheck[];/**- * Git branch to checkout in the sandbox- * @maxLength 255+ * Total alert checks matching the retrieve filters (date window). Only set on alert retrieve; omitted otherwise.* @nullable*/- branch?: string | null;- /** ID of a previous run to resume from. Must belong to the same task. */- resume_from_run_id?: string;- /** Initial or follow-up user message to include in the run prompt. */- pending_user_message?: string;- /** Identifiers for staged task artifacts that should be attached to the initial run prompt. */- pending_user_artifact_ids?: string[];- /** Optional sandbox environment to apply for this cloud run. */- sandbox_environment_id?: string;- /** Whether pull requests for this run should be authored by the user or the bot.-- * `user` - user- * `bot` - bot */- pr_authorship_mode?: PrAuthorshipModeEnum;- /** High-level source that triggered this run, used to distinguish manual and signal-based cloud runs.-- * `manual` - manual- * `signal_report` - signal_report */- run_source?: RunSourceEnum;- /** Optional signal report identifier when this run was started from Inbox. */- signal_report_id?: string;- /** Agent runtime adapter to launch for this run. Must be 'codex' for Codex runtimes.-- * `codex` - codex */- runtime_adapter: CodexRuntimeAdapterEnum;- /** LLM model identifier to run in the Codex runtime. */- model: string;- /** Reasoning effort to request for models that expose an effort control.+ readonly checks_total: number | null;+ /** Trends-specific alert configuration. Includes series_index (which series to monitor) and check_ongoing_interval (whether to check the current incomplete interval). */+ config?: TrendsAlertConfig | null;+ detector_config?: DetectorConfig | null;+ /** How often the alert is checked: every 15 minutes (Boost+), hourly, daily, weekly, or monthly.- * `low` - low- * `medium` - medium- * `high` - high- * `xhigh` - xhigh- * `max` - max */- reasoning_effort?: ReasoningEffortEnum;- /** Optional GitHub user token from PostHog Code for user-authored cloud pull requests. Prefer linking GitHub from Settings → Linked accounts so the server can manage tokens; this field remains supported for callers that still manage their own tokens. */- github_user_token?: string;- /** Initial permission mode for Codex runtimes.+ * `every_15_minutes` - every_15_minutes+ * `hourly` - hourly+ * `daily` - daily+ * `weekly` - weekly+ * `monthly` - monthly */+ calculation_interval?: CalculationIntervalEnum;+ /**+ * Snooze the alert until this time. Pass a relative date string (e.g. '2h', '1d') or null to unsnooze.+ * @nullable+ */+ snoozed_until?: string | null;+ /**+ * Skip alert evaluation on weekends (Saturday and Sunday, local to project timezone).+ * @nullable+ */+ skip_weekend?: boolean | null;+ /** Blocked local time windows (HH:MM in the project timezone). Interval is half-open [start, end): start inclusive, end exclusive. Use blocked_windows array of {start, end}. Null disables. */+ schedule_restriction?: AlertScheduleRestriction | null;+ /**+ * The last calculated value from the most recent alert check.+ * @nullable+ */+ readonly last_value: number | null;+ /** When enabled, an investigation agent runs on the state transition to firing and writes findings to a Notebook linked from the alert check. Only effective for detector-based (anomaly) alerts. */+ investigation_agent_enabled?: boolean;+ /** When enabled (and investigation_agent_enabled is on), notification dispatch is held until the investigation agent produces a verdict. Notifications are suppressed when the verdict is false_positive (and optionally when inconclusive). A safety-net task force-fires after a few minutes if the investigation stalls. */+ investigation_gates_notifications?: boolean;+ /** How to handle an 'inconclusive' verdict when notifications are gated. 'notify' is the safe default — an agent that can't be sure is itself useful signal.- * `auto` - auto- * `read-only` - read-only- * `full-access` - full-access */- initial_permission_mode?: CodexTaskRunCreateSchemaInitialPermissionModeEnum;+ * `notify` - Notify+ * `suppress` - Suppress */+ investigation_inconclusive_action?: InvestigationInconclusiveActionEnum;}- export type PropertyGroupOperator = typeof PropertyGroupOperator[keyof typeof PropertyGroupOperator];+ export interface AlertSimulate {+ /** Insight ID to simulate the detector on. */+ insight: number;+ /** Detector configuration to simulate. */+ detector_config: DetectorConfig;+ /** Zero-based index of the series to analyze. */+ series_index?: number;+ /**+ * Relative date string for how far back to simulate (e.g. '-24h', '-30d', '-4w'). If not provided, uses the detector's minimum required samples.+ * @nullable+ */+ date_from?: string | null;+ }+ export type AlertSimulateResponseSubDetectorScoresItem = { [key: string]: unknown };- export const PropertyGroupOperator = {- And: 'AND',- Or: 'OR',- } as const;+ export type BreakdownSimulationResultSubDetectorScoresItem = { [key: string]: unknown };- export interface CohortFilter {- bytecode?: unknown[] | null;- bytecode_error?: string | null;- conditionHash?: string | null;- type: 'cohort';- key: 'id';- value: number;- negation?: boolean;+ export interface BreakdownSimulationResult {+ /** Breakdown value label. */+ label: string;+ /** Data values for each point. */+ data: number[];+ /** Date labels for each point. */+ dates: string[];+ /** Anomaly score for each point. */+ scores: (number | null)[];+ /** Indices of points flagged as anomalies. */+ triggered_indices: number[];+ /** Dates of points flagged as anomalies. */+ triggered_dates: string[];+ /** Total number of data points analyzed. */+ total_points: number;+ /** Number of anomalies detected. */+ anomaly_count: number;+ /** Per-sub-detector scores for ensemble detectors. */+ sub_detector_scores?: BreakdownSimulationResultSubDetectorScoresItem[];}- export interface PersonFilter {- bytecode?: unknown[] | null;- bytecode_error?: string | null;- conditionHash?: string | null;- type: 'person';- key: string;- operator?: string | null;- value?: unknown;- negation?: boolean;+ export interface AlertSimulateResponse {+ /** Data values for each point. */+ data: number[];+ /** Date labels for each point. */+ dates: string[];+ /** Anomaly score for each point (null if insufficient data). */+ scores: (number | null)[];+ /** Indices of points flagged as anomalies. */+ triggered_indices: number[];+ /** Dates of points flagged as anomalies. */+ triggered_dates: string[];+ /**+ * Interval of the trends query (hour, day, week, month).+ * @nullable+ */+ interval: string | null;+ /** Total number of data points analyzed. */+ total_points: number;+ /** Number of anomalies detected. */+ anomaly_count: number;+ /** Per-sub-detector scores for ensemble detectors. Each entry has 'type' and 'scores' fields. */+ sub_detector_scores?: AlertSimulateResponseSubDetectorScoresItem[];+ /** Per-breakdown-value simulation results. Present only when the insight has breakdowns (up to 25 values). */+ breakdown_results?: BreakdownSimulationResult[];}/**- * AND/OR group containing cohort filters. Named to avoid collision with analytics Group model.+ * * `USR` - user+ * `GIT` - GitHub*/- export interface CohortFilterGroup {- type: PropertyGroupOperator;- values: (BehavioralFilter | CohortFilter | PersonFilter | CohortFilterGroup)[];- }+ export type CreationTypeEnum = typeof CreationTypeEnum[keyof typeof CreationTypeEnum];- export interface CohortFilters {- properties: CohortFilterGroup;- }++ export const CreationTypeEnum = {+ Usr: 'USR',+ Git: 'GIT',+ } as const;/**- * * `static` - static- * `person_property` - person_property- * `behavioral` - behavioral- * `realtime` - realtime- * `analytical` - analytical+ * * `dashboard_item` - insight+ * `dashboard` - dashboard+ * `project` - project+ * `organization` - organization+ * `recording` - recording*/- export type CohortTypeEnum = typeof CohortTypeEnum[keyof typeof CohortTypeEnum];+ export type AnnotationScopeEnum = typeof AnnotationScopeEnum[keyof typeof AnnotationScopeEnum];- export const CohortTypeEnum = {- Static: 'static',- PersonProperty: 'person_property',- Behavioral: 'behavioral',- Realtime: 'realtime',- Analytical: 'analytical',+ export const AnnotationScopeEnum = {+ DashboardItem: 'dashboard_item',+ Dashboard: 'dashboard',+ Project: 'project',+ Organization: 'organization',+ Recording: 'recording',} as const;- export interface Cohort {+ export interface Annotation {readonly id: number;/**- * @maxLength 400+ * Annotation text shown on charts to describe the change, release, or incident.+ * @maxLength 8192* @nullable*/- name?: string | null;- /** @maxLength 1000 */- description?: string;- groups?: unknown;- deleted?: boolean;- filters?: CohortFilters | null;- query?: unknown;+ content?: string | null;+ /**+ * When this annotation happened (ISO 8601 timestamp). Used to position it on charts.+ * @nullable+ */+ date_marker?: string | null;+ /** Who created this annotation. Use `USR` for user-created notes and `GIT` for bot/deployment notes.++ * `USR` - user+ * `GIT` - GitHub */+ creation_type?: CreationTypeEnum;/** @nullable */- readonly version: number | null;+ dashboard_item?: number | null;/** @nullable */- readonly pending_version: number | null;- readonly is_calculating: boolean;- readonly created_by: UserBasic;+ dashboard_id?: number | null;/** @nullable */- readonly created_at: string | null;+ readonly dashboard_name: string | null;/** @nullable */- readonly last_calculation: string | null;+ readonly insight_short_id: string | null;/** @nullable */- readonly last_backfill_person_properties_at: string | null;- readonly errors_calculating: number;+ readonly insight_name: string | null;/** @nullable */- readonly last_error_message: string | null;+ readonly insight_derived_name: string | null;+ readonly created_by: UserBasic;/** @nullable */- readonly count: number | null;- is_static?: boolean;- /** Type of cohort based on filter complexity+ readonly created_at: string | null;+ readonly updated_at: string;+ /** Soft-delete flag. Set to true to hide the annotation, or false to restore it. */+ deleted?: boolean;+ /** Annotation visibility scope: `project`, `organization`, `dashboard`, or `dashboard_item`. `recording` is deprecated and rejected.- * `static` - static- * `person_property` - person_property- * `behavioral` - behavioral- * `realtime` - realtime- * `analytical` - analytical */- cohort_type?: CohortTypeEnum | BlankEnum | null;- readonly experiment_set: readonly number[];- _create_in_folder?: string;- _create_static_person_ids?: string[];+ * `dashboard_item` - insight+ * `dashboard` - dashboard+ * `project` - project+ * `organization` - organization+ * `recording` - recording */+ scope?: AnnotationScopeEnum;}- export type CohortPersonResultProperties = { [key: string]: unknown };-- export type CohortPersonResultMatchedRecordingsItem = { [key: string]: unknown };-- /**- * * `person` - person- */- export type CohortPersonResultTypeEnum = typeof CohortPersonResultTypeEnum[keyof typeof CohortPersonResultTypeEnum];--- export const CohortPersonResultTypeEnum = {- Person: 'person',- } as const;-- export interface CohortPersonResult {- id: string;- uuid: string;- type: CohortPersonResultTypeEnum;+ export interface AppMetricSeries {name: string;- distinct_ids: string[];- properties: CohortPersonResultProperties;- /** @nullable */- created_at: string | null;- /** @nullable */- last_seen_at: string | null;- /** @nullable */- is_identified: boolean | null;- matched_recordings: CohortPersonResultMatchedRecordingsItem[];- /** @nullable */- value_at_data_point: number | null;+ values: number[];}- export interface CohortPersonsResponse {- results: CohortPersonResult[];- /** @nullable */- next: string | null;- /** @nullable */- previous: string | null;+ export interface AppMetricsResponse {+ labels: string[];+ series: AppMetricSeries[];}- export type ColorMode = typeof ColorMode[keyof typeof ColorMode];-+ export type AppMetricsTotalsResponseTotals = {[key: string]: number};- export const ColorMode = {- Light: 'light',- Dark: 'dark',- } as const;+ export interface AppMetricsTotalsResponse {+ totals: AppMetricsTotalsResponseTotals;+ }/**- * * `private` - Private (only visible to creator)- * `shared` - Shared with team+ * Serializer for individual transcript segments from AssemblyAI*/- export type VisibilityEnum = typeof VisibilityEnum[keyof typeof VisibilityEnum];--- export const VisibilityEnum = {- Private: 'private',- Shared: 'shared',- } as const;-- export interface ColumnConfiguration {- readonly id: string;- /** @maxLength 255 */- context_key: string;- columns?: string[];- /** @maxLength 255 */- name?: string;- filters?: unknown;+ export interface TranscriptSegment {/**- * Ordered list of HogQL expressions describing the table sort. Null preserves the current sort on apply (legacy rows); an empty list explicitly means no sort.+ * Milliseconds from recording start* @nullable*/- order_by?: string[] | null;- visibility?: VisibilityEnum;- /** @nullable */- readonly created_by: number | null;- readonly created_at: string;- readonly updated_at: string;- }-- export interface Comment {- readonly id: string;- readonly created_by: UserBasic;- /** @nullable */- deleted?: boolean | null;- mentions?: number[];- slug?: string;- /** Whether this comment is an actionable task that can be marked complete. Tasks render with a checkbox in the UI and can be filtered as a separate kind. Cannot be set on replies (source_comment) or emoji reactions. Immutable after creation. */- is_task?: boolean;- /** The user who marked this task complete. Null for open tasks and non-task comments. */- readonly completed_by: UserBasic | null;+ timestamp?: number | null;/** @nullable */- content?: string | null;- rich_content?: unknown;- readonly version: number;- readonly created_at: string;+ speaker?: string | null;+ text: string;/**- * @maxLength 72+ * Transcription confidence score* @nullable*/- item_id?: string | null;- item_context?: unknown;- /** @maxLength 79 */- scope: string;+ confidence?: number | null;/**- * ISO timestamp when the task was marked complete. Only meaningful when is_task is true. Read-only — toggled via the /complete and /reopen actions, not via PATCH.+ * Whether this is the final version* @nullable*/- readonly completed_at: string | null;+ is_final?: boolean | null;+ }++ /**+ * Serializer for appending transcript segments (supports batched real-time uploads)+ */+ export interface AppendSegments {+ /** @minItems 1 */+ segments: TranscriptSegment[];+ }++ export interface ApprovalPolicy {+ readonly id: string;+ /** @maxLength 128 */+ action_key: string;+ conditions?: unknown;+ approver_config: unknown;+ allow_self_approve?: boolean;+ bypass_org_membership_levels?: unknown;+ bypass_roles?: string[];+ /** Auto-expire change requests after this duration */+ expires_after?: string;+ enabled?: boolean;+ readonly created_by: UserBasic;+ readonly created_at: string;/** @nullable */- source_comment?: string | null;+ readonly updated_at: string | null;}- export interface CompareItem {- label: string;- value: string;+ export interface ApproveSnapshotInput {+ /** The snapshot identifier to approve (e.g. Storybook story id plus theme). */+ identifier: string;+ /** The content hash of the new baseline image to record for this identifier. */+ new_hash: string;}- export interface ComposeTicket {- /** Recipient email address. */- recipient_email: string;- /**- * PostHog distinct_id to link the ticket to a person. Falls back to recipient_email.- * @maxLength 400- */- recipient_distinct_id?: string;- /**- * Email subject line.- * @maxLength 500- */- email_subject?: string;- /** ID of the EmailChannel to send from. */- email_config_id: string;- /**- * Message content in markdown.- * @maxLength 5000- */- message: string;- /** TipTap rich content JSON for formatted messages. */- rich_content?: unknown;+ export interface ApproveRunRequestInput {+ /** Specific snapshots to approve, each with `identifier` and `new_hash`. Ignored when `approve_all` is true. */+ snapshots?: ApproveSnapshotInput[];+ /** Approve every changed and new snapshot in the run. Mutually exclusive with `snapshots` — pass one or the other. */+ approve_all?: boolean;+ /** Whether to commit the updated baseline YAML to the PR branch on GitHub. Set to false to record the approval without pushing a commit. */+ commit_to_github?: boolean;}- export interface ComposeTicketResponse {- /** Created ticket UUID. */+ export interface Artifact {id: string;- /** Human-readable ticket number. */- ticket_number: number;+ content_hash: string;+ /** @nullable */+ width: number | null;+ /** @nullable */+ height: number | null;+ /** @nullable */+ download_url: string | null;}/**- * * `won` - won- * `lost` - lost- * `inconclusive` - inconclusive- * `stopped_early` - stopped_early- * `invalid` - invalid+ * * `user` - user+ * `role` - role*/- export type ConclusionEnum = typeof ConclusionEnum[keyof typeof ConclusionEnum];+ export type AssigneeTypeEnum = typeof AssigneeTypeEnum[keyof typeof AssigneeTypeEnum];- export const ConclusionEnum = {- Won: 'won',- Lost: 'lost',- Inconclusive: 'inconclusive',- StoppedEarly: 'stopped_early',- Invalid: 'invalid',+ export const AssigneeTypeEnum = {+ User: 'user',+ Role: 'role',} as const;- export interface ConditionalFormattingRule {- bytecode: unknown[];- color: string;- colorMode?: ColorMode | null;- columnName: string;- id: string;- input: string;- templateId: string;+ export interface AsyncDeletionStatus {+ /** The UUID of the person whose events are queued for deletion. */+ person_uuid: string;+ /** When the deletion was requested. */+ created_at: string;+ /** Current status: 'pending' or 'completed'. */+ readonly status: string;+ /**+ * When the deletion was verified complete. Null if still pending.+ * @nullable+ */+ delete_verified_at: string | null;}/**- * Response containing a JWT token for direct sandbox connection+ * * `first_touch` - First Touch+ * `last_touch` - Last Touch+ * `linear` - Linear+ * `time_decay` - Time Decay+ * `position_based` - Position Based*/- export interface ConnectionTokenResponse {- /** JWT token for authenticating with the sandbox */- token: string;+ export type AttributionModeEnum = typeof AttributionModeEnum[keyof typeof AttributionModeEnum];+++ export const AttributionModeEnum = {+ FirstTouch: 'first_touch',+ LastTouch: 'last_touch',+ Linear: 'linear',+ TimeDecay: 'time_decay',+ PositionBased: 'position_based',+ } as const;++ export interface UserBasicInfo {+ id: number;+ first_name: string;+ email: string;}- /**- * * `utf-8` - utf-8- * `base64` - base64- */- export type ContentEncodingEnum = typeof ContentEncodingEnum[keyof typeof ContentEncodingEnum];+ export interface RunSummary {+ total: number;+ changed: number;+ new: number;+ removed: number;+ unchanged: number;+ unresolved?: number;+ tolerated_matched?: number;+ }+ export type RunMetadata = { [key: string]: unknown };- export const ContentEncodingEnum = {- Utf8: 'utf-8',- Base64: 'base64',- } as const;+ export interface Run {+ approved_by?: UserBasicInfo | null;+ id: string;+ repo_id: string;+ status: string;+ run_type: string;+ commit_sha: string;+ branch: string;+ /** @nullable */+ pr_number: number | null;+ approved: boolean;+ /** @nullable */+ approved_at: string | null;+ summary: RunSummary;+ /** @nullable */+ error_message: string | null;+ created_at: string;+ /** @nullable */+ completed_at: string | null;+ is_stale?: boolean;+ /** @nullable */+ superseded_by_id?: string | null;+ metadata?: RunMetadata;+ }- export type ConversationMessagesItem = { [key: string]: unknown };+ export interface AutoApproveResult {+ run: Run;+ baseline_content: string;+ }- export type ConversationPendingApprovalsItem = { [key: string]: unknown };+ export type AutocompleteCompletionItemKind = typeof AutocompleteCompletionItemKind[keyof typeof AutocompleteCompletionItemKind];+++ export const AutocompleteCompletionItemKind = {+ Method: 'Method',+ Function: 'Function',+ Constructor: 'Constructor',+ Field: 'Field',+ Variable: 'Variable',+ Class: 'Class',+ Struct: 'Struct',+ Interface: 'Interface',+ Module: 'Module',+ Property: 'Property',+ Event: 'Event',+ Operator: 'Operator',+ Unit: 'Unit',+ Value: 'Value',+ Constant: 'Constant',+ Enum: 'Enum',+ EnumMember: 'EnumMember',+ Keyword: 'Keyword',+ Text: 'Text',+ Color: 'Color',+ File: 'File',+ Reference: 'Reference',+ Customcolor: 'Customcolor',+ Folder: 'Folder',+ TypeParameter: 'TypeParameter',+ User: 'User',+ Issue: 'Issue',+ Snippet: 'Snippet',+ } as const;++ export interface AutocompleteCompletionItem {+ /** A human-readable string with additional information about this item, like type or symbol information. */+ detail?: string | null;+ /** A human-readable string that represents a doc-comment. */+ documentation?: string | null;+ /** A string or snippet that should be inserted in a document when selecting this completion. */+ insertText: string;+ /** The kind of this completion item. Based on the kind an icon is chosen by the editor. */+ kind: AutocompleteCompletionItemKind;+ /** The label of this completion item. By default this is also the text that is inserted when selecting this completion. */+ label: string;+ }/**- * * `idle` - Idle- * `in_progress` - In progress- * `canceling` - Canceling+ * * `P0` - P0+ * `P1` - P1+ * `P2` - P2+ * `P3` - P3+ * `P4` - P4*/- export type ConversationStatus = typeof ConversationStatus[keyof typeof ConversationStatus];+ export type AutonomyPriorityEnum = typeof AutonomyPriorityEnum[keyof typeof AutonomyPriorityEnum];- export const ConversationStatus = {- Idle: 'idle',- InProgress: 'in_progress',- Canceling: 'canceling',+ export const AutonomyPriorityEnum = {+ P0: 'P0',+ P1: 'P1',+ P2: 'P2',+ P3: 'P3',+ P4: 'P4',} as const;/**- * * `assistant` - Assistant- * `tool_call` - Tool call- * `deep_research` - Deep research- * `slack` - Slack+ * Discovered detail fields and their value distributions.*/- export type ConversationType = typeof ConversationType[keyof typeof ConversationType];+ export type AvailableFiltersResponseDetailFields = { [key: string]: unknown };+ export type StaticFiltersUsersItem = { [key: string]: unknown };- export const ConversationType = {- Assistant: 'assistant',- ToolCall: 'tool_call',- DeepResearch: 'deep_research',- Slack: 'slack',- } as const;+ export type StaticFiltersScopesItem = { [key: string]: unknown };- export interface Conversation {- readonly id: string;- readonly status: ConversationStatus;- /**- * Title of the conversation.- * @nullable- */- readonly title: string | null;- readonly user: UserBasic;- /** @nullable */- readonly created_at: string | null;- /** @nullable */- readonly updated_at: string | null;- readonly type: ConversationType;- /**- * Whether this conversation was created during an impersonated session (e.g., by support agents). Internal conversations are hidden from customers.- * @nullable- */- readonly is_internal: boolean | null;- /**- * Unique key for Slack thread: '{workspace_id}:{channel}:{thread_ts}'- * @nullable- */- readonly slack_thread_key: string | null;- /**- * Slack workspace subdomain (e.g. 'posthog' for posthog.slack.com)- * @nullable- */- readonly slack_workspace_domain: string | null;- readonly messages: readonly ConversationMessagesItem[];- readonly has_unsupported_content: boolean;- /** @nullable */- readonly agent_mode: string | null;- readonly is_sandbox: boolean;- /** Return pending approval cards as structured data.+ export type StaticFiltersActivitiesItem = { [key: string]: unknown };- Combines metadata from conversation.approval_decisions with payload from checkpoint- interrupts (single source of truth for payload data). */- readonly pending_approvals: readonly ConversationPendingApprovalsItem[];- }+ export type StaticFiltersClientsItem = { [key: string]: unknown };- export interface ConversationMinimal {- readonly id: string;- readonly status: ConversationStatus;- /**- * Title of the conversation.- * @nullable- */- readonly title: string | null;- readonly user: UserBasic;- /** @nullable */- readonly created_at: string | null;- /** @nullable */- readonly updated_at: string | null;- readonly type: ConversationType;- /**- * Whether this conversation was created during an impersonated session (e.g., by support agents). Internal conversations are hidden from customers.- * @nullable- */- readonly is_internal: boolean | null;- /**- * Unique key for Slack thread: '{workspace_id}:{channel}:{thread_ts}'- * @nullable- */- readonly slack_thread_key: string | null;- /**- * Slack workspace subdomain (e.g. 'posthog' for posthog.slack.com)- * @nullable- */- readonly slack_workspace_domain: string | null;+ export interface StaticFilters {+ /** Users who have logged activity. */+ users: StaticFiltersUsersItem[];+ /** Available activity scopes. */+ scopes: StaticFiltersScopesItem[];+ /** Available activity types. */+ activities: StaticFiltersActivitiesItem[];+ /** API clients that have generated activity (from x-posthog-client header). */+ clients: StaticFiltersClientsItem[];}- export type ConversionGoalFilter1Response = { [key: string]: unknown } | null;-- export type ConversionGoalFilter1SchemaMap = {[key: string]: string | unknown};-- export interface ConversionGoalFilter1 {- conversion_goal_id: string;- conversion_goal_name: string;- custom_name?: string | null;- /** The event or `null` for all events. */- event?: string | null;- /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */- fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- kind?: 'EventsNode';- limit?: number | null;- math?: BaseMathType | FunnelMathType | PropertyMathType | CountPerActorMathType | ExperimentMetricMathType | CalendarHeatmapMathType | 'unique_group' | 'hogql' | null;- math_group_type_index?: MathGroupTypeIndex | null;- math_hogql?: string | null;- math_multiplier?: number | null;- math_property?: string | null;- math_property_revenue_currency?: RevenueCurrencyPropertyConfig | null;- math_property_type?: string | null;- name?: string | null;- optionalInFunnel?: boolean | null;- /** Columns to order by */- orderBy?: string[] | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: ConversionGoalFilter1Response;- schema_map: ConversionGoalFilter1SchemaMap;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface AvailableFiltersResponse {+ /** Pre-computed filter options for scopes, activities, and users. */+ static_filters: StaticFilters;+ /** Discovered detail fields and their value distributions. */+ detail_fields: AvailableFiltersResponseDetailFields;}- export type ConversionGoalFilter2Response = { [key: string]: unknown } | null;+ /**+ * * `ingest_first_event` - ingest_first_event+ * `set_up_reverse_proxy` - set_up_reverse_proxy+ * `create_first_insight` - create_first_insight+ * `create_first_dashboard` - create_first_dashboard+ * `track_custom_events` - track_custom_events+ * `define_actions` - define_actions+ * `set_up_cohorts` - set_up_cohorts+ * `explore_trends_insight` - explore_trends_insight+ * `create_funnel` - create_funnel+ * `explore_retention_insight` - explore_retention_insight+ * `explore_paths_insight` - explore_paths_insight+ * `explore_stickiness_insight` - explore_stickiness_insight+ * `explore_lifecycle_insight` - explore_lifecycle_insight+ * `add_authorized_domain` - add_authorized_domain+ * `set_up_web_vitals` - set_up_web_vitals+ * `review_web_analytics_dashboard` - review_web_analytics_dashboard+ * `filter_web_analytics` - filter_web_analytics+ * `set_up_web_analytics_conversion_goals` - set_up_web_analytics_conversion_goals+ * `visit_web_vitals_dashboard` - visit_web_vitals_dashboard+ * `setup_session_recordings` - setup_session_recordings+ * `watch_session_recording` - watch_session_recording+ * `configure_recording_settings` - configure_recording_settings+ * `create_recording_playlist` - create_recording_playlist+ * `enable_console_logs` - enable_console_logs+ * `create_feature_flag` - create_feature_flag+ * `implement_flag_in_code` - implement_flag_in_code+ * `update_feature_flag_release_conditions` - update_feature_flag_release_conditions+ * `create_multivariate_flag` - create_multivariate_flag+ * `set_up_flag_payloads` - set_up_flag_payloads+ * `set_up_flag_evaluation_runtimes` - set_up_flag_evaluation_runtimes+ * `create_experiment` - create_experiment+ * `implement_experiment_variants` - implement_experiment_variants+ * `launch_experiment` - launch_experiment+ * `review_experiment_results` - review_experiment_results+ * `create_survey` - create_survey+ * `launch_survey` - launch_survey+ * `collect_survey_responses` - collect_survey_responses+ * `connect_source` - connect_source+ * `run_first_query` - run_first_query+ * `join_external_data` - join_external_data+ * `create_saved_view` - create_saved_view+ * `enable_error_tracking` - enable_error_tracking+ * `upload_source_maps` - upload_source_maps+ * `view_first_error` - view_first_error+ * `resolve_first_error` - resolve_first_error+ * `ingest_first_llm_event` - ingest_first_llm_event+ * `view_first_trace` - view_first_trace+ * `track_costs` - track_costs+ * `set_up_llm_evaluation` - set_up_llm_evaluation+ * `run_ai_playground` - run_ai_playground+ * `enable_revenue_analytics_viewset` - enable_revenue_analytics_viewset+ * `connect_revenue_source` - connect_revenue_source+ * `set_up_revenue_goal` - set_up_revenue_goal+ * `enable_log_capture` - enable_log_capture+ * `view_first_logs` - view_first_logs+ * `create_first_workflow` - create_first_workflow+ * `set_up_first_workflow_channel` - set_up_first_workflow_channel+ * `configure_workflow_trigger` - configure_workflow_trigger+ * `add_workflow_action` - add_workflow_action+ * `launch_workflow` - launch_workflow+ * `create_first_endpoint` - create_first_endpoint+ * `configure_endpoint` - configure_endpoint+ * `test_endpoint` - test_endpoint+ * `create_early_access_feature` - create_early_access_feature+ * `update_feature_stage` - update_feature_stage+ */+ export type AvailableSetupTaskIdsEnum = typeof AvailableSetupTaskIdsEnum[keyof typeof AvailableSetupTaskIdsEnum];- export type ConversionGoalFilter2SchemaMap = {[key: string]: string | unknown};- export interface ConversionGoalFilter2 {- conversion_goal_id: string;- conversion_goal_name: string;- custom_name?: string | null;- /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */- fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- id: number;- kind?: 'ActionsNode';- math?: BaseMathType | FunnelMathType | PropertyMathType | CountPerActorMathType | ExperimentMetricMathType | CalendarHeatmapMathType | 'unique_group' | 'hogql' | null;- math_group_type_index?: MathGroupTypeIndex | null;- math_hogql?: string | null;- math_multiplier?: number | null;- math_property?: string | null;- math_property_revenue_currency?: RevenueCurrencyPropertyConfig | null;- math_property_type?: string | null;- name?: string | null;- optionalInFunnel?: boolean | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: ConversionGoalFilter2Response;- schema_map: ConversionGoalFilter2SchemaMap;- /** version of the node, used for schema migrations */- version?: number | null;- }+ export const AvailableSetupTaskIdsEnum = {+ IngestFirstEvent: 'ingest_first_event',+ SetUpReverseProxy: 'set_up_reverse_proxy',+ CreateFirstInsight: 'create_first_insight',+ CreateFirstDashboard: 'create_first_dashboard',+ TrackCustomEvents: 'track_custom_events',+ DefineActions: 'define_actions',+ SetUpCohorts: 'set_up_cohorts',+ ExploreTrendsInsight: 'explore_trends_insight',+ CreateFunnel: 'create_funnel',+ ExploreRetentionInsight: 'explore_retention_insight',+ ExplorePathsInsight: 'explore_paths_insight',+ ExploreStickinessInsight: 'explore_stickiness_insight',+ ExploreLifecycleInsight: 'explore_lifecycle_insight',+ AddAuthorizedDomain: 'add_authorized_domain',+ SetUpWebVitals: 'set_up_web_vitals',+ ReviewWebAnalyticsDashboard: 'review_web_analytics_dashboard',+ FilterWebAnalytics: 'filter_web_analytics',+ SetUpWebAnalyticsConversionGoals: 'set_up_web_analytics_conversion_goals',+ VisitWebVitalsDashboard: 'visit_web_vitals_dashboard',+ SetupSessionRecordings: 'setup_session_recordings',+ WatchSessionRecording: 'watch_session_recording',+ ConfigureRecordingSettings: 'configure_recording_settings',+ CreateRecordingPlaylist: 'create_recording_playlist',+ EnableConsoleLogs: 'enable_console_logs',+ CreateFeatureFlag: 'create_feature_flag',+ ImplementFlagInCode: 'implement_flag_in_code',+ UpdateFeatureFlagReleaseConditions: 'update_feature_flag_release_conditions',+ CreateMultivariateFlag: 'create_multivariate_flag',+ SetUpFlagPayloads: 'set_up_flag_payloads',+ SetUpFlagEvaluationRuntimes: 'set_up_flag_evaluation_runtimes',+ CreateExperiment: 'create_experiment',+ ImplementExperimentVariants: 'implement_experiment_variants',+ LaunchExperiment: 'launch_experiment',+ ReviewExperimentResults: 'review_experiment_results',+ CreateSurvey: 'create_survey',+ LaunchSurvey: 'launch_survey',+ CollectSurveyResponses: 'collect_survey_responses',+ ConnectSource: 'connect_source',+ RunFirstQuery: 'run_first_query',+ JoinExternalData: 'join_external_data',+ CreateSavedView: 'create_saved_view',+ EnableErrorTracking: 'enable_error_tracking',+ UploadSourceMaps: 'upload_source_maps',+ ViewFirstError: 'view_first_error',+ ResolveFirstError: 'resolve_first_error',+ IngestFirstLlmEvent: 'ingest_first_llm_event',+ ViewFirstTrace: 'view_first_trace',+ TrackCosts: 'track_costs',+ SetUpLlmEvaluation: 'set_up_llm_evaluation',+ RunAiPlayground: 'run_ai_playground',+ EnableRevenueAnalyticsViewset: 'enable_revenue_analytics_viewset',+ ConnectRevenueSource: 'connect_revenue_source',+ SetUpRevenueGoal: 'set_up_revenue_goal',+ EnableLogCapture: 'enable_log_capture',+ ViewFirstLogs: 'view_first_logs',+ CreateFirstWorkflow: 'create_first_workflow',+ SetUpFirstWorkflowChannel: 'set_up_first_workflow_channel',+ ConfigureWorkflowTrigger: 'configure_workflow_trigger',+ AddWorkflowAction: 'add_workflow_action',+ LaunchWorkflow: 'launch_workflow',+ CreateFirstEndpoint: 'create_first_endpoint',+ ConfigureEndpoint: 'configure_endpoint',+ TestEndpoint: 'test_endpoint',+ CreateEarlyAccessFeature: 'create_early_access_feature',+ UpdateFeatureStage: 'update_feature_stage',+ } as const;- export type ConversionGoalFilter3Response = { [key: string]: unknown } | null;+ export type AzureBlobDestinationConfigType = typeof AzureBlobDestinationConfigType[keyof typeof AzureBlobDestinationConfigType];- export type ConversionGoalFilter3SchemaMap = {[key: string]: string | unknown};- export interface ConversionGoalFilter3 {- conversion_goal_id: string;- conversion_goal_name: string;- custom_name?: string | null;- distinct_id_field: string;- dw_source_type?: string | null;- /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */- fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- id: string;- id_field: string;- kind?: 'DataWarehouseNode';- math?: BaseMathType | FunnelMathType | PropertyMathType | CountPerActorMathType | ExperimentMetricMathType | CalendarHeatmapMathType | 'unique_group' | 'hogql' | null;- math_group_type_index?: MathGroupTypeIndex | null;- math_hogql?: string | null;- math_multiplier?: number | null;- math_property?: string | null;- math_property_revenue_currency?: RevenueCurrencyPropertyConfig | null;- math_property_type?: string | null;- name?: string | null;- optionalInFunnel?: boolean | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: ConversionGoalFilter3Response;- schema_map: ConversionGoalFilter3SchemaMap;- table_name: string;- timestamp_field: string;- /** version of the node, used for schema migrations */- version?: number | null;- }+ export const AzureBlobDestinationConfigType = {+ AzureBlob: 'AzureBlob',+ } as const;/**- * * `0` - Disabled- * `1` - Stateless- * `2` - Stateful+ * * `brotli` - brotli+ * `gzip` - gzip+ * `lz4` - lz4+ * `snappy` - snappy+ * `zstd` - zstd*/- export type CookielessServerHashModeEnum = typeof CookielessServerHashModeEnum[keyof typeof CookielessServerHashModeEnum];+ export type CompressionEnum = typeof CompressionEnum[keyof typeof CompressionEnum];- export const CookielessServerHashModeEnum = {- Number0: 0,- Number1: 1,- Number2: 2,+ export const CompressionEnum = {+ Brotli: 'brotli',+ Gzip: 'gzip',+ Lz4: 'lz4',+ Snappy: 'snappy',+ Zstd: 'zstd',} as const;- export interface CopyDashboardTemplate {- /** UUID of a team-scoped template in the same organization. Global and feature-flag templates cannot be copied with this endpoint. */- source_template_id: string;- }+ /**+ * * `JSONLines` - JSONLines+ * `Parquet` - Parquet+ */+ export type FileFormatEnum = typeof FileFormatEnum[keyof typeof FileFormatEnum];- export interface CopyDashboardTileRequest {- /** Dashboard id the tile currently belongs to. */- fromDashboardId: number;- /** Dashboard tile id to copy. */- tileId: number;- }- export interface CopyExperimentToProject {- /** The team ID to copy the experiment to. */- target_team_id: number;- /** Optional feature flag key to use in the destination team. */- feature_flag_key?: string;- /** Optional name for the copied experiment. */- name?: string;- }+ export const FileFormatEnum = {+ JSONLines: 'JSONLines',+ Parquet: 'Parquet',+ } as const;- export interface CopyFlagsRequest {- /** Key of the feature flag to copy */- feature_flag_key: string;- /** Source project ID to copy the flag from */- from_project: number;+ /**+ * Typed configuration for an Azure Blob Storage batch-export destination.++ Credentials live in the linked Integration, not in this config. Mirrors+ `AzureBlobBatchExportInputs` in `products/batch_exports/backend/service.py`.+ */+ export interface AzureBlobDestinationConfig {+ /** Azure Blob Storage container name. */+ container_name: string;+ /** Object key prefix applied to every exported file. */+ prefix?: string;+ /** Optional compression codec applied to exported files. Valid codecs depend on file_format.++ * `brotli` - brotli+ * `gzip` - gzip+ * `lz4` - lz4+ * `snappy` - snappy+ * `zstd` - zstd */+ compression?: CompressionEnum | null;+ /** File format used for exported objects.++ * `JSONLines` - JSONLines+ * `Parquet` - Parquet */+ file_format?: FileFormatEnum;/**- * List of target project IDs to copy the flag to- * @maxItems 50+ * If set, rolls to a new file once the current file exceeds this size in MB.+ * @nullable*/- target_project_ids: number[];- /** Whether to also copy scheduled changes for this flag */- copy_schedule?: boolean;- /** Whether to force the copied flag to be disabled in target projects, ignoring the source flag's enabled status */- disable_copied_flag?: boolean;+ max_file_size_mb?: number | null;+ type: AzureBlobDestinationConfigType;}- export interface CopyFlagsSuccessItem {- /** ID of the created feature flag */- id: number;- /** Key of the feature flag */- key: string;- /** Name of the feature flag */- name: string;- /** Whether the flag is active */- active: boolean;- /** Team ID the flag was copied to */- team_id: number;- }+ export type AzureBlobDestinationRequestType = typeof AzureBlobDestinationRequestType[keyof typeof AzureBlobDestinationRequestType];- export interface CopyFlagsResult {- /** Project ID (present on failure) */- project_id?: number;- /** Error message (present on failure) */- error_message?: string;- }- export interface CopyFlagsResponse {- /** List of successfully copied flags */- success: CopyFlagsSuccessItem[];- /** List of failed copy attempts */- failed: CopyFlagsResult[];+ export const AzureBlobDestinationRequestType = {+ AzureBlob: 'AzureBlob',+ } as const;++ /**+ * Request shape for creating or updating an Azure Blob Storage batch-export destination.+ */+ export interface AzureBlobDestinationRequest {+ type: AzureBlobDestinationRequestType;+ /** ID of an azure-blob-kind Integration. Use the integrations-list MCP tool to find one. */+ integration_id: number;+ config: AzureBlobDestinationConfig;}/**- * * `acquisition` - Acquisition- * `activation` - Activation- * `monetization` - Monetization- * `expansion` - Expansion- * `referral` - Referral- * `retention` - Retention- * `churn` - Churn- * `reactivation` - Reactivation+ * * `AzureBlob` - AzureBlob*/- export type CoreEventCategoryEnum = typeof CoreEventCategoryEnum[keyof typeof CoreEventCategoryEnum];+ export type AzureBlobDestinationRequestTypeEnum = typeof AzureBlobDestinationRequestTypeEnum[keyof typeof AzureBlobDestinationRequestTypeEnum];- export const CoreEventCategoryEnum = {- Acquisition: 'acquisition',- Activation: 'activation',- Monetization: 'monetization',- Expansion: 'expansion',- Referral: 'referral',- Retention: 'retention',- Churn: 'churn',- Reactivation: 'reactivation',+ export const AzureBlobDestinationRequestTypeEnum = {+ AzureBlob: 'AzureBlob',} as const;- export interface CoreEvent {- readonly id: string;- /**- * Display name for this core event- * @maxLength 255- */- name: string;- /** Optional description */- description?: string;- /** Lifecycle category for this core event+ /**+ * * `AED` - AED+ * `AFN` - AFN+ * `ALL` - ALL+ * `AMD` - AMD+ * `ANG` - ANG+ * `AOA` - AOA+ * `ARS` - ARS+ * `AUD` - AUD+ * `AWG` - AWG+ * `AZN` - AZN+ * `BAM` - BAM+ * `BBD` - BBD+ * `BDT` - BDT+ * `BGN` - BGN+ * `BHD` - BHD+ * `BIF` - BIF+ * `BMD` - BMD+ * `BND` - BND+ * `BOB` - BOB+ * `BRL` - BRL+ * `BSD` - BSD+ * `BTC` - BTC+ * `BTN` - BTN+ * `BWP` - BWP+ * `BYN` - BYN+ * `BZD` - BZD+ * `CAD` - CAD+ * `CDF` - CDF+ * `CHF` - CHF+ * `CLP` - CLP+ * `CNY` - CNY+ * `COP` - COP+ * `CRC` - CRC+ * `CVE` - CVE+ * `CZK` - CZK+ * `DJF` - DJF+ * `DKK` - DKK+ * `DOP` - DOP+ * `DZD` - DZD+ * `EGP` - EGP+ * `ERN` - ERN+ * `ETB` - ETB+ * `EUR` - EUR+ * `FJD` - FJD+ * `GBP` - GBP+ * `GEL` - GEL+ * `GHS` - GHS+ * `GIP` - GIP+ * `GMD` - GMD+ * `GNF` - GNF+ * `GTQ` - GTQ+ * `GYD` - GYD+ * `HKD` - HKD+ * `HNL` - HNL+ * `HRK` - HRK+ * `HTG` - HTG+ * `HUF` - HUF+ * `IDR` - IDR+ * `ILS` - ILS+ * `INR` - INR+ * `IQD` - IQD+ * `IRR` - IRR+ * `ISK` - ISK+ * `JMD` - JMD+ * `JOD` - JOD+ * `JPY` - JPY+ * `KES` - KES+ * `KGS` - KGS+ * `KHR` - KHR+ * `KMF` - KMF+ * `KRW` - KRW+ * `KWD` - KWD+ * `KYD` - KYD+ * `KZT` - KZT+ * `LAK` - LAK+ * `LBP` - LBP+ * `LKR` - LKR+ * `LRD` - LRD+ * `LTL` - LTL+ * `LVL` - LVL+ * `LSL` - LSL+ * `LYD` - LYD+ * `MAD` - MAD+ * `MDL` - MDL+ * `MGA` - MGA+ * `MKD` - MKD+ * `MMK` - MMK+ * `MNT` - MNT+ * `MOP` - MOP+ * `MRU` - MRU+ * `MTL` - MTL+ * `MUR` - MUR+ * `MVR` - MVR+ * `MWK` - MWK+ * `MXN` - MXN+ * `MYR` - MYR+ * `MZN` - MZN+ * `NAD` - NAD+ * `NGN` - NGN+ * `NIO` - NIO+ * `NOK` - NOK+ * `NPR` - NPR+ * `NZD` - NZD+ * `OMR` - OMR+ * `PAB` - PAB+ * `PEN` - PEN+ * `PGK` - PGK+ * `PHP` - PHP+ * `PKR` - PKR+ * `PLN` - PLN+ * `PYG` - PYG+ * `QAR` - QAR+ * `RON` - RON+ * `RSD` - RSD+ * `RUB` - RUB+ * `RWF` - RWF+ * `SAR` - SAR+ * `SBD` - SBD+ * `SCR` - SCR+ * `SDG` - SDG+ * `SEK` - SEK+ * `SGD` - SGD+ * `SRD` - SRD+ * `SSP` - SSP+ * `STN` - STN+ * `SYP` - SYP+ * `SZL` - SZL+ * `THB` - THB+ * `TJS` - TJS+ * `TMT` - TMT+ * `TND` - TND+ * `TOP` - TOP+ * `TRY` - TRY+ * `TTD` - TTD+ * `TWD` - TWD+ * `TZS` - TZS+ * `UAH` - UAH+ * `UGX` - UGX+ * `USD` - USD+ * `UYU` - UYU+ * `UZS` - UZS+ * `VES` - VES+ * `VND` - VND+ * `VUV` - VUV+ * `WST` - WST+ * `XAF` - XAF+ * `XCD` - XCD+ * `XOF` - XOF+ * `XPF` - XPF+ * `YER` - YER+ * `ZAR` - ZAR+ * `ZMW` - ZMW+ */+ export type BaseCurrencyEnum = typeof BaseCurrencyEnum[keyof typeof BaseCurrencyEnum];+++ export const BaseCurrencyEnum = {+ Aed: 'AED',+ Afn: 'AFN',+ All: 'ALL',+ Amd: 'AMD',+ Ang: 'ANG',+ Aoa: 'AOA',+ Ars: 'ARS',+ Aud: 'AUD',+ Awg: 'AWG',+ Azn: 'AZN',+ Bam: 'BAM',+ Bbd: 'BBD',+ Bdt: 'BDT',+ Bgn: 'BGN',+ Bhd: 'BHD',+ Bif: 'BIF',+ Bmd: 'BMD',+ Bnd: 'BND',+ Bob: 'BOB',+ Brl: 'BRL',+ Bsd: 'BSD',+ Btc: 'BTC',+ Btn: 'BTN',+ Bwp: 'BWP',+ Byn: 'BYN',+ Bzd: 'BZD',+ Cad: 'CAD',+ Cdf: 'CDF',+ Chf: 'CHF',+ Clp: 'CLP',+ Cny: 'CNY',+ Cop: 'COP',+ Crc: 'CRC',+ Cve: 'CVE',+ Czk: 'CZK',+ Djf: 'DJF',+ Dkk: 'DKK',+ Dop: 'DOP',+ Dzd: 'DZD',+ Egp: 'EGP',+ Ern: 'ERN',+ Etb: 'ETB',+ Eur: 'EUR',+ Fjd: 'FJD',+ Gbp: 'GBP',+ Gel: 'GEL',+ Ghs: 'GHS',+ Gip: 'GIP',+ Gmd: 'GMD',+ Gnf: 'GNF',+ Gtq: 'GTQ',+ Gyd: 'GYD',+ Hkd: 'HKD',+ Hnl: 'HNL',+ Hrk: 'HRK',+ Htg: 'HTG',+ Huf: 'HUF',+ Idr: 'IDR',+ Ils: 'ILS',+ Inr: 'INR',+ Iqd: 'IQD',+ Irr: 'IRR',+ Isk: 'ISK',+ Jmd: 'JMD',+ Jod: 'JOD',+ Jpy: 'JPY',+ Kes: 'KES',+ Kgs: 'KGS',+ Khr: 'KHR',+ Kmf: 'KMF',+ Krw: 'KRW',+ Kwd: 'KWD',+ Kyd: 'KYD',+ Kzt: 'KZT',+ Lak: 'LAK',+ Lbp: 'LBP',+ Lkr: 'LKR',+ Lrd: 'LRD',+ Ltl: 'LTL',+ Lvl: 'LVL',+ Lsl: 'LSL',+ Lyd: 'LYD',+ Mad: 'MAD',+ Mdl: 'MDL',+ Mga: 'MGA',+ Mkd: 'MKD',+ Mmk: 'MMK',+ Mnt: 'MNT',+ Mop: 'MOP',+ Mru: 'MRU',+ Mtl: 'MTL',+ Mur: 'MUR',+ Mvr: 'MVR',+ Mwk: 'MWK',+ Mxn: 'MXN',+ Myr: 'MYR',+ Mzn: 'MZN',+ Nad: 'NAD',+ Ngn: 'NGN',+ Nio: 'NIO',+ Nok: 'NOK',+ Npr: 'NPR',+ Nzd: 'NZD',+ Omr: 'OMR',+ Pab: 'PAB',+ Pen: 'PEN',+ Pgk: 'PGK',+ Php: 'PHP',+ Pkr: 'PKR',+ Pln: 'PLN',+ Pyg: 'PYG',+ Qar: 'QAR',+ Ron: 'RON',+ Rsd: 'RSD',+ Rub: 'RUB',+ Rwf: 'RWF',+ Sar: 'SAR',+ Sbd: 'SBD',+ Scr: 'SCR',+ Sdg: 'SDG',+ Sek: 'SEK',+ Sgd: 'SGD',+ Srd: 'SRD',+ Ssp: 'SSP',+ Stn: 'STN',+ Syp: 'SYP',+ Szl: 'SZL',+ Thb: 'THB',+ Tjs: 'TJS',+ Tmt: 'TMT',+ Tnd: 'TND',+ Top: 'TOP',+ Try: 'TRY',+ Ttd: 'TTD',+ Twd: 'TWD',+ Tzs: 'TZS',+ Uah: 'UAH',+ Ugx: 'UGX',+ Usd: 'USD',+ Uyu: 'UYU',+ Uzs: 'UZS',+ Ves: 'VES',+ Vnd: 'VND',+ Vuv: 'VUV',+ Wst: 'WST',+ Xaf: 'XAF',+ Xcd: 'XCD',+ Xof: 'XOF',+ Xpf: 'XPF',+ Yer: 'YER',+ Zar: 'ZAR',+ Zmw: 'ZMW',+ } as const;++ export interface QuarantineSourceRun {+ id: string;+ branch: string;+ commit_sha: string;+ created_at: string;+ /** @nullable */+ pr_number?: number | null;+ }++ export interface BaselineQuarantineSummary {+ created_by?: UserBasicInfo | null;+ source_run?: QuarantineSourceRun | null;+ id: string;+ reason: string;+ /** @nullable */+ expires_at: string | null;+ created_at: string;+ }++ export interface BaselineEntry {+ /** Active quarantine details when `is_quarantined` is true. Null otherwise. */+ quarantine?: BaselineQuarantineSummary | null;+ identifier: string;+ run_type: string;+ /** @nullable */+ browser: string | null;+ /** @nullable */+ thumbnail_hash: string | null;+ /** @nullable */+ width: number | null;+ /** @nullable */+ height: number | null;+ tolerate_count_30d: number;+ tolerate_count_90d: number;+ is_quarantined: boolean;+ last_run_at: string;+ baseline_change_count: number;+ /** @nullable */+ recent_drift_avg: number | null;+ }++ export type BaselineTotalsByRunType = {[key: string]: number};- * `acquisition` - Acquisition- * `activation` - Activation- * `monetization` - Monetization- * `expansion` - Expansion- * `referral` - Referral- * `retention` - Retention- * `churn` - Churn- * `reactivation` - Reactivation */- category: CoreEventCategoryEnum;- /** Filter configuration - event, action, or data warehouse node */- filter: unknown;- readonly created_at: string;- readonly updated_at: string;+ export interface BaselineTotals {+ by_run_type: BaselineTotalsByRunType;+ all_snapshots: number;+ recently_tolerated: number;+ frequently_tolerated: number;+ currently_quarantined: number;+ }++ export interface BaselineOverview {+ entries: BaselineEntry[];+ totals: BaselineTotals;+ truncated: boolean;+ generated_at: string;}/**- * * `single` - Single page- * `sitemap` - Sitemap- * `same_origin` - Same origin crawl- * `github_repo` - GitHub repository+ * * `minimal` - minimal+ * `detailed` - detailed*/- export type CrawlModeEnum = typeof CrawlModeEnum[keyof typeof CrawlModeEnum];+ export type DetailModeValueEnum = typeof DetailModeValueEnum[keyof typeof DetailModeValueEnum];- export const CrawlModeEnum = {- Single: 'single',- Sitemap: 'sitemap',- SameOrigin: 'same_origin',- GithubRepo: 'github_repo',+ export const DetailModeValueEnum = {+ Minimal: 'minimal',+ Detailed: 'detailed',} as const;- /**- * Typed configuration for a FileDownload batch-export destination.- */- export interface FileDownloadDestinationFileConfig {- /** File format-- * `Parquet` - Parquet- * `JSONLines` - JSONLines */- format?: FileFormatEnum;- /** Compress the file with a supported compression format+ export interface BatchCheckRequest {+ /**+ * List of trace IDs to check for cached summaries+ * @maxItems 100+ */+ trace_ids: string[];+ /** Summary detail level to check for- * `zstd` - zstd- * `gzip` - gzip- * `brotli` - brotli- * `lz4` - lz4- * `snappy` - snappy */- compression?: CompressionEnum | null;+ * `minimal` - minimal+ * `detailed` - detailed */+ mode?: DetailModeValueEnum;/**- * Split download into multiple files of at most this size in MB- * @minimum 0+ * LLM model used for cached summaries* @nullable*/- max_size_mb?: number | null;+ model?: string | null;}- export type FileDownloadEventsRequestModel = typeof FileDownloadEventsRequestModel[keyof typeof FileDownloadEventsRequestModel];-+ export interface CachedSummary {+ trace_id: string;+ title: string;+ cached?: boolean;+ }- export const FileDownloadEventsRequestModel = {- Events: 'events',- } as const;+ export interface BatchCheckResponse {+ summaries: CachedSummary[];+ }/**- * Typed configuration for the events model.+ * * `events` - Events+ * `persons` - Persons+ * `sessions` - Sessions*/- export interface FileDownloadEventsRequest {- file: FileDownloadDestinationFileConfig;- model: FileDownloadEventsRequestModel;- include?: string[];- exclude?: string[];- data_interval_start: string;- data_interval_end: string;- }-- export type FileDownloadPersonsRequestModel = typeof FileDownloadPersonsRequestModel[keyof typeof FileDownloadPersonsRequestModel];+ export type ModelEnum = typeof ModelEnum[keyof typeof ModelEnum];- export const FileDownloadPersonsRequestModel = {+ export const ModelEnum = {+ Events: 'events',Persons: 'persons',+ Sessions: 'sessions',} as const;/**- * Typed configuration for the persons model.+ * * `S3` - S3+ * `Snowflake` - Snowflake+ * `Postgres` - Postgres+ * `Redshift` - Redshift+ * `BigQuery` - Bigquery+ * `Databricks` - Databricks+ * `AzureBlob` - Azure Blob+ * `Workflows` - Workflows+ * `HTTP` - Http+ * `NoOp` - Noop+ * `FileDownload` - File Download*/- export interface FileDownloadPersonsRequest {- file: FileDownloadDestinationFileConfig;- model: FileDownloadPersonsRequestModel;- data_interval_start: string;- data_interval_end: string;- }+ export type BatchExportDestinationTypeEnum = typeof BatchExportDestinationTypeEnum[keyof typeof BatchExportDestinationTypeEnum];- export type FileDownloadSessionsRequestModel = typeof FileDownloadSessionsRequestModel[keyof typeof FileDownloadSessionsRequestModel];++ export const BatchExportDestinationTypeEnum = {+ S3: 'S3',+ Snowflake: 'Snowflake',+ Postgres: 'Postgres',+ Redshift: 'Redshift',+ BigQuery: 'BigQuery',+ Databricks: 'Databricks',+ AzureBlob: 'AzureBlob',+ Workflows: 'Workflows',+ Http: 'HTTP',+ NoOp: 'NoOp',+ FileDownload: 'FileDownload',+ } as const;++ export type DatabricksDestinationConfigType = typeof DatabricksDestinationConfigType[keyof typeof DatabricksDestinationConfigType];- export const FileDownloadSessionsRequestModel = {- Sessions: 'sessions',+ export const DatabricksDestinationConfigType = {+ Databricks: 'Databricks',} as const;/**- * Typed configuration for the sessions model.+ * Typed configuration for a Databricks batch-export destination.++ Credentials live in the linked Integration, not in this config. Mirrors+ `DatabricksBatchExportInputs` in `products/batch_exports/backend/service.py`.*/- export interface FileDownloadSessionsRequest {- file: FileDownloadDestinationFileConfig;- model: FileDownloadSessionsRequestModel;- data_interval_start: string;- data_interval_end: string;+ export interface DatabricksDestinationConfig {+ /** Databricks SQL warehouse HTTP path. */+ http_path: string;+ /** Unity Catalog name. */+ catalog: string;+ /** Schema (database) name inside the catalog. */+ schema: string;+ /** Destination table name. */+ table_name: string;+ /** Whether to use the Databricks VARIANT type for JSON-like columns. */+ use_variant_type?: boolean;+ /** Whether to let Databricks evolve the destination table schema automatically. */+ use_automatic_schema_evolution?: boolean;+ type: DatabricksDestinationConfigType;}- export type CreateFileDownloadRequest = FileDownloadEventsRequest | FileDownloadPersonsRequest | FileDownloadSessionsRequest;-- /**- * * `cost` - cost- * `latency` - latency- * `eval_pass_rate` - eval_pass_rate- */- export type TemplatesEnum = typeof TemplatesEnum[keyof typeof TemplatesEnum];+ export type BigQueryDestinationConfigType = typeof BigQueryDestinationConfigType[keyof typeof BigQueryDestinationConfigType];- export const TemplatesEnum = {- Cost: 'cost',- Latency: 'latency',- EvalPassRate: 'eval_pass_rate',+ export const BigQueryDestinationConfigType = {+ BigQuery: 'BigQuery',} as const;- export interface CreateFromPromptInput {- /** The name of the LLM prompt to experiment on. Must already exist for this team. */- prompt_name: string;- /**- * Ordered list of prompt version numbers to assign to experiment variants. The first entry is the control variant. Must contain between 2 and 10 distinct versions.- * @minItems 2- * @maxItems 10- */- versions: number[];- /**- * One or more metric templates to attach as primary metrics. Each template becomes one metric on the experiment. Allowed values: cost, latency, eval_pass_rate.- * @minItems 1- * @maxItems 3- */- templates: TemplatesEnum[];- /** Optional experiment name. If omitted, a name is generated from the prompt and versions. */- name?: string;- /** Optional feature flag key. If omitted, a slug is derived from the experiment name. */- feature_flag_key?: string;- /** Optional experiment description. */- description?: string;- }-- export interface CreateGroup {- /**- * @minimum -2147483648- * @maximum 2147483647- */- group_type_index: number;- /** @maxLength 400 */- group_key: string;- group_properties?: unknown;- }-/**- * * `BAA` - BAA- * `DPA` - DPA- */- export type CreateLegalDocumentDocumentTypeEnum = typeof CreateLegalDocumentDocumentTypeEnum[keyof typeof CreateLegalDocumentDocumentTypeEnum];+ * Typed configuration for a BigQuery batch-export destination.+ Credentials live in the linked Integration, not in this config. Mirrors the+ non-credential fields of `BigQueryBatchExportInputs` in+ `products/batch_exports/backend/service.py`.+ */+ export interface BigQueryDestinationConfig {+ /** BigQuery dataset ID to write to. */+ dataset_id: string;+ /** BigQuery table ID inside the dataset. */+ table_id?: string;+ /** Whether to export 'properties', 'set', and 'set_once' fields as the BigQuery JSON type rather than STRING. Cannot be changed after the export is created. */+ use_json_type?: boolean;+ type: BigQueryDestinationConfigType;+ }- export const CreateLegalDocumentDocumentTypeEnum = {- Baa: 'BAA',- Dpa: 'DPA',- } as const;+ export type BatchExportDestinationConfig = DatabricksDestinationConfig | AzureBlobDestinationConfig | BigQueryDestinationConfig;/**- * Input serializer for POST. Mirrors the submittable fields on the model plus- cross-field rules (BAA addon, DPA mode, uniqueness). The view supplies the- organization and submitting user.+ * Serializer for an BatchExportDestination model.++ The `config` field is polymorphic and typed only for destinations that keep+ credentials in the linked Integration (currently Databricks, AzureBlob, BigQuery).+ Other destination types accept the same JSON shape but without a typed+ OpenAPI schema. Secret fields are stripped from `config` on read.*/- export interface CreateLegalDocument {- /** Either 'BAA' or 'DPA'.+ export interface BatchExportDestination {+ /** A choice of supported BatchExportDestination types.- * `BAA` - BAA- * `DPA` - DPA */- document_type: CreateLegalDocumentDocumentTypeEnum;+ * `S3` - S3+ * `Snowflake` - Snowflake+ * `Postgres` - Postgres+ * `Redshift` - Redshift+ * `BigQuery` - Bigquery+ * `Databricks` - Databricks+ * `AzureBlob` - Azure Blob+ * `Workflows` - Workflows+ * `HTTP` - Http+ * `NoOp` - Noop+ * `FileDownload` - File Download */+ type: BatchExportDestinationTypeEnum;+ /** Destination-specific configuration. Fields depend on `type`. Credentials for integration-backed destinations (Databricks, AzureBlob, BigQuery) are NOT stored here — they live in the linked Integration. Secret fields are stripped from responses. */+ config: BatchExportDestinationConfig;/**- * The customer legal entity entering the agreement (PandaDoc's Client.Company).- * @maxLength 255+ * The integration for this destination.+ * @nullable*/- company_name: string;+ integration?: number | null;/**- * The customer address (PandaDoc's Client.StreetAddress).- * @maxLength 512+ * ID of a team-scoped Integration providing credentials. Required for Databricks, AzureBlob, and BigQuery destinations; unused for other types.+ * @nullable*/- company_address: string;- /** Email the signed PandaDoc envelope is sent to (PandaDoc's Client.Email). */- representative_email: string;- }-- /**- * Typed output for view set `create`.- */- export interface CreateOutput {- id: string;+ integration_id?: number | null;}/**- * * `zoom` - zoom- * `teams` - teams- * `meet` - meet- * `desktop_audio` - desktop_audio- * `slack` - slack+ * * `hour` - hour+ * `day` - day+ * `week` - week+ * `every 5 minutes` - every 5 minutes+ * `every 15 minutes` - every 15 minutes*/- export type CreateRecordingRequestPlatformEnum = typeof CreateRecordingRequestPlatformEnum[keyof typeof CreateRecordingRequestPlatformEnum];+ export type IntervalEnum = typeof IntervalEnum[keyof typeof IntervalEnum];- export const CreateRecordingRequestPlatformEnum = {- Zoom: 'zoom',- Teams: 'teams',- Meet: 'meet',- DesktopAudio: 'desktop_audio',- Slack: 'slack',+ export const IntervalEnum = {+ Hour: 'hour',+ Day: 'day',+ Week: 'week',+ Every5Minutes: 'every 5 minutes',+ Every15Minutes: 'every 15 minutes',} as const;/**- * Request body for creating a new recording- */- export interface CreateRecordingRequest {- /** Meeting platform being recorded-- * `zoom` - zoom- * `teams` - teams- * `meet` - meet- * `desktop_audio` - desktop_audio- * `slack` - slack */- platform?: CreateRecordingRequestPlatformEnum;- }-- /**- * * `zoom` - Zoom- * `teams` - Microsoft Teams- * `meet` - Google Meet- * `desktop_audio` - Desktop audio- * `slack` - Slack huddle+ * * `Cancelled` - Cancelled+ * `Completed` - Completed+ * `ContinuedAsNew` - Continued As New+ * `Failed` - Failed+ * `FailedRetryable` - Failed Retryable+ * `FailedBilling` - Failed Billing+ * `Terminated` - Terminated+ * `TimedOut` - Timedout+ * `Running` - Running+ * `Starting` - Starting*/- export type MeetingPlatformEnum = typeof MeetingPlatformEnum[keyof typeof MeetingPlatformEnum];+ export type BatchExportRunStatusEnum = typeof BatchExportRunStatusEnum[keyof typeof BatchExportRunStatusEnum];- export const MeetingPlatformEnum = {- Zoom: 'zoom',- Teams: 'teams',- Meet: 'meet',- DesktopAudio: 'desktop_audio',- Slack: 'slack',+ export const BatchExportRunStatusEnum = {+ Cancelled: 'Cancelled',+ Completed: 'Completed',+ ContinuedAsNew: 'ContinuedAsNew',+ Failed: 'Failed',+ FailedRetryable: 'FailedRetryable',+ FailedBilling: 'FailedBilling',+ Terminated: 'Terminated',+ TimedOut: 'TimedOut',+ Running: 'Running',+ Starting: 'Starting',} as const;/**- * * `recording` - Recording- * `uploading` - Uploading- * `processing` - Processing- * `ready` - Ready- * `error` - Error+ * Serializer for a BatchExportRun model.*/- export type DesktopRecordingStatusEnum = typeof DesktopRecordingStatusEnum[keyof typeof DesktopRecordingStatusEnum];--- export const DesktopRecordingStatusEnum = {- Recording: 'recording',- Uploading: 'uploading',- Processing: 'processing',- Ready: 'ready',- Error: 'error',- } as const;+ export interface BatchExportRun {+ readonly id: string;+ /** The status of this run.- /**- * Serializer for extracted tasks- */- export interface DesktopRecordingTask {- title: string;- description?: string;- /** @nullable */- assignee?: string | null;+ * `Cancelled` - Cancelled+ * `Completed` - Completed+ * `ContinuedAsNew` - Continued As New+ * `Failed` - Failed+ * `FailedRetryable` - Failed Retryable+ * `FailedBilling` - Failed Billing+ * `Terminated` - Terminated+ * `TimedOut` - Timedout+ * `Running` - Running+ * `Starting` - Starting */+ status: BatchExportRunStatusEnum;+ /**+ * The number of records that have been exported.+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ records_completed?: number | null;+ /**+ * The number of records that failed downstream processing (e.g. hog function execution errors).+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ records_failed?: number | null;+ /**+ * The latest error that occurred during this run.+ * @nullable+ */+ latest_error?: string | null;+ /**+ * The start of the data interval.+ * @nullable+ */+ data_interval_start?: string | null;+ /** The end of the data interval. */+ data_interval_end: string;+ /**+ * An opaque cursor that may be used to resume.+ * @nullable+ */+ cursor?: string | null;+ /** The timestamp at which this BatchExportRun was created. */+ readonly created_at: string;+ /**+ * The timestamp at which this BatchExportRun finished, successfully or not.+ * @nullable+ */+ finished_at?: string | null;+ /** The timestamp at which this BatchExportRun was last updated. */+ readonly last_updated_at: string;+ /**+ * The total count of records that should be exported in this BatchExportRun.+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ records_total_count?: number | null;+ /**+ * The number of bytes that have been exported in this BatchExportRun.+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ bytes_exported?: number | null;+ /**+ * The `BatchExport` this run belongs to.+ * @nullable+ */+ readonly batch_export: string | null;+ /**+ * The `BatchExportOnDemand` this run belongs to.+ * @nullable+ */+ batch_export_on_demand?: string | null;+ /**+ * The backfill this run belongs to.+ * @nullable+ */+ backfill?: string | null;}/**- * Response for creating a new recording (includes upload_token)+ * Serializer for a BatchExport model.*/- export interface CreateRecordingResponse {+ export interface BatchExport {readonly id: string;- readonly team: number;- /** @nullable */- readonly created_by: number | null;- readonly sdk_upload_id: string;- /** @nullable */- recall_recording_id?: string | null;- platform: MeetingPlatformEnum;- /**- * @maxLength 255- * @nullable- */- meeting_title?: string | null;+ /** The team this belongs to. */+ readonly team_id: number;+ /** A human-readable name for this BatchExport. */+ name: string;+ /** Which model this BatchExport is exporting.++ * `events` - Events+ * `persons` - Persons+ * `sessions` - Sessions */+ model?: ModelEnum | BlankEnum | null;+ /** Destination configuration (type, config, and optional integration). */+ destination: BatchExportDestination;+ /** How often the batch export should run.++ * `hour` - hour+ * `day` - day+ * `week` - week+ * `every 5 minutes` - every 5 minutes+ * `every 15 minutes` - every 15 minutes */+ interval: IntervalEnum;+ /** Whether this BatchExport is paused or not. */+ paused?: boolean;+ /** The timestamp at which this BatchExport was created. */+ readonly created_at: string;+ /** The timestamp at which this BatchExport was last updated. */+ readonly last_updated_at: string;/**- * @maxLength 200+ * The timestamp at which this BatchExport was last paused.* @nullable*/- meeting_url?: string | null;+ last_paused_at?: string | null;/**- * @minimum -2147483648- * @maximum 2147483647+ * Time before which any Batch Export runs won't be triggered.* @nullable*/- duration_seconds?: number | null;- status?: DesktopRecordingStatusEnum;- /** @nullable */- notes?: string | null;- /** @nullable */- error_message?: string | null;+ start_at?: string | null;/**- * @maxLength 200+ * Time after which any Batch Export runs won't be triggered.* @nullable*/- video_url?: string | null;+ end_at?: string | null;+ /** The 10 most recent runs of this batch export, ordered newest first. */+ readonly latest_runs: readonly BatchExportRun[];+ /** Optional HogQL SELECT defining a custom model schema. Only recommended in advanced use cases. */+ hogql_query?: string;+ /** A schema of custom fields to select when exporting data. */+ readonly schema: unknown;+ filters?: unknown;+ /** IANA timezone name controlling daily and weekly interval boundaries. Defaults to UTC.++ * `Africa/Abidjan` - Africa/Abidjan+ * `Africa/Accra` - Africa/Accra+ * `Africa/Addis_Ababa` - Africa/Addis_Ababa+ * `Africa/Algiers` - Africa/Algiers+ * `Africa/Asmara` - Africa/Asmara+ * `Africa/Asmera` - Africa/Asmera+ * `Africa/Bamako` - Africa/Bamako+ * `Africa/Bangui` - Africa/Bangui+ * `Africa/Banjul` - Africa/Banjul+ * `Africa/Bissau` - Africa/Bissau+ * `Africa/Blantyre` - Africa/Blantyre+ * `Africa/Brazzaville` - Africa/Brazzaville+ * `Africa/Bujumbura` - Africa/Bujumbura+ * `Africa/Cairo` - Africa/Cairo+ * `Africa/Casablanca` - Africa/Casablanca+ * `Africa/Ceuta` - Africa/Ceuta+ * `Africa/Conakry` - Africa/Conakry+ * `Africa/Dakar` - Africa/Dakar+ * `Africa/Dar_es_Salaam` - Africa/Dar_es_Salaam+ * `Africa/Djibouti` - Africa/Djibouti+ * `Africa/Douala` - Africa/Douala+ * `Africa/El_Aaiun` - Africa/El_Aaiun+ * `Africa/Freetown` - Africa/Freetown+ * `Africa/Gaborone` - Africa/Gaborone+ * `Africa/Harare` - Africa/Harare+ * `Africa/Johannesburg` - Africa/Johannesburg+ * `Africa/Juba` - Africa/Juba+ * `Africa/Kampala` - Africa/Kampala+ * `Africa/Khartoum` - Africa/Khartoum+ * `Africa/Kigali` - Africa/Kigali+ * `Africa/Kinshasa` - Africa/Kinshasa+ * `Africa/Lagos` - Africa/Lagos+ * `Africa/Libreville` - Africa/Libreville+ * `Africa/Lome` - Africa/Lome+ * `Africa/Luanda` - Africa/Luanda+ * `Africa/Lubumbashi` - Africa/Lubumbashi+ * `Africa/Lusaka` - Africa/Lusaka+ * `Africa/Malabo` - Africa/Malabo+ * `Africa/Maputo` - Africa/Maputo+ * `Africa/Maseru` - Africa/Maseru+ * `Africa/Mbabane` - Africa/Mbabane+ * `Africa/Mogadishu` - Africa/Mogadishu+ * `Africa/Monrovia` - Africa/Monrovia+ * `Africa/Nairobi` - Africa/Nairobi+ * `Africa/Ndjamena` - Africa/Ndjamena+ * `Africa/Niamey` - Africa/Niamey+ * `Africa/Nouakchott` - Africa/Nouakchott+ * `Africa/Ouagadougou` - Africa/Ouagadougou+ * `Africa/Porto-Novo` - Africa/Porto-Novo+ * `Africa/Sao_Tome` - Africa/Sao_Tome+ * `Africa/Timbuktu` - Africa/Timbuktu+ * `Africa/Tripoli` - Africa/Tripoli+ * `Africa/Tunis` - Africa/Tunis+ * `Africa/Windhoek` - Africa/Windhoek+ * `America/Adak` - America/Adak+ * `America/Anchorage` - America/Anchorage+ * `America/Anguilla` - America/Anguilla+ * `America/Antigua` - America/Antigua+ * `America/Araguaina` - America/Araguaina+ * `America/Argentina/Buenos_Aires` - America/Argentina/Buenos_Aires+ * `America/Argentina/Catamarca` - America/Argentina/Catamarca+ * `America/Argentina/ComodRivadavia` - America/Argentina/ComodRivadavia+ * `America/Argentina/Cordoba` - America/Argentina/Cordoba+ * `America/Argentina/Jujuy` - America/Argentina/Jujuy+ * `America/Argentina/La_Rioja` - America/Argentina/La_Rioja+ * `America/Argentina/Mendoza` - America/Argentina/Mendoza+ * `America/Argentina/Rio_Gallegos` - America/Argentina/Rio_Gallegos+ * `America/Argentina/Salta` - America/Argentina/Salta+ * `America/Argentina/San_Juan` - America/Argentina/San_Juan+ * `America/Argentina/San_Luis` - America/Argentina/San_Luis+ * `America/Argentina/Tucuman` - America/Argentina/Tucuman+ * `America/Argentina/Ushuaia` - America/Argentina/Ushuaia+ * `America/Aruba` - America/Aruba+ * `America/Asuncion` - America/Asuncion+ * `America/Atikokan` - America/Atikokan+ * `America/Atka` - America/Atka+ * `America/Bahia` - America/Bahia+ * `America/Bahia_Banderas` - America/Bahia_Banderas+ * `America/Barbados` - America/Barbados+ * `America/Belem` - America/Belem+ * `America/Belize` - America/Belize+ * `America/Blanc-Sablon` - America/Blanc-Sablon+ * `America/Boa_Vista` - America/Boa_Vista+ * `America/Bogota` - America/Bogota+ * `America/Boise` - America/Boise+ * `America/Buenos_Aires` - America/Buenos_Aires+ * `America/Cambridge_Bay` - America/Cambridge_Bay+ * `America/Campo_Grande` - America/Campo_Grande+ * `America/Cancun` - America/Cancun+ * `America/Caracas` - America/Caracas+ * `America/Catamarca` - America/Catamarca+ * `America/Cayenne` - America/Cayenne+ * `America/Cayman` - America/Cayman+ * `America/Chicago` - America/Chicago+ * `America/Chihuahua` - America/Chihuahua+ * `America/Ciudad_Juarez` - America/Ciudad_Juarez+ * `America/Coral_Harbour` - America/Coral_Harbour+ * `America/Cordoba` - America/Cordoba+ * `America/Costa_Rica` - America/Costa_Rica+ * `America/Creston` - America/Creston+ * `America/Cuiaba` - America/Cuiaba+ * `America/Curacao` - America/Curacao+ * `America/Danmarkshavn` - America/Danmarkshavn+ * `America/Dawson` - America/Dawson+ * `America/Dawson_Creek` - America/Dawson_Creek+ * `America/Denver` - America/Denver+ * `America/Detroit` - America/Detroit+ * `America/Dominica` - America/Dominica+ * `America/Edmonton` - America/Edmonton+ * `America/Eirunepe` - America/Eirunepe+ * `America/El_Salvador` - America/El_Salvador+ * `America/Ensenada` - America/Ensenada+ * `America/Fort_Nelson` - America/Fort_Nelson+ * `America/Fort_Wayne` - America/Fort_Wayne+ * `America/Fortaleza` - America/Fortaleza+ * `America/Glace_Bay` - America/Glace_Bay+ * `America/Godthab` - America/Godthab+ * `America/Goose_Bay` - America/Goose_Bay+ * `America/Grand_Turk` - America/Grand_Turk+ * `America/Grenada` - America/Grenada+ * `America/Guadeloupe` - America/Guadeloupe+ * `America/Guatemala` - America/Guatemala+ * `America/Guayaquil` - America/Guayaquil+ * `America/Guyana` - America/Guyana+ * `America/Halifax` - America/Halifax+ * `America/Havana` - America/Havana+ * `America/Hermosillo` - America/Hermosillo+ * `America/Indiana/Indianapolis` - America/Indiana/Indianapolis+ * `America/Indiana/Knox` - America/Indiana/Knox+ * `America/Indiana/Marengo` - America/Indiana/Marengo+ * `America/Indiana/Petersburg` - America/Indiana/Petersburg+ * `America/Indiana/Tell_City` - America/Indiana/Tell_City+ * `America/Indiana/Vevay` - America/Indiana/Vevay+ * `America/Indiana/Vincennes` - America/Indiana/Vincennes+ * `America/Indiana/Winamac` - America/Indiana/Winamac+ * `America/Indianapolis` - America/Indianapolis+ * `America/Inuvik` - America/Inuvik+ * `America/Iqaluit` - America/Iqaluit+ * `America/Jamaica` - America/Jamaica+ * `America/Jujuy` - America/Jujuy+ * `America/Juneau` - America/Juneau+ * `America/Kentucky/Louisville` - America/Kentucky/Louisville+ * `America/Kentucky/Monticello` - America/Kentucky/Monticello+ * `America/Knox_IN` - America/Knox_IN+ * `America/Kralendijk` - America/Kralendijk+ * `America/La_Paz` - America/La_Paz+ * `America/Lima` - America/Lima+ * `America/Los_Angeles` - America/Los_Angeles+ * `America/Louisville` - America/Louisville+ * `America/Lower_Princes` - America/Lower_Princes+ * `America/Maceio` - America/Maceio+ * `America/Managua` - America/Managua+ * `America/Manaus` - America/Manaus+ * `America/Marigot` - America/Marigot+ * `America/Martinique` - America/Martinique+ * `America/Matamoros` - America/Matamoros+ * `America/Mazatlan` - America/Mazatlan+ * `America/Mendoza` - America/Mendoza+ * `America/Menominee` - America/Menominee+ * `America/Merida` - America/Merida+ * `America/Metlakatla` - America/Metlakatla+ * `America/Mexico_City` - America/Mexico_City+ * `America/Miquelon` - America/Miquelon+ * `America/Moncton` - America/Moncton+ * `America/Monterrey` - America/Monterrey+ * `America/Montevideo` - America/Montevideo+ * `America/Montreal` - America/Montreal+ * `America/Montserrat` - America/Montserrat+ * `America/Nassau` - America/Nassau+ * `America/New_York` - America/New_York+ * `America/Nipigon` - America/Nipigon+ * `America/Nome` - America/Nome+ * `America/Noronha` - America/Noronha+ * `America/North_Dakota/Beulah` - America/North_Dakota/Beulah+ * `America/North_Dakota/Center` - America/North_Dakota/Center+ * `America/North_Dakota/New_Salem` - America/North_Dakota/New_Salem+ * `America/Nuuk` - America/Nuuk+ * `America/Ojinaga` - America/Ojinaga+ * `America/Panama` - America/Panama+ * `America/Pangnirtung` - America/Pangnirtung+ * `America/Paramaribo` - America/Paramaribo+ * `America/Phoenix` - America/Phoenix+ * `America/Port-au-Prince` - America/Port-au-Prince+ * `America/Port_of_Spain` - America/Port_of_Spain+ * `America/Porto_Acre` - America/Porto_Acre+ * `America/Porto_Velho` - America/Porto_Velho+ * `America/Puerto_Rico` - America/Puerto_Rico+ * `America/Punta_Arenas` - America/Punta_Arenas+ * `America/Rainy_River` - America/Rainy_River+ * `America/Rankin_Inlet` - America/Rankin_Inlet+ * `America/Recife` - America/Recife+ * `America/Regina` - America/Regina+ * `America/Resolute` - America/Resolute+ * `America/Rio_Branco` - America/Rio_Branco+ * `America/Rosario` - America/Rosario+ * `America/Santa_Isabel` - America/Santa_Isabel+ * `America/Santarem` - America/Santarem+ * `America/Santiago` - America/Santiago+ * `America/Santo_Domingo` - America/Santo_Domingo+ * `America/Sao_Paulo` - America/Sao_Paulo+ * `America/Scoresbysund` - America/Scoresbysund+ * `America/Shiprock` - America/Shiprock+ * `America/Sitka` - America/Sitka+ * `America/St_Barthelemy` - America/St_Barthelemy+ * `America/St_Johns` - America/St_Johns+ * `America/St_Kitts` - America/St_Kitts+ * `America/St_Lucia` - America/St_Lucia+ * `America/St_Thomas` - America/St_Thomas+ * `America/St_Vincent` - America/St_Vincent+ * `America/Swift_Current` - America/Swift_Current+ * `America/Tegucigalpa` - America/Tegucigalpa+ * `America/Thule` - America/Thule+ * `America/Thunder_Bay` - America/Thunder_Bay+ * `America/Tijuana` - America/Tijuana+ * `America/Toronto` - America/Toronto+ * `America/Tortola` - America/Tortola+ * `America/Vancouver` - America/Vancouver+ * `America/Virgin` - America/Virgin+ * `America/Whitehorse` - America/Whitehorse+ * `America/Winnipeg` - America/Winnipeg+ * `America/Yakutat` - America/Yakutat+ * `America/Yellowknife` - America/Yellowknife+ * `Antarctica/Casey` - Antarctica/Casey+ * `Antarctica/Davis` - Antarctica/Davis+ * `Antarctica/DumontDUrville` - Antarctica/DumontDUrville+ * `Antarctica/Macquarie` - Antarctica/Macquarie+ * `Antarctica/Mawson` - Antarctica/Mawson+ * `Antarctica/McMurdo` - Antarctica/McMurdo+ * `Antarctica/Palmer` - Antarctica/Palmer+ * `Antarctica/Rothera` - Antarctica/Rothera+ * `Antarctica/South_Pole` - Antarctica/South_Pole+ * `Antarctica/Syowa` - Antarctica/Syowa+ * `Antarctica/Troll` - Antarctica/Troll+ * `Antarctica/Vostok` - Antarctica/Vostok+ * `Arctic/Longyearbyen` - Arctic/Longyearbyen+ * `Asia/Aden` - Asia/Aden+ * `Asia/Almaty` - Asia/Almaty+ * `Asia/Amman` - Asia/Amman+ * `Asia/Anadyr` - Asia/Anadyr+ * `Asia/Aqtau` - Asia/Aqtau+ * `Asia/Aqtobe` - Asia/Aqtobe+ * `Asia/Ashgabat` - Asia/Ashgabat+ * `Asia/Ashkhabad` - Asia/Ashkhabad+ * `Asia/Atyrau` - Asia/Atyrau+ * `Asia/Baghdad` - Asia/Baghdad+ * `Asia/Bahrain` - Asia/Bahrain+ * `Asia/Baku` - Asia/Baku+ * `Asia/Bangkok` - Asia/Bangkok+ * `Asia/Barnaul` - Asia/Barnaul+ * `Asia/Beirut` - Asia/Beirut+ * `Asia/Bishkek` - Asia/Bishkek+ * `Asia/Brunei` - Asia/Brunei+ * `Asia/Calcutta` - Asia/Calcutta+ * `Asia/Chita` - Asia/Chita+ * `Asia/Choibalsan` - Asia/Choibalsan+ * `Asia/Chongqing` - Asia/Chongqing+ * `Asia/Chungking` - Asia/Chungking+ * `Asia/Colombo` - Asia/Colombo+ * `Asia/Dacca` - Asia/Dacca+ * `Asia/Damascus` - Asia/Damascus+ * `Asia/Dhaka` - Asia/Dhaka+ * `Asia/Dili` - Asia/Dili+ * `Asia/Dubai` - Asia/Dubai+ * `Asia/Dushanbe` - Asia/Dushanbe+ * `Asia/Famagusta` - Asia/Famagusta+ * `Asia/Gaza` - Asia/Gaza+ * `Asia/Harbin` - Asia/Harbin+ * `Asia/Hebron` - Asia/Hebron+ * `Asia/Ho_Chi_Minh` - Asia/Ho_Chi_Minh+ * `Asia/Hong_Kong` - Asia/Hong_Kong+ * `Asia/Hovd` - Asia/Hovd+ * `Asia/Irkutsk` - Asia/Irkutsk+ * `Asia/Istanbul` - Asia/Istanbul+ * `Asia/Jakarta` - Asia/Jakarta+ * `Asia/Jayapura` - Asia/Jayapura+ * `Asia/Jerusalem` - Asia/Jerusalem+ * `Asia/Kabul` - Asia/Kabul+ * `Asia/Kamchatka` - Asia/Kamchatka+ * `Asia/Karachi` - Asia/Karachi+ * `Asia/Kashgar` - Asia/Kashgar+ * `Asia/Kathmandu` - Asia/Kathmandu+ * `Asia/Katmandu` - Asia/Katmandu+ * `Asia/Khandyga` - Asia/Khandyga+ * `Asia/Kolkata` - Asia/Kolkata+ * `Asia/Krasnoyarsk` - Asia/Krasnoyarsk+ * `Asia/Kuala_Lumpur` - Asia/Kuala_Lumpur+ * `Asia/Kuching` - Asia/Kuching+ * `Asia/Kuwait` - Asia/Kuwait+ * `Asia/Macao` - Asia/Macao+ * `Asia/Macau` - Asia/Macau+ * `Asia/Magadan` - Asia/Magadan+ * `Asia/Makassar` - Asia/Makassar+ * `Asia/Manila` - Asia/Manila+ * `Asia/Muscat` - Asia/Muscat+ * `Asia/Nicosia` - Asia/Nicosia+ * `Asia/Novokuznetsk` - Asia/Novokuznetsk+ * `Asia/Novosibirsk` - Asia/Novosibirsk+ * `Asia/Omsk` - Asia/Omsk+ * `Asia/Oral` - Asia/Oral+ * `Asia/Phnom_Penh` - Asia/Phnom_Penh+ * `Asia/Pontianak` - Asia/Pontianak+ * `Asia/Pyongyang` - Asia/Pyongyang+ * `Asia/Qatar` - Asia/Qatar+ * `Asia/Qostanay` - Asia/Qostanay+ * `Asia/Qyzylorda` - Asia/Qyzylorda+ * `Asia/Rangoon` - Asia/Rangoon+ * `Asia/Riyadh` - Asia/Riyadh+ * `Asia/Saigon` - Asia/Saigon+ * `Asia/Sakhalin` - Asia/Sakhalin+ * `Asia/Samarkand` - Asia/Samarkand+ * `Asia/Seoul` - Asia/Seoul+ * `Asia/Shanghai` - Asia/Shanghai+ * `Asia/Singapore` - Asia/Singapore+ * `Asia/Srednekolymsk` - Asia/Srednekolymsk+ * `Asia/Taipei` - Asia/Taipei+ * `Asia/Tashkent` - Asia/Tashkent+ * `Asia/Tbilisi` - Asia/Tbilisi+ * `Asia/Tehran` - Asia/Tehran+ * `Asia/Tel_Aviv` - Asia/Tel_Aviv+ * `Asia/Thimbu` - Asia/Thimbu+ * `Asia/Thimphu` - Asia/Thimphu+ * `Asia/Tokyo` - Asia/Tokyo+ * `Asia/Tomsk` - Asia/Tomsk+ * `Asia/Ujung_Pandang` - Asia/Ujung_Pandang+ * `Asia/Ulaanbaatar` - Asia/Ulaanbaatar+ * `Asia/Ulan_Bator` - Asia/Ulan_Bator+ * `Asia/Urumqi` - Asia/Urumqi+ * `Asia/Ust-Nera` - Asia/Ust-Nera+ * `Asia/Vientiane` - Asia/Vientiane+ * `Asia/Vladivostok` - Asia/Vladivostok+ * `Asia/Yakutsk` - Asia/Yakutsk+ * `Asia/Yangon` - Asia/Yangon+ * `Asia/Yekaterinburg` - Asia/Yekaterinburg+ * `Asia/Yerevan` - Asia/Yerevan+ * `Atlantic/Azores` - Atlantic/Azores+ * `Atlantic/Bermuda` - Atlantic/Bermuda+ * `Atlantic/Canary` - Atlantic/Canary+ * `Atlantic/Cape_Verde` - Atlantic/Cape_Verde+ * `Atlantic/Faeroe` - Atlantic/Faeroe+ * `Atlantic/Faroe` - Atlantic/Faroe+ * `Atlantic/Jan_Mayen` - Atlantic/Jan_Mayen+ * `Atlantic/Madeira` - Atlantic/Madeira+ * `Atlantic/Reykjavik` - Atlantic/Reykjavik+ * `Atlantic/South_Georgia` - Atlantic/South_Georgia+ * `Atlantic/St_Helena` - Atlantic/St_Helena+ * `Atlantic/Stanley` - Atlantic/Stanley+ * `Australia/ACT` - Australia/ACT+ * `Australia/Adelaide` - Australia/Adelaide+ * `Australia/Brisbane` - Australia/Brisbane+ * `Australia/Broken_Hill` - Australia/Broken_Hill+ * `Australia/Canberra` - Australia/Canberra+ * `Australia/Currie` - Australia/Currie+ * `Australia/Darwin` - Australia/Darwin+ * `Australia/Eucla` - Australia/Eucla+ * `Australia/Hobart` - Australia/Hobart+ * `Australia/LHI` - Australia/LHI+ * `Australia/Lindeman` - Australia/Lindeman+ * `Australia/Lord_Howe` - Australia/Lord_Howe+ * `Australia/Melbourne` - Australia/Melbourne+ * `Australia/NSW` - Australia/NSW+ * `Australia/North` - Australia/North+ * `Australia/Perth` - Australia/Perth+ * `Australia/Queensland` - Australia/Queensland+ * `Australia/South` - Australia/South+ * `Australia/Sydney` - Australia/Sydney+ * `Australia/Tasmania` - Australia/Tasmania+ * `Australia/Victoria` - Australia/Victoria+ * `Australia/West` - Australia/West+ * `Australia/Yancowinna` - Australia/Yancowinna+ * `Brazil/Acre` - Brazil/Acre+ * `Brazil/DeNoronha` - Brazil/DeNoronha+ * `Brazil/East` - Brazil/East+ * `Brazil/West` - Brazil/West+ * `CET` - CET+ * `CST6CDT` - CST6CDT+ * `Canada/Atlantic` - Canada/Atlantic+ * `Canada/Central` - Canada/Central+ * `Canada/Eastern` - Canada/Eastern+ * `Canada/Mountain` - Canada/Mountain+ * `Canada/Newfoundland` - Canada/Newfoundland+ * `Canada/Pacific` - Canada/Pacific+ * `Canada/Saskatchewan` - Canada/Saskatchewan+ * `Canada/Yukon` - Canada/Yukon+ * `Chile/Continental` - Chile/Continental+ * `Chile/EasterIsland` - Chile/EasterIsland+ * `Cuba` - Cuba+ * `EET` - EET+ * `EST` - EST+ * `EST5EDT` - EST5EDT+ * `Egypt` - Egypt+ * `Eire` - Eire+ * `Etc/GMT` - Etc/GMT+ * `Etc/GMT+0` - Etc/GMT+0+ * `Etc/GMT+1` - Etc/GMT+1+ * `Etc/GMT+10` - Etc/GMT+10+ * `Etc/GMT+11` - Etc/GMT+11+ * `Etc/GMT+12` - Etc/GMT+12+ * `Etc/GMT+2` - Etc/GMT+2+ * `Etc/GMT+3` - Etc/GMT+3+ * `Etc/GMT+4` - Etc/GMT+4+ * `Etc/GMT+5` - Etc/GMT+5+ * `Etc/GMT+6` - Etc/GMT+6+ * `Etc/GMT+7` - Etc/GMT+7+ * `Etc/GMT+8` - Etc/GMT+8+ * `Etc/GMT+9` - Etc/GMT+9+ * `Etc/GMT-0` - Etc/GMT-0+ * `Etc/GMT-1` - Etc/GMT-1+ * `Etc/GMT-10` - Etc/GMT-10+ * `Etc/GMT-11` - Etc/GMT-11+ * `Etc/GMT-12` - Etc/GMT-12+ * `Etc/GMT-13` - Etc/GMT-13+ * `Etc/GMT-14` - Etc/GMT-14+ * `Etc/GMT-2` - Etc/GMT-2+ * `Etc/GMT-3` - Etc/GMT-3+ * `Etc/GMT-4` - Etc/GMT-4+ * `Etc/GMT-5` - Etc/GMT-5+ * `Etc/GMT-6` - Etc/GMT-6+ * `Etc/GMT-7` - Etc/GMT-7+ * `Etc/GMT-8` - Etc/GMT-8+ * `Etc/GMT-9` - Etc/GMT-9+ * `Etc/GMT0` - Etc/GMT0+ * `Etc/Greenwich` - Etc/Greenwich+ * `Etc/UCT` - Etc/UCT+ * `Etc/UTC` - Etc/UTC+ * `Etc/Universal` - Etc/Universal+ * `Etc/Zulu` - Etc/Zulu+ * `Europe/Amsterdam` - Europe/Amsterdam+ * `Europe/Andorra` - Europe/Andorra+ * `Europe/Astrakhan` - Europe/Astrakhan+ * `Europe/Athens` - Europe/Athens+ * `Europe/Belfast` - Europe/Belfast+ * `Europe/Belgrade` - Europe/Belgrade+ * `Europe/Berlin` - Europe/Berlin+ * `Europe/Bratislava` - Europe/Bratislava+ * `Europe/Brussels` - Europe/Brussels+ * `Europe/Bucharest` - Europe/Bucharest+ * `Europe/Budapest` - Europe/Budapest+ * `Europe/Busingen` - Europe/Busingen+ * `Europe/Chisinau` - Europe/Chisinau+ * `Europe/Copenhagen` - Europe/Copenhagen+ * `Europe/Dublin` - Europe/Dublin+ * `Europe/Gibraltar` - Europe/Gibraltar+ * `Europe/Guernsey` - Europe/Guernsey+ * `Europe/Helsinki` - Europe/Helsinki+ * `Europe/Isle_of_Man` - Europe/Isle_of_Man+ * `Europe/Istanbul` - Europe/Istanbul+ * `Europe/Jersey` - Europe/Jersey+ * `Europe/Kaliningrad` - Europe/Kaliningrad+ * `Europe/Kiev` - Europe/Kiev+ * `Europe/Kirov` - Europe/Kirov+ * `Europe/Kyiv` - Europe/Kyiv+ * `Europe/Lisbon` - Europe/Lisbon+ * `Europe/Ljubljana` - Europe/Ljubljana+ * `Europe/London` - Europe/London+ * `Europe/Luxembourg` - Europe/Luxembourg+ * `Europe/Madrid` - Europe/Madrid+ * `Europe/Malta` - Europe/Malta+ * `Europe/Mariehamn` - Europe/Mariehamn+ * `Europe/Minsk` - Europe/Minsk+ * `Europe/Monaco` - Europe/Monaco+ * `Europe/Moscow` - Europe/Moscow+ * `Europe/Nicosia` - Europe/Nicosia+ * `Europe/Oslo` - Europe/Oslo+ * `Europe/Paris` - Europe/Paris+ * `Europe/Podgorica` - Europe/Podgorica+ * `Europe/Prague` - Europe/Prague+ * `Europe/Riga` - Europe/Riga+ * `Europe/Rome` - Europe/Rome+ * `Europe/Samara` - Europe/Samara+ * `Europe/San_Marino` - Europe/San_Marino+ * `Europe/Sarajevo` - Europe/Sarajevo+ * `Europe/Saratov` - Europe/Saratov+ * `Europe/Simferopol` - Europe/Simferopol+ * `Europe/Skopje` - Europe/Skopje+ * `Europe/Sofia` - Europe/Sofia+ * `Europe/Stockholm` - Europe/Stockholm+ * `Europe/Tallinn` - Europe/Tallinn+ * `Europe/Tirane` - Europe/Tirane+ * `Europe/Tiraspol` - Europe/Tiraspol+ * `Europe/Ulyanovsk` - Europe/Ulyanovsk+ * `Europe/Uzhgorod` - Europe/Uzhgorod+ * `Europe/Vaduz` - Europe/Vaduz+ * `Europe/Vatican` - Europe/Vatican+ * `Europe/Vienna` - Europe/Vienna+ * `Europe/Vilnius` - Europe/Vilnius+ * `Europe/Volgograd` - Europe/Volgograd+ * `Europe/Warsaw` - Europe/Warsaw+ * `Europe/Zagreb` - Europe/Zagreb+ * `Europe/Zaporozhye` - Europe/Zaporozhye+ * `Europe/Zurich` - Europe/Zurich+ * `GB` - GB+ * `GB-Eire` - GB-Eire+ * `GMT` - GMT+ * `GMT+0` - GMT+0+ * `GMT-0` - GMT-0+ * `GMT0` - GMT0+ * `Greenwich` - Greenwich+ * `HST` - HST+ * `Hongkong` - Hongkong+ * `Iceland` - Iceland+ * `Indian/Antananarivo` - Indian/Antananarivo+ * `Indian/Chagos` - Indian/Chagos+ * `Indian/Christmas` - Indian/Christmas+ * `Indian/Cocos` - Indian/Cocos+ * `Indian/Comoro` - Indian/Comoro+ * `Indian/Kerguelen` - Indian/Kerguelen+ * `Indian/Mahe` - Indian/Mahe+ * `Indian/Maldives` - Indian/Maldives+ * `Indian/Mauritius` - Indian/Mauritius+ * `Indian/Mayotte` - Indian/Mayotte+ * `Indian/Reunion` - Indian/Reunion+ * `Iran` - Iran+ * `Israel` - Israel+ * `Jamaica` - Jamaica+ * `Japan` - Japan+ * `Kwajalein` - Kwajalein+ * `Libya` - Libya+ * `MET` - MET+ * `MST` - MST+ * `MST7MDT` - MST7MDT+ * `Mexico/BajaNorte` - Mexico/BajaNorte+ * `Mexico/BajaSur` - Mexico/BajaSur+ * `Mexico/General` - Mexico/General+ * `NZ` - NZ+ * `NZ-CHAT` - NZ-CHAT+ * `Navajo` - Navajo+ * `PRC` - PRC+ * `PST8PDT` - PST8PDT+ * `Pacific/Apia` - Pacific/Apia+ * `Pacific/Auckland` - Pacific/Auckland+ * `Pacific/Bougainville` - Pacific/Bougainville+ * `Pacific/Chatham` - Pacific/Chatham+ * `Pacific/Chuuk` - Pacific/Chuuk+ * `Pacific/Easter` - Pacific/Easter+ * `Pacific/Efate` - Pacific/Efate+ * `Pacific/Enderbury` - Pacific/Enderbury+ * `Pacific/Fakaofo` - Pacific/Fakaofo+ * `Pacific/Fiji` - Pacific/Fiji+ * `Pacific/Funafuti` - Pacific/Funafuti+ * `Pacific/Galapagos` - Pacific/Galapagos+ * `Pacific/Gambier` - Pacific/Gambier+ * `Pacific/Guadalcanal` - Pacific/Guadalcanal+ * `Pacific/Guam` - Pacific/Guam+ * `Pacific/Honolulu` - Pacific/Honolulu+ * `Pacific/Johnston` - Pacific/Johnston+ * `Pacific/Kanton` - Pacific/Kanton+ * `Pacific/Kiritimati` - Pacific/Kiritimati+ * `Pacific/Kosrae` - Pacific/Kosrae+ * `Pacific/Kwajalein` - Pacific/Kwajalein+ * `Pacific/Majuro` - Pacific/Majuro+ * `Pacific/Marquesas` - Pacific/Marquesas+ * `Pacific/Midway` - Pacific/Midway+ * `Pacific/Nauru` - Pacific/Nauru+ * `Pacific/Niue` - Pacific/Niue+ * `Pacific/Norfolk` - Pacific/Norfolk+ * `Pacific/Noumea` - Pacific/Noumea+ * `Pacific/Pago_Pago` - Pacific/Pago_Pago+ * `Pacific/Palau` - Pacific/Palau+ * `Pacific/Pitcairn` - Pacific/Pitcairn+ * `Pacific/Pohnpei` - Pacific/Pohnpei+ * `Pacific/Ponape` - Pacific/Ponape+ * `Pacific/Port_Moresby` - Pacific/Port_Moresby+ * `Pacific/Rarotonga` - Pacific/Rarotonga+ * `Pacific/Saipan` - Pacific/Saipan+ * `Pacific/Samoa` - Pacific/Samoa+ * `Pacific/Tahiti` - Pacific/Tahiti+ * `Pacific/Tarawa` - Pacific/Tarawa+ * `Pacific/Tongatapu` - Pacific/Tongatapu+ * `Pacific/Truk` - Pacific/Truk+ * `Pacific/Wake` - Pacific/Wake+ * `Pacific/Wallis` - Pacific/Wallis+ * `Pacific/Yap` - Pacific/Yap+ * `Poland` - Poland+ * `Portugal` - Portugal+ * `ROC` - ROC+ * `ROK` - ROK+ * `Singapore` - Singapore+ * `Turkey` - Turkey+ * `UCT` - UCT+ * `US/Alaska` - US/Alaska+ * `US/Aleutian` - US/Aleutian+ * `US/Arizona` - US/Arizona+ * `US/Central` - US/Central+ * `US/East-Indiana` - US/East-Indiana+ * `US/Eastern` - US/Eastern+ * `US/Hawaii` - US/Hawaii+ * `US/Indiana-Starke` - US/Indiana-Starke+ * `US/Michigan` - US/Michigan+ * `US/Mountain` - US/Mountain+ * `US/Pacific` - US/Pacific+ * `US/Samoa` - US/Samoa+ * `UTC` - UTC+ * `Universal` - Universal+ * `W-SU` - W-SU+ * `WET` - WET+ * `Zulu` - Zulu */+ timezone?: string | null;/**- * @minimum -2147483648- * @maximum 2147483647+ * Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday). Only valid when interval is 'week'.+ * @minimum 0+ * @maximum 6* @nullable*/- video_size_bytes?: number | null;- /** List of participant names */- participants?: string[];- readonly transcript_text: string;- /** Transcript segments with timestamps */- transcript_segments?: TranscriptSegment[];- /** @nullable */- summary?: string | null;- /** AI-extracted tasks from transcript */- extracted_tasks?: DesktopRecordingTask[];- /** @nullable */- tasks_generated_at?: string | null;- /** @nullable */- summary_generated_at?: string | null;- started_at?: string;- /** @nullable */- completed_at?: string | null;- readonly created_at: string;- readonly updated_at: string;- /** Recall.ai upload token for the desktop SDK */- upload_token: string;- }-- export interface CreateRepoInput {- repo_full_name: string;- /** @nullable */- repo_external_id?: number | null;- }-- export type CreateRunInputBaselineHashes = {[key: string]: string};-- export type CreateRunInputMetadata = { [key: string]: unknown };-- export interface CreateRunInput {- repo_id: string;- run_type: string;- commit_sha: string;- branch: string;- snapshots: SnapshotManifestItem[];- /** @nullable */- pr_number?: number | null;- baseline_hashes?: CreateRunInputBaselineHashes;- unchanged_count?: number;- removed_identifiers?: string[];- purpose?: string;- metadata?: CreateRunInputMetadata;- }-- export interface CreateRunResult {- run_id: string;- uploads: UploadTarget[];- }-- export interface CreateTextSource {- /**- * Short human label for the source. Shown in the settings list and in agent citations.- * @maxLength 255- */- name: string;- /** Raw text to index. Capped at 1 MB; larger payloads should be split into multiple sources or wait for URL/file support in Stage 2/3. */- text: string;- }-- export interface TileLayoutBox {- /** Column position in the dashboard grid (0-indexed). */- x?: number;- /** Row position in the dashboard grid (0-indexed). */- y?: number;- /** Width in grid columns. The desktop grid is 12 columns wide. */- w?: number;- /** Height in grid rows. */- h?: number;- }-- export interface TileLayouts {- /** Layout for the standard (desktop) breakpoint. The grid is 12 columns wide. */- sm?: TileLayoutBox;- /** Layout for the small (mobile) breakpoint. The grid is 1 column wide. */- xs?: TileLayoutBox;- }-- export interface CreateTextTileRequest {- /**- * Markdown body for the text tile. Supports headings, lists, and inline formatting. Useful as a dashboard section heading, divider, or annotation between insights. Max 4000 characters.- * @minLength 1- * @maxLength 4000- */- body: string;- /** Optional grid layout per breakpoint. If omitted, the tile is placed at the bottom of the dashboard using the default size. Text tiles typically use a thin full-width banner (e.g. w=12, h=1). */- layouts?: TileLayouts;+ offset_day?: number | null;/**- * Optional accent color name (e.g. 'blue', 'green', 'purple', 'black').- * @maxLength 400+ * Hour-of-day offset (0-23) for daily and weekly intervals. Only valid when interval is 'day' or 'week'.+ * @minimum 0+ * @maximum 23* @nullable*/- color?: string | null;+ offset_hour?: number | null;}/**- * * `web` - web- * `api` - api- * `mcp` - mcp- */- export type CreatedViaEnum = typeof CreatedViaEnum[keyof typeof CreatedViaEnum];--- export const CreatedViaEnum = {- Web: 'web',- Api: 'api',- Mcp: 'mcp',- } as const;-- /**- * * `default` - Default- * `template` - Template- * `duplicate` - Duplicate- * `unlisted` - Unlisted (product-embedded)+ * @nullable*/- export type CreationModeEnum = typeof CreationModeEnum[keyof typeof CreationModeEnum];--- export const CreationModeEnum = {- Default: 'default',- Template: 'template',- Duplicate: 'duplicate',- Unlisted: 'unlisted',- } as const;-- export interface Credential {- readonly id: string;- readonly created_by: UserBasic;- readonly created_at: string;- /** @maxLength 500 */- access_key: string;- /** @maxLength 500 */- access_secret: string;- }-- export interface CustomerJourney {- readonly id: string;- insight: number;- /** @maxLength 400 */- name: string;+ export type BatchExportBackfillProgress = {/** @nullable */- description?: string | null;- readonly created_at: string;+ readonly total_runs?: number | null;/** @nullable */- readonly created_by: number | null;+ readonly finished_runs?: number | null;/** @nullable */- readonly updated_at: string | null;- }+ readonly progress?: number | null;+ } | null;/**- * * `person` - Person- * `group_0` - Group 0- * `group_1` - Group 1- * `group_2` - Group 2- * `group_3` - Group 3- * `group_4` - Group 4+ * * `Cancelled` - Cancelled+ * `Completed` - Completed+ * `ContinuedAsNew` - Continued As New+ * `Failed` - Failed+ * `FailedRetryable` - Failed Retryable+ * `Terminated` - Terminated+ * `TimedOut` - Timedout+ * `Running` - Running+ * `Starting` - Starting*/- export type CustomerProfileConfigScopeEnum = typeof CustomerProfileConfigScopeEnum[keyof typeof CustomerProfileConfigScopeEnum];+ export type BatchExportBackfillStatusEnum = typeof BatchExportBackfillStatusEnum[keyof typeof BatchExportBackfillStatusEnum];- export const CustomerProfileConfigScopeEnum = {- Person: 'person',- Group0: 'group_0',- Group1: 'group_1',- Group2: 'group_2',- Group3: 'group_3',- Group4: 'group_4',+ export const BatchExportBackfillStatusEnum = {+ Cancelled: 'Cancelled',+ Completed: 'Completed',+ ContinuedAsNew: 'ContinuedAsNew',+ Failed: 'Failed',+ FailedRetryable: 'FailedRetryable',+ Terminated: 'Terminated',+ TimedOut: 'TimedOut',+ Running: 'Running',+ Starting: 'Starting',} as const;- export interface CustomerProfileConfig {- readonly id: string;- scope: CustomerProfileConfigScopeEnum;- content?: unknown;- sidebar?: unknown;- readonly created_at: string;- /** @nullable */- readonly updated_at: string | null;- }-- export interface Dag {+ export interface BatchExportBackfill {readonly id: string;- /**- * Human-readable name for this DAG- * @maxLength 2048- */- name: string;- /** Optional description of the DAG's purpose */- description?: string;- /**- * Sync frequency string (e.g. '24hour', '7day')- * @nullable- */- sync_frequency?: string | null;- readonly node_count: number;- readonly created_at: string;- /** @nullable */- readonly updated_at: string | null;- }-- export type DashboardFilters = { [key: string]: unknown };-- /**- * @nullable- */- export type DashboardVariables = { [key: string]: unknown } | null;-- /**- * @nullable- */- export type DashboardPersistedFilters = { [key: string]: unknown } | null;-- /**- * @nullable- */- export type DashboardPersistedVariables = { [key: string]: unknown } | null;-- export type DashboardTilesItem = { [key: string]: unknown };-- /**- * * `21` - Everyone in the project can edit- * `37` - Only those invited to this dashboard can edit- */- export type RestrictionLevelEnum = typeof RestrictionLevelEnum[keyof typeof RestrictionLevelEnum];--- export const RestrictionLevelEnum = {- Number21: 21,- Number37: 37,- } as const;-- export type EffectivePrivilegeLevelEnum = typeof EffectivePrivilegeLevelEnum[keyof typeof EffectivePrivilegeLevelEnum];--- export const EffectivePrivilegeLevelEnum = {- Number21: 21,- Number37: 37,- } as const;-- /**- * Serializer mixin that handles tags for objects.- */- export interface Dashboard {- readonly id: number;- /**- * @maxLength 400- * @nullable- */- name?: string | null;- description?: string;- pinned?: boolean;- readonly created_at: string;- readonly created_by: UserBasic;- /** @nullable */- last_accessed_at?: string | null;- /** @nullable */- readonly last_viewed_at: string | null;- readonly is_shared: boolean;- deleted?: boolean;- readonly creation_mode: CreationModeEnum;- readonly filters: DashboardFilters;- /** @nullable */- readonly variables: DashboardVariables;- /** Custom color mapping for breakdown values. */- breakdown_colors?: unknown;- /**- * ID of the color theme used for chart visualizations.- * @nullable- */- data_color_theme_id?: number | null;- tags?: unknown[];- restriction_level?: RestrictionLevelEnum;- readonly effective_restriction_level: EffectivePrivilegeLevelEnum;- readonly effective_privilege_level: EffectivePrivilegeLevelEnum;- /**- * The effective access level the user has for this object- * @nullable- */- readonly user_access_level: string | null;- readonly access_control_version: string;- /** @nullable */- last_refresh?: string | null;- /** @nullable */- readonly persisted_filters: DashboardPersistedFilters;- /** @nullable */- readonly persisted_variables: DashboardPersistedVariables;- readonly team_id: number;- /**- * List of quick filter IDs associated with this dashboard- * @nullable- */- quick_filter_ids?: string[] | null;- /** @nullable */- readonly tiles: readonly DashboardTilesItem[] | null;- /** Template key to create the dashboard from a predefined template. */- use_template?: string;- /**- * ID of an existing dashboard to duplicate.- * @nullable- */- use_dashboard?: number | null;- /** When deleting, also delete insights that are only on this dashboard. */- delete_insights?: boolean;- _create_in_folder?: string;- }-- /**- * Serializer mixin that handles tags for objects.- */- export interface DashboardBasic {- readonly id: number;- /**- * Name of the dashboard.- * @nullable- */- readonly name: string | null;- /** Description of the dashboard. */- readonly description: string;- /** Whether the dashboard is pinned to the top of the list. */- readonly pinned: boolean;- readonly created_at: string;- readonly created_by: UserBasic;/** @nullable */- readonly last_accessed_at: string | null;- /** @nullable */- readonly last_viewed_at: string | null;- readonly is_shared: boolean;- readonly deleted: boolean;- readonly creation_mode: CreationModeEnum;- tags?: unknown[];- /** Controls who can edit the dashboard.-- * `21` - Everyone in the project can edit- * `37` - Only those invited to this dashboard can edit */- readonly restriction_level: RestrictionLevelEnum;- readonly effective_restriction_level: EffectivePrivilegeLevelEnum;- readonly effective_privilege_level: EffectivePrivilegeLevelEnum;+ readonly progress: BatchExportBackfillProgress;/**- * The effective access level the user has for this object+ * The start of the data interval.* @nullable- */- readonly user_access_level: string | null;- readonly access_control_version: string;- /** @nullable */- readonly last_refresh: string | null;- readonly team_id: number;- }-- export interface DashboardCollaborator {- readonly id: string;- readonly dashboard_id: number;- readonly user: UserBasic;- level: RestrictionLevelEnum;- readonly added_at: string;- readonly updated_at: string;- user_uuid: string;- }-- export interface DashboardFilter {- breakdown_filter?: BreakdownFilter | null;- date_from?: string | null;- date_to?: string | null;- explicitDate?: boolean | null;- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- }-- /**- * * `team` - Only team- * `global` - Global- * `feature_flag` - Feature Flag- */- export type DashboardTemplateScopeEnum = typeof DashboardTemplateScopeEnum[keyof typeof DashboardTemplateScopeEnum];--- export const DashboardTemplateScopeEnum = {- Team: 'team',- Global: 'global',- FeatureFlag: 'feature_flag',- } as const;+ */+ start_at?: string | null;+ /**+ * The end of the data interval.+ * @nullable+ */+ end_at?: string | null;+ /** The status of this backfill.- export interface DashboardTemplate {- readonly id: string;+ * `Cancelled` - Cancelled+ * `Completed` - Completed+ * `ContinuedAsNew` - Continued As New+ * `Failed` - Failed+ * `FailedRetryable` - Failed Retryable+ * `Terminated` - Terminated+ * `TimedOut` - Timedout+ * `Running` - Running+ * `Starting` - Starting */+ status: BatchExportBackfillStatusEnum;+ /** The timestamp at which this BatchExportBackfill was created. */+ readonly created_at: string;/**- * @maxLength 400+ * The timestamp at which this BatchExportBackfill finished, successfully or not.* @nullable*/- template_name?: string | null;+ finished_at?: string | null;+ /** The timestamp at which this BatchExportBackfill was last updated. */+ readonly last_updated_at: string;/**- * @maxLength 400+ * The total number of records to export. Initially estimated, updated with actual count after completion.+ * @minimum -2147483648+ * @maximum 2147483647* @nullable*/- dashboard_description?: string | null;- dashboard_filters?: unknown;- /** @nullable */- tags?: string[] | null;- tiles?: unknown;- variables?: unknown;- /** @nullable */- deleted?: boolean | null;- /** @nullable */- readonly created_at: string | null;- readonly created_by: UserBasic;+ total_records_count?: number | null;/**- * @maxLength 8201+ * The actual start time after adjustment for earliest available data. May differ from start_at if user requested a date before data exists.* @nullable*/- image_url?: string | null;- /** @nullable */- readonly team_id: number | null;- scope?: DashboardTemplateScopeEnum | BlankEnum | null;- /** @nullable */- availability_contexts?: string[] | null;- /** Manually curated; used to highlight templates in the UI. */- is_featured?: boolean;+ adjusted_start_at?: string | null;+ /** The team this belongs to. */+ team: number;+ /** The BatchExport this backfill belongs to. */+ batch_export: string;}- export type InsightVizNodeKind = typeof InsightVizNodeKind[keyof typeof InsightVizNodeKind];+ export type DatabricksDestinationRequestType = typeof DatabricksDestinationRequestType[keyof typeof DatabricksDestinationRequestType];- export const InsightVizNodeKind = {- InsightVizNode: 'InsightVizNode',+ export const DatabricksDestinationRequestType = {+ Databricks: 'Databricks',} as const;- export interface Retention {- hideLineGraph?: boolean | null;- hideSizeColumn?: boolean | null;- useSmallLayout?: boolean | null;+ /**+ * Request shape for creating or updating a Databricks batch-export destination.+ */+ export interface DatabricksDestinationRequest {+ type: DatabricksDestinationRequestType;+ /** ID of a databricks-kind Integration. Use the integrations-list MCP tool to find one. */+ integration_id: number;+ config: DatabricksDestinationConfig;}- export interface VizSpecificOptions {- ActionsPie?: ActionsPie | null;- RETENTION?: Retention | null;- }+ export type BigQueryDestinationRequestType = typeof BigQueryDestinationRequestType[keyof typeof BigQueryDestinationRequestType];- export interface InsightVizNode {- /** Query is embedded inside another bordered component */- embedded?: boolean | null;- /** Show with most visual options enabled. Used in insight scene. */- full?: boolean | null;- hidePersonsModal?: boolean | null;- hideTooltipOnScroll?: boolean | null;- kind: InsightVizNodeKind;- showCorrelationTable?: boolean | null;- showFilters?: boolean | null;- showHeader?: boolean | null;- showLastComputation?: boolean | null;- showLastComputationRefresh?: boolean | null;- showResults?: boolean | null;- showTable?: boolean | null;- source: TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | StickinessQuery | LifecycleQuery | WebStatsTableQuery | WebOverviewQuery;- suppressSessionAnalysisWarning?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;- vizSpecificOptions?: VizSpecificOptions | null;++ export const BigQueryDestinationRequestType = {+ BigQuery: 'BigQuery',+ } as const;++ /**+ * Request shape for creating or updating a BigQuery batch-export destination.+ */+ export interface BigQueryDestinationRequest {+ type: BigQueryDestinationRequestType;+ /** ID of a google-cloud-service-account-kind Integration. Use the integrations-list MCP tool to find one. */+ integration_id: number;+ config: BigQueryDestinationConfig;}- export type DataTableNodeViewPropsContextType = typeof DataTableNodeViewPropsContextType[keyof typeof DataTableNodeViewPropsContextType];+ export type BatchExportDestinationRequest = DatabricksDestinationRequest | AzureBlobDestinationRequest | BigQueryDestinationRequest;+ /**+ * Request body for create/partial_update on BatchExportViewSet.- export const DataTableNodeViewPropsContextType = {- EventDefinition: 'event_definition',- TeamColumns: 'team_columns',- } as const;+ Mirrors the writeable fields of `BatchExportSerializer` but uses a polymorphic+ `destination` schema so integration_id is marked required on the types that need+ it. Responses continue to use `BatchExportSerializer`.+ */+ export interface BatchExportRequest {+ /** Human-readable name for the batch export. */+ name: string;+ /** Which data model to export (events, persons, sessions).- export interface DataTableNodeViewPropsContext {- eventDefinitionId?: string | null;- type: DataTableNodeViewPropsContextType;+ * `events` - Events+ * `persons` - Persons+ * `sessions` - Sessions */+ model?: ModelEnum;+ /** Destination configuration. Required integration_id is enforced per destination type. */+ destination: BatchExportDestinationRequest;+ /** How often the batch export should run.++ * `hour` - hour+ * `day` - day+ * `week` - week+ * `every 5 minutes` - every 5 minutes+ * `every 15 minutes` - every 15 minutes */+ interval: IntervalEnum;+ /** Whether the batch export is paused. */+ paused?: boolean;+ /** Optional HogQL SELECT defining a custom model schema. Only recommended in advanced use cases. */+ hogql_query?: string;+ filters?: unknown;+ /**+ * IANA timezone name (e.g. 'America/New_York', 'Europe/London', 'UTC') controlling daily and weekly interval boundaries.+ * @nullable+ */+ timezone?: string | null;+ /**+ * Day-of-week offset for weekly intervals (0=Sunday, 6=Saturday).+ * @minimum 0+ * @maximum 6+ * @nullable+ */+ offset_day?: number | null;+ /**+ * Hour-of-day offset (0-23) for daily and weekly intervals.+ * @minimum 0+ * @maximum 23+ * @nullable+ */+ offset_hour?: number | null;}- export type DataTableNodeKind = typeof DataTableNodeKind[keyof typeof DataTableNodeKind];+ /**+ * @nullable+ */+ export type BatchImportCreatedBy = { [key: string]: unknown } | null;++ /**+ * * `completed` - Completed+ * `failed` - Failed+ * `paused` - Paused+ * `running` - Running+ */+ export type BatchImportStatusEnum = typeof BatchImportStatusEnum[keyof typeof BatchImportStatusEnum];- export const DataTableNodeKind = {- DataTableNode: 'DataTableNode',+ export const BatchImportStatusEnum = {+ Completed: 'completed',+ Failed: 'failed',+ Paused: 'paused',+ Running: 'running',} as const;- export interface Response {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Cursor for fetching the next page of results */- nextCursor?: string | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * Serializer for BatchImport model+ */+ export interface BatchImport {+ readonly id: string;+ readonly team_id: number;+ readonly created_at: string;+ readonly updated_at: string;+ readonly state: unknown;+ /** @nullable */+ readonly created_by: BatchImportCreatedBy;+ readonly status: BatchImportStatusEnum;+ /** @nullable */+ readonly display_status_message: string | null;+ readonly import_config: unknown;}- export interface Response1 {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- limit: number;- missing_actors_count?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset: number;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: string[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ export type EventPropFilterTypeEnum = typeof EventPropFilterTypeEnum[keyof typeof EventPropFilterTypeEnum];- export interface Response2 {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- kind?: 'GroupsQuery';- limit: number;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset: number;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }- export interface Response3 {- /** Executed ClickHouse query */- clickhouse?: string | null;- /** Returned columns */- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Query explanation output */- explain?: string[] | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Query metadata output */- metadata?: HogQLMetadataResponse | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Input query string */- query?: string | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Types of returned columns */- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ export const EventPropFilterTypeEnum = {+ Event: 'event',+ Element: 'element',+ } as const;- export interface Response4 {- dateFrom?: string | null;- dateTo?: string | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: WebOverviewItem[];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- usedLazyPrecompute?: boolean | null;- usedPreAggregatedTables?: boolean | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface EventPropFilter {+ type: EventPropFilterTypeEnum;+ key: string;+ value: unknown;+ operator?: string | null;}- export interface Response5 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- usedLazyPrecompute?: boolean | null;- usedPreAggregatedTables?: boolean | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface HogQLFilter {+ type: 'hogql';+ key: string;+ value?: unknown;}- export interface Response6 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BehavioralFilter {+ bytecode?: unknown[] | null;+ bytecode_error?: string | null;+ conditionHash?: string | null;+ type: 'behavioral';+ key: string | number;+ value: string;+ event_type: string;+ time_value?: number | null;+ time_interval?: string | null;+ negation?: boolean;+ operator?: string | null;+ operator_value?: number | null;+ seq_time_interval?: string | null;+ seq_time_value?: number | null;+ seq_event?: string | number | null;+ seq_event_type?: string | null;+ total_periods?: number | null;+ min_periods?: number | null;+ event_filters?: (EventPropFilter | HogQLFilter)[] | null;+ explicit_datetime?: string | null;+ explicit_datetime_to?: string | null;}- export interface Response7 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Whether the response was served from the lazy precompute path. */- usedLazyPrecompute?: boolean | null;- /** Whether the response was served from a precomputed table. */- usedPreAggregatedTables?: boolean | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BiasRisk {+ /** Observed share of users assigned to `$multiple`, as a percentage (0-100). */+ multiple_variant_percentage: number;}- export interface WebVitalsPathBreakdownResultItem {- path: string;- value: number;- }+ /**+ * * `BigQuery` - BigQuery+ */+ export type BigQueryDestinationRequestTypeEnum = typeof BigQueryDestinationRequestTypeEnum[keyof typeof BigQueryDestinationRequestTypeEnum];- export interface WebVitalsPathBreakdownResult {- good: WebVitalsPathBreakdownResultItem[];- needs_improvements: WebVitalsPathBreakdownResultItem[];- poor: WebVitalsPathBreakdownResultItem[];- }- export interface Response8 {- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- /**- * @minItems 1- * @maxItems 1- */- results: WebVitalsPathBreakdownResult[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- usedLazyPrecompute?: boolean | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export const BigQueryDestinationRequestTypeEnum = {+ BigQuery: 'BigQuery',+ } as const;++ export interface BlastRadius {+ /** Number of users matching the filters */+ affected: number;+ /** Total number of users */+ total: number;}- export interface Response9 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * Property filters to apply+ */+ export type BlastRadiusRequestFilters = { [key: string]: unknown };++ export interface BlastRadiusRequest {+ /** Property filters to apply */+ filters: BlastRadiusRequestFilters;+ /**+ * Group type index for group-based targeting+ * @nullable+ */+ group_type_index?: number | null;}- export interface Response10 {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BooleanScoreDefinitionConfig {+ /** Optional label for a true value. */+ true_label?: string;+ /** Optional label for a false value. */+ false_label?: string;}- export interface Response11 {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BreakdownItem {+ label: string;+ value: string | number;}- export interface Response12 {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BreakdownValue {+ count: number;+ value: string;}- export interface RevenueAnalyticsMRRQueryResultItem {- churn: unknown;- contraction: unknown;- expansion: unknown;- new: unknown;- total: unknown;+ /**+ * Local variables at the time of the hit+ */+ export type BreakpointHitVariables = { [key: string]: unknown };++ /**+ * Schema for a single breakpoint hit event+ */+ export interface BreakpointHit {+ /** Unique identifier for the hit event */+ id: string;+ /** Line number where the breakpoint was hit */+ lineNumber: number;+ /** Name of the function where breakpoint was hit */+ functionName: string;+ /** When the breakpoint was hit */+ timestamp: string;+ /** Local variables at the time of the hit */+ variables: BreakpointHitVariables;+ /** Stack trace at the time of the hit */+ stackTrace: unknown[];+ /** ID of the breakpoint that was hit */+ breakpoint_id: string;+ /** Filename where the breakpoint was hit */+ filename: string;}- export interface Response13 {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: RevenueAnalyticsMRRQueryResultItem[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * Response schema for breakpoint hits endpoint+ */+ export interface BreakpointHitsResponse {+ /** List of breakpoint hit events */+ results: BreakpointHit[];+ /** Number of results returned */+ count: number;+ /** Whether there are more results available */+ has_more: boolean;}- export type RevenueAnalyticsOverviewItemKey = typeof RevenueAnalyticsOverviewItemKey[keyof typeof RevenueAnalyticsOverviewItemKey];+ /**+ * * `distinct_id` - User ID (default)+ * `device_id` - Device ID+ */+ export type BucketingIdentifierEnum = typeof BucketingIdentifierEnum[keyof typeof BucketingIdentifierEnum];- export const RevenueAnalyticsOverviewItemKey = {- Revenue: 'revenue',- PayingCustomerCount: 'paying_customer_count',- AvgRevenuePerCustomer: 'avg_revenue_per_customer',+ export const BucketingIdentifierEnum = {+ DistinctId: 'distinct_id',+ DeviceId: 'device_id',} as const;- export interface RevenueAnalyticsOverviewItem {- key: RevenueAnalyticsOverviewItemKey;- value: number;- }+ /**+ * * `fully_rolled_out` - fully_rolled_out+ * `not_rolled_out` - not_rolled_out+ * `partial` - partial+ */+ export type RolloutStateEnum = typeof RolloutStateEnum[keyof typeof RolloutStateEnum];- export interface Response14 {- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: RevenueAnalyticsOverviewItem[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }- export interface Response15 {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export const RolloutStateEnum = {+ FullyRolledOut: 'fully_rolled_out',+ NotRolledOut: 'not_rolled_out',+ Partial: 'partial',+ } as const;++ export interface BulkDeleteDeletedItem {+ /** ID of the soft-deleted flag. */+ id: number;+ /** The flag key at the time of deletion. */+ key: string;+ /** Rollout state captured before deletion.++ * `fully_rolled_out` - fully_rolled_out+ * `not_rolled_out` - not_rolled_out+ * `partial` - partial */+ rollout_state: RolloutStateEnum;+ /**+ * Variant key when a multivariate flag was fully rolled out to a single variant; otherwise null.+ * @nullable+ */+ active_variant: string | null;}- export interface Response16 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BulkDeleteErrorItem {+ /** Feature flag ID — integer for valid inputs; the original raw value for invalid inputs. */+ id: unknown;+ /** The flag key, when known. */+ key?: string;+ /** Human-readable reason the flag could not be deleted. */+ reason: string;}- export interface MarketingAnalyticsItem {- changeFromPreviousPct?: number | null;- hasComparison?: boolean | null;- isIncreaseBad?: boolean | null;- key: string;- kind: WebAnalyticsItemKind;- previous?: number | string | null;- value?: number | string | null;+ /**+ * * `boolean` - boolean+ * `multivariant` - multivariant+ * `experiment` - experiment+ * `remote_config` - remote_config+ */+ export type BulkDeleteFiltersTypeEnum = typeof BulkDeleteFiltersTypeEnum[keyof typeof BulkDeleteFiltersTypeEnum];+++ export const BulkDeleteFiltersTypeEnum = {+ Boolean: 'boolean',+ Multivariant: 'multivariant',+ Experiment: 'experiment',+ RemoteConfig: 'remote_config',+ } as const;++ /**+ * * `server` - Server+ * `client` - Client+ * `all` - All+ */+ export type EvaluationRuntimeEnum = typeof EvaluationRuntimeEnum[keyof typeof EvaluationRuntimeEnum];+++ export const EvaluationRuntimeEnum = {+ Server: 'server',+ Client: 'client',+ All: 'all',+ } as const;++ /**+ * Allowed filter keys for bulk_delete — same shape as the list endpoint's query params.+ */+ export interface BulkDeleteFilters {+ /** Filter by active state.++ * `true` - true+ * `false` - false+ * `STALE` - STALE */+ active?: ActiveEnum;+ /** Filter to flags created by a specific user ID. */+ created_by_id?: number;+ /** Search by feature flag key or name (case-insensitive). */+ search?: string;+ /** Filter by flag type.++ * `boolean` - boolean+ * `multivariant` - multivariant+ * `experiment` - experiment+ * `remote_config` - remote_config */+ type?: BulkDeleteFiltersTypeEnum;+ /** Filter by evaluation runtime.++ * `server` - Server+ * `client` - Client+ * `all` - All */+ evaluation_runtime?: EvaluationRuntimeEnum;+ /** JSON-encoded property filter to exclude. Same shape as the list endpoint. */+ excluded_properties?: string;+ /** Tag names to filter by. Flags carrying at least one of these tags match. */+ tags?: string[];+ /** When true, only matches flags with at least one evaluation context. */+ has_evaluation_contexts?: boolean;}- export interface Response18 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: MarketingAnalyticsItem[][];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BulkDeleteRequest {+ /** Filter criteria — same shape as the list endpoint's query params. Mutually exclusive with `ids`. Use this to bulk-delete by search/active/tags/etc. instead of supplying explicit IDs. */+ filters?: BulkDeleteFilters;+ /** Explicit feature flag IDs to soft-delete. Mutually exclusive with `filters`. */+ ids?: number[];}- export type Response19Results = {[key: string]: MarketingAnalyticsItem};+ /**+ * Schema-only — referenced from ``@extend_schema(responses=...)`` to describe the wire format.+ Never instantiate this for validation or call ``.is_valid()`` / ``.errors`` on it: the+ declared ``errors`` field shadows DRF's inherited ``Serializer.errors`` ReturnDict property,+ so accessing ``serializer.errors`` would return this field descriptor instead of validation+ errors. The handler builds the response dict directly; this class exists only so drf-spectacular+ can render the response in the OpenAPI spec and downstream generated clients.+ */+ export interface BulkDeleteResponse {+ /** Flags successfully soft-deleted. */+ deleted: BulkDeleteDeletedItem[];+ /** Flags that could not be deleted, with reasons. */+ errors: BulkDeleteErrorItem[];+ }- export interface Response19 {- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: Response19Results;- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BulkIntervieweeContextItem {+ /**+ * Identifier for the interviewee — typically an email address or PostHog distinct ID. Must match a value in the parent topic's interviewee_emails or interviewee_distinct_ids.+ * @maxLength 400+ */+ interviewee_identifier: string;+ /**+ * Extra context the voice agent should know about this specific interviewee — e.g. 'uses the replay product but has never used summarization'.+ * @maxLength 10000+ */+ agent_context: string;}- export interface Response20 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: MarketingAnalyticsItem[][];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface BulkIntervieweeContextRequest {+ /** List of interviewee context rows to create. Each item has an `interviewee_identifier` and an `agent_context`. At most 500 items per request. */+ items: BulkIntervieweeContextItem[];}- export interface VolumeBucket {- label: string;- value: number;+ export interface BulkIntervieweeContextResponse {+ /** Number of rows inserted by this request. */+ inserted_count: number;+ /** Number of items skipped because a row for that (topic, interviewee_identifier) already existed. */+ skipped_count: number;+ /** Identifiers from the request whose rows were skipped because a row for that (topic, interviewee_identifier) already existed. */+ skipped_identifiers: string[];}- export interface ErrorTrackingIssueAggregations {- occurrences: number;- sessions: number;- users: number;- volumeRange?: number[] | null;- volume_buckets: VolumeBucket[];+ export interface BulkKeysRequest {+ /** Feature flag IDs to look up keys for. Strings of digits are also accepted; any other value is reported in the response `warning` field and otherwise ignored. */+ ids?: unknown[];}- export type ErrorTrackingIssueAssigneeType = typeof ErrorTrackingIssueAssigneeType[keyof typeof ErrorTrackingIssueAssigneeType];+ /**+ * Mapping of feature flag ID (as a string) to flag key, for IDs that exist in this project.+ */+ export type BulkKeysResponseKeys = {[key: string]: string};+ export interface BulkKeysResponse {+ /** Mapping of feature flag ID (as a string) to flag key, for IDs that exist in this project. */+ keys: BulkKeysResponseKeys;+ /** Present when some submitted IDs were not numeric and were ignored. */+ warning?: string;+ }- export const ErrorTrackingIssueAssigneeType = {- User: 'user',- Role: 'role',- } as const;+ export interface BulkNotificationIdsRequest {+ /**+ * UUIDs of notification events to mark in bulk (max 500). Events the user is not a recipient of are silently skipped.+ * @maxItems 500+ */+ notification_ids: string[];+ }- export interface ErrorTrackingIssueAssignee {- id: string | number;- type: ErrorTrackingIssueAssigneeType;+ export interface BulkUpdateTagsError {+ id: number;+ reason: string;}- export interface ErrorTrackingIssueCohort {+ export interface BulkUpdateTagsItem {id: number;- name: string;+ tags: string[];}- export type IntegrationKind = typeof IntegrationKind[keyof typeof IntegrationKind];+ export interface BulkUpdateTagsRequest {+ /**+ * List of object IDs to update tags on.+ * @maxItems 500+ */+ ids: number[];+ /** 'add' merges with existing tags, 'remove' deletes specific tags, 'set' replaces all tags.+ * `add` - add+ * `remove` - remove+ * `set` - set */+ action: ActionEnum;+ /** Tag names to add, remove, or set. */+ tags: string[];+ }- export const IntegrationKind = {- Slack: 'slack',- SlackPosthogCode: 'slack-posthog-code',- Salesforce: 'salesforce',- Hubspot: 'hubspot',- GooglePubsub: 'google-pubsub',- GoogleCloudServiceAccount: 'google-cloud-service-account',- GoogleCloudStorage: 'google-cloud-storage',- GoogleAds: 'google-ads',- GoogleSheets: 'google-sheets',- LinkedinAds: 'linkedin-ads',- Snapchat: 'snapchat',- Stripe: 'stripe',- Intercom: 'intercom',- Email: 'email',- Twilio: 'twilio',- Linear: 'linear',- Github: 'github',- Gitlab: 'gitlab',- MetaAds: 'meta-ads',- Clickup: 'clickup',- RedditAds: 'reddit-ads',- Databricks: 'databricks',- TiktokAds: 'tiktok-ads',- BingAds: 'bing-ads',- Vercel: 'vercel',- AzureBlob: 'azure-blob',- Firebase: 'firebase',- Jira: 'jira',- PinterestAds: 'pinterest-ads',- CustomerioApp: 'customerio-app',- CustomerioWebhook: 'customerio-webhook',- CustomerioTrack: 'customerio-track',+ export interface BulkUpdateTagsResponse {+ updated: BulkUpdateTagsItem[];+ skipped: BulkUpdateTagsError[];+ }++ /**+ * * `b2b` - B2B+ * `b2c` - B2C+ * `other` - Other+ */+ export type BusinessModelEnum = typeof BusinessModelEnum[keyof typeof BusinessModelEnum];+++ export const BusinessModelEnum = {+ B2b: 'b2b',+ B2c: 'b2c',+ Other: 'other',} as const;- export interface ErrorTrackingExternalReferenceIntegration {- display_name: string;- id: number;- kind: IntegrationKind;+ export interface CIMDVerificationToken {+ readonly id: string;+ /** @maxLength 40 */+ label: string;+ /** @nullable */+ readonly mask_value: string | null;+ readonly created_by: UserBasic;+ readonly created_at: string;+ /** @nullable */+ readonly last_used_at: string | null;}- export interface ErrorTrackingExternalReference {- external_url: string;- id: string;- integration: ErrorTrackingExternalReferenceIntegration;- }+ /**+ * Create-response variant that includes the plaintext token.- export interface FirstEvent {- distinct_id: string;- properties: string;- timestamp: string;- uuid: string;+ Only emitted from the create endpoint - storage-side we only persist the+ hash, so subsequent reads use the base serializer.+ */+ export interface CIMDVerificationTokenWithValue {+ readonly id: string;+ /** @maxLength 40 */+ label: string;+ /** @nullable */+ readonly mask_value: string | null;+ readonly created_by: UserBasic;+ readonly created_at: string;+ /** @nullable */+ readonly last_used_at: string | null;+ /** Plaintext token, only returned on creation */+ readonly value: string;}- export interface LastEvent {- distinct_id: string;- properties: string;- timestamp: string;- uuid: string;+ export interface EventsHeatMapColumnAggregationResult {+ column: number;+ value: number;}- export type ErrorTrackingIssueStatus = typeof ErrorTrackingIssueStatus[keyof typeof ErrorTrackingIssueStatus];-+ export interface EventsHeatMapDataResult {+ column: number;+ row: number;+ value: number;+ }- export const ErrorTrackingIssueStatus = {- Archived: 'archived',- Active: 'active',- Resolved: 'resolved',- PendingRelease: 'pending_release',- Suppressed: 'suppressed',- } as const;+ export interface EventsHeatMapRowAggregationResult {+ row: number;+ value: number;+ }- export interface ErrorTrackingIssue {- aggregations?: ErrorTrackingIssueAggregations | null;- assignee?: ErrorTrackingIssueAssignee | null;- cohort?: ErrorTrackingIssueCohort | null;- description?: string | null;- external_issues?: ErrorTrackingExternalReference[] | null;- first_event?: FirstEvent | null;- first_seen: string;- function?: string | null;- id: string;- last_event?: LastEvent | null;- last_seen: string;- library?: string | null;- name?: string | null;- source?: string | null;- status: ErrorTrackingIssueStatus;+ export interface EventsHeatMapStructuredResult {+ allAggregations: number;+ columnAggregations: EventsHeatMapColumnAggregationResult[];+ data: EventsHeatMapDataResult[];+ rowAggregations: EventsHeatMapRowAggregationResult[];}- export interface Response21 {- columns?: string[] | null;+ export interface CalendarHeatmapResponse {/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */error?: string | null;+ /** Wether more breakdown values are available. */hasMore?: boolean | null;/** Generated HogQL query. */hogql?: string | null;- limit?: number | null;/** Modifiers used when performing the query */modifiers?: HogQLQueryModifiers | null;- offset?: number | null;/** Query status indicates whether next to the provided data, a query is still running. */query_status?: QueryStatus | null;/** The date range used for the query */resolved_date_range?: ResolvedDateRangeResponse | null;- results: ErrorTrackingIssue[];+ results: EventsHeatMapStructuredResult;/** Measured timings for different parts of the query generation process */timings?: QueryTiming[] | null;/** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */warnings?: DataWarehouseSyncWarning[] | null;}- export interface Population {- both: number;- exception_only: number;- neither: number;- success_only: number;+ export interface CalendarHeatmapQuery {+ /** Groups aggregation */+ aggregation_group_type_index?: number | null;+ /** Properties specific to the trends insight */+ calendarHeatmapFilter?: CalendarHeatmapFilter | null;+ /** Whether we should be comparing against a specific conversion goal */+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;+ /** Colors used in the insight's visualization */+ dataColorTheme?: number | null;+ /** Date range for the query */+ dateRange?: DateRange | null;+ /** Exclude internal and test users by applying the respective filters */+ filterTestAccounts?: boolean | null;+ /** Granularity of the response. Can be one of `hour`, `day`, `week` or `month` */+ interval?: IntervalType | null;+ kind?: 'CalendarHeatmapQuery';+ /** Modifiers used when performing the query */+ modifiers?: HogQLQueryModifiers | null;+ /** Property filters for all series */+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | PropertyGroupFilter | null;+ response?: CalendarHeatmapResponse | null;+ /** Sampling rate */+ samplingFactor?: number | null;+ /** Events and actions to include */+ series: (EventsNode | ActionsNode | DataWarehouseNode)[];+ /** Tags that will be added to the Query log comment */+ tags?: QueryLogTags | null;+ /** version of the node, used for schema migrations */+ version?: number | null;}- export interface ErrorTrackingCorrelatedIssue {- assignee?: ErrorTrackingIssueAssignee | null;- cohort?: ErrorTrackingIssueCohort | null;- description?: string | null;- event: string;- external_issues?: ErrorTrackingExternalReference[] | null;- first_seen: string;- id: string;- last_seen: string;- library?: string | null;- name?: string | null;- odds_ratio: number;- population: Population;- status: ErrorTrackingIssueStatus;+ /**+ * * `error` - error+ * `warning` - warning+ */+ export type UtmIssueSeverityEnum = typeof UtmIssueSeverityEnum[keyof typeof UtmIssueSeverityEnum];+++ export const UtmIssueSeverityEnum = {+ Error: 'error',+ Warning: 'warning',+ } as const;++ export interface UtmIssue {+ /** The UTM field with the issue (e.g. utm_campaign, utm_source) */+ field: string;+ /** Issue severity level++ * `error` - error+ * `warning` - warning */+ severity: UtmIssueSeverityEnum;+ /** Human-readable description of the issue */+ message: string;}- export interface Response22 {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: ErrorTrackingCorrelatedIssue[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface CampaignAuditResult {+ /** Campaign name from the ad platform */+ campaign_name: string;+ /** Campaign ID from the ad platform */+ campaign_id: string;+ /** Integration source name (e.g. google, meta) */+ source_name: string;+ /** Total spend for this campaign in the period */+ spend: number;+ /** Total clicks for this campaign */+ clicks: number;+ /** Total impressions for this campaign */+ impressions: number;+ /** Whether matching UTM pageview events were found */+ has_utm_events: boolean;+ /** Number of matching UTM pageview events */+ event_count: number;+ /** List of detected UTM configuration issues */+ issues: UtmIssue[];}- export type Response23CredibleIntervals = {[key: string]: number[]};+ /**+ * Supporting evidence+ */+ export type CapabilityStateEvidence = { [key: string]: unknown };- export type Response23InsightItemItem = { [key: string]: unknown };+ /**+ * * `needs_setup` - needs_setup+ * `detected` - detected+ * `waiting_for_data` - waiting_for_data+ * `ready` - ready+ * `not_applicable` - not_applicable+ * `unknown` - unknown+ */+ export type CapabilityStateStateEnum = typeof CapabilityStateStateEnum[keyof typeof CapabilityStateStateEnum];- export type Response23Probability = {[key: string]: number};- export interface Response23 {- credible_intervals: Response23CredibleIntervals;- expected_loss: number;- funnels_query?: FunnelsQuery | null;- insight: Response23InsightItemItem[][];- kind?: 'ExperimentFunnelsQuery';- probability: Response23Probability;- significance_code: ExperimentSignificanceCode;- significant: boolean;- stats_version?: number | null;- variants: ExperimentVariantFunnelsBaseStats[];- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */- warnings?: DataWarehouseSyncWarning[] | null;+ export const CapabilityStateStateEnum = {+ NeedsSetup: 'needs_setup',+ Detected: 'detected',+ WaitingForData: 'waiting_for_data',+ Ready: 'ready',+ NotApplicable: 'not_applicable',+ Unknown: 'unknown',+ } as const;++ export interface CapabilityState {+ /** Current state of the capability++ * `needs_setup` - needs_setup+ * `detected` - detected+ * `waiting_for_data` - waiting_for_data+ * `ready` - ready+ * `not_applicable` - not_applicable+ * `unknown` - unknown */+ state: CapabilityStateStateEnum;+ /** Whether the state is estimated from static analysis */+ estimated: boolean;+ /** Human-readable explanation */+ reason: string;+ /** Supporting evidence */+ evidence?: CapabilityStateEvidence;}- export type Response24CredibleIntervals = {[key: string]: number[]};+ export interface CategoricalScoreOption {+ /**+ * Stable option key. Use lowercase letters, numbers, underscores, or hyphens.+ * @maxLength 128+ */+ key: string;+ /**+ * Human-readable option label.+ * @maxLength 256+ */+ label: string;+ }- export type Response24InsightItem = { [key: string]: unknown };+ /**+ * * `single` - single+ * `multiple` - multiple+ */+ export type SelectionModeEnum = typeof SelectionModeEnum[keyof typeof SelectionModeEnum];- export type Response24Probability = {[key: string]: number};- export interface Response24 {- count_query?: TrendsQuery | null;- credible_intervals: Response24CredibleIntervals;- exposure_query?: TrendsQuery | null;- insight: Response24InsightItem[];- kind?: 'ExperimentTrendsQuery';- p_value: number;- probability: Response24Probability;- significance_code: ExperimentSignificanceCode;- significant: boolean;- stats_version?: number | null;- variants: ExperimentVariantTrendsBaseStats[];- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ export const SelectionModeEnum = {+ Single: 'single',+ Multiple: 'multiple',+ } as const;- export type LLMTraceEventProperties = { [key: string]: unknown };+ export interface CategoricalScoreDefinitionConfig {+ /** Ordered categorical options available to the scorer. */+ options: CategoricalScoreOption[];+ /** Whether reviewers can select one option or multiple options. Defaults to `single`.- export interface LLMTraceEvent {- createdAt: string;- event: AIEventType | string;- id: string;- properties: LLMTraceEventProperties;+ * `single` - single+ * `multiple` - multiple */+ selection_mode?: SelectionModeEnum;+ /**+ * Optional minimum number of options that can be selected when `selection_mode` is `multiple`.+ * @minimum 1+ * @nullable+ */+ min_selections?: number | null;+ /**+ * Optional maximum number of options that can be selected when `selection_mode` is `multiple`.+ * @minimum 1+ * @nullable+ */+ max_selections?: number | null;}- export type LLMTracePersonProperties = { [key: string]: unknown };+ /**+ * * `marketing` - Marketing+ * `transactional` - Transactional+ */+ export type CategoryTypeEnum = typeof CategoryTypeEnum[keyof typeof CategoryTypeEnum];- export interface LLMTracePerson {- created_at: string;- distinct_id: string;- properties: LLMTracePersonProperties;- uuid: string;- }- export interface LLMTrace {- aiSessionId?: string | null;- createdAt: string;- distinctId: string;- errorCount?: number | null;- events: LLMTraceEvent[];- id: string;- inputCost?: number | null;- inputState?: unknown;- inputTokens?: number | null;- isSupportTrace?: boolean | null;- outputCost?: number | null;- outputState?: unknown;- outputTokens?: number | null;- person?: LLMTracePerson | null;- requestCost?: number | null;- tools?: string[] | null;- totalCost?: number | null;- totalLatency?: number | null;- traceName?: string | null;- webSearchCost?: number | null;- }+ export const CategoryTypeEnum = {+ Marketing: 'marketing',+ Transactional: 'transactional',+ } as const;- export interface Response25 {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: LLMTrace[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * * `consolidated` - consolidated+ * `cdc_only` - cdc_only+ * `both` - both+ */+ export type CdcTableModeEnum = typeof CdcTableModeEnum[keyof typeof CdcTableModeEnum];+++ export const CdcTableModeEnum = {+ Consolidated: 'consolidated',+ CdcOnly: 'cdc_only',+ Both: 'both',+ } as const;++ export type ChangeRequestApprovalsItem = { [key: string]: unknown };++ /**+ * * `valid` - Valid+ * `invalid` - Invalid+ * `expired` - Expired+ * `stale` - Stale (resource changed)+ */+ export type ValidationStatusEnum = typeof ValidationStatusEnum[keyof typeof ValidationStatusEnum];+++ export const ValidationStatusEnum = {+ Valid: 'valid',+ Invalid: 'invalid',+ Expired: 'expired',+ Stale: 'stale',+ } as const;++ /**+ * * `pending` - Pending+ * `approved` - Approved (awaiting application)+ * `applied` - Applied+ * `rejected` - Rejected+ * `expired` - Expired+ * `failed` - Failed to apply+ */+ export type ChangeRequestStateEnum = typeof ChangeRequestStateEnum[keyof typeof ChangeRequestStateEnum];+++ export const ChangeRequestStateEnum = {+ Pending: 'pending',+ Approved: 'approved',+ Applied: 'applied',+ Rejected: 'rejected',+ Expired: 'expired',+ Failed: 'failed',+ } as const;++ export interface ChangeRequest {+ readonly id: string;+ readonly action_key: string;+ readonly action_version: number;+ readonly resource_type: string;+ /** @nullable */+ readonly resource_id: string | null;+ readonly intent: unknown;+ readonly intent_display: unknown;+ readonly policy_snapshot: unknown;+ readonly validation_status: ValidationStatusEnum;+ readonly validation_errors: unknown;+ /** @nullable */+ readonly validated_at: string | null;+ readonly state: ChangeRequestStateEnum;+ readonly created_by: UserBasic;+ readonly applied_by: UserBasic;+ readonly created_at: string;+ /** @nullable */+ readonly updated_at: string | null;+ readonly expires_at: string;+ /** @nullable */+ readonly applied_at: string | null;+ readonly apply_error: string;+ readonly result_data: unknown;+ readonly approvals: readonly ChangeRequestApprovalsItem[];+ /** Check if current user can approve this change request. */+ readonly can_approve: boolean;+ readonly can_cancel: boolean;+ /** Check if current user is the requester. */+ readonly is_requester: boolean;+ /**+ * Get the current user's approval decision if they have voted.+ * @nullable+ */+ readonly user_decision: string | null;}- export interface Response26 {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * * `slack_channel_message` - Channel message+ * `slack_bot_mention` - Bot mention+ * `slack_emoji_reaction` - Emoji reaction+ * `teams_channel_message` - Teams channel message+ * `teams_bot_mention` - Teams bot mention+ * `widget_embedded` - Widget+ * `widget_api` - API+ * `github_issue` - GitHub issue+ */+ export type ChannelDetailEnum = typeof ChannelDetailEnum[keyof typeof ChannelDetailEnum];+++ export const ChannelDetailEnum = {+ SlackChannelMessage: 'slack_channel_message',+ SlackBotMention: 'slack_bot_mention',+ SlackEmojiReaction: 'slack_emoji_reaction',+ TeamsChannelMessage: 'teams_channel_message',+ TeamsBotMention: 'teams_bot_mention',+ WidgetEmbedded: 'widget_embedded',+ WidgetApi: 'widget_api',+ GithubIssue: 'github_issue',+ } as const;++ /**+ * * `widget` - Widget+ * `email` - Email+ * `slack` - Slack+ * `teams` - Microsoft Teams+ * `github` - GitHub+ */+ export type ChannelSourceEnum = typeof ChannelSourceEnum[keyof typeof ChannelSourceEnum];+++ export const ChannelSourceEnum = {+ Widget: 'widget',+ Email: 'email',+ Slack: 'slack',+ Teams: 'teams',+ Github: 'github',+ } as const;++ export interface CheckDatabaseNameResponse {+ name: string;+ available: boolean;}- export interface Response27 {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- kind?: 'AccountsQuery';- limit: number;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset: number;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ /**+ * * `claude` - claude+ */+ export type ClaudeRuntimeAdapterEnum = typeof ClaudeRuntimeAdapterEnum[keyof typeof ClaudeRuntimeAdapterEnum];- export type TaxonomicFilterGroupType = typeof TaxonomicFilterGroupType[keyof typeof TaxonomicFilterGroupType];+ export const ClaudeRuntimeAdapterEnum = {+ Claude: 'claude',+ } as const;- export const TaxonomicFilterGroupType = {- Metadata: 'metadata',- Actions: 'actions',- Cohorts: 'cohorts',- CohortsWithAll: 'cohorts_with_all',- DataWarehouse: 'data_warehouse',- DataWarehouseProperties: 'data_warehouse_properties',- DataWarehousePersonProperties: 'data_warehouse_person_properties',- Elements: 'elements',- Events: 'events',- InternalEvents: 'internal_events',- InternalEventProperties: 'internal_event_properties',- EventProperties: 'event_properties',- EventFeatureFlags: 'event_feature_flags',- EventMetadata: 'event_metadata',- NumericalEventProperties: 'numerical_event_properties',- PersonProperties: 'person_properties',- PageviewUrls: 'pageview_urls',- PageviewEvents: 'pageview_events',- Screens: 'screens',- ScreenEvents: 'screen_events',- EmailAddresses: 'email_addresses',- AutocaptureEvents: 'autocapture_events',- CustomEvents: 'custom_events',- Wildcard: 'wildcard',- Groups: 'groups',- Persons: 'persons',- FeatureFlags: 'feature_flags',- Insights: 'insights',- Experiments: 'experiments',- Plugins: 'plugins',- Dashboards: 'dashboards',- NameGroups: 'name_groups',- SessionProperties: 'session_properties',- HogqlExpression: 'hogql_expression',- Notebooks: 'notebooks',- LogEntries: 'log_entries',- ErrorTrackingIssues: 'error_tracking_issues',- Logs: 'logs',- LogAttributes: 'log_attributes',- LogResourceAttributes: 'log_resource_attributes',- Spans: 'spans',- SpanAttributes: 'span_attributes',- SpanResourceAttributes: 'span_resource_attributes',- Replay: 'replay',- ReplaySavedFilters: 'replay_saved_filters',- RevenueAnalyticsProperties: 'revenue_analytics_properties',- Resources: 'resources',- ErrorTrackingProperties: 'error_tracking_properties',- ActivityLogProperties: 'activity_log_properties',- MaxAiContext: 'max_ai_context',- WorkflowVariables: 'workflow_variables',- SuggestedFilters: 'suggested_filters',- RecentFilters: 'recent_filters',- PinnedFilters: 'pinned_filters',- Empty: 'empty',+ /**+ * * `interactive` - interactive+ * `background` - background+ */+ export type TaskExecutionModeEnum = typeof TaskExecutionModeEnum[keyof typeof TaskExecutionModeEnum];+++ export const TaskExecutionModeEnum = {+ Interactive: 'interactive',+ Background: 'background',} as const;- export type HrefMatching = typeof HrefMatching[keyof typeof HrefMatching];+ /**+ * * `user` - user+ * `bot` - bot+ */+ export type PrAuthorshipModeEnum = typeof PrAuthorshipModeEnum[keyof typeof PrAuthorshipModeEnum];- export const HrefMatching = {- Contains: 'contains',- Exact: 'exact',- Regex: 'regex',+ export const PrAuthorshipModeEnum = {+ User: 'user',+ Bot: 'bot',} as const;- export type TextMatching = typeof TextMatching[keyof typeof TextMatching];+ /**+ * * `manual` - manual+ * `signal_report` - signal_report+ */+ export type RunSourceEnum = typeof RunSourceEnum[keyof typeof RunSourceEnum];- export const TextMatching = {- Contains: 'contains',- Exact: 'exact',- Regex: 'regex',+ export const RunSourceEnum = {+ Manual: 'manual',+ SignalReport: 'signal_report',} as const;- export type UrlMatching = typeof UrlMatching[keyof typeof UrlMatching];+ /**+ * * `low` - low+ * `medium` - medium+ * `high` - high+ * `xhigh` - xhigh+ * `max` - max+ */+ export type ReasoningEffortEnum = typeof ReasoningEffortEnum[keyof typeof ReasoningEffortEnum];- export const UrlMatching = {- Contains: 'contains',- Exact: 'exact',- Regex: 'regex',+ export const ReasoningEffortEnum = {+ Low: 'low',+ Medium: 'medium',+ High: 'high',+ Xhigh: 'xhigh',+ Max: 'max',} as const;- export interface EventsQueryActionStep {- event?: string | null;- href?: string | null;- href_matching?: HrefMatching | null;- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- selector?: string | null;- tag_name?: string | null;- text?: string | null;- text_matching?: TextMatching | null;- url?: string | null;- url_matching?: UrlMatching | null;- }+ /**+ * * `default` - default+ * `acceptEdits` - acceptEdits+ * `plan` - plan+ * `bypassPermissions` - bypassPermissions+ * `auto` - auto+ */+ export type ClaudeTaskRunCreateSchemaInitialPermissionModeEnum = typeof ClaudeTaskRunCreateSchemaInitialPermissionModeEnum[keyof typeof ClaudeTaskRunCreateSchemaInitialPermissionModeEnum];- export interface EventsQueryResponse {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Cursor for fetching the next page of results */- nextCursor?: string | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }- export interface EventsQuery {- /** Show events matching a given action */- actionId?: number | null;- /** Show events matching action steps directly, used when no actionId is provided (e.g. previewing unsaved actions). Ignored if actionId is set. */- actionSteps?: EventsQueryActionStep[] | null;- /** Only fetch events that happened after this timestamp */- after?: string | null;- /** Only fetch events that happened before this timestamp */- before?: string | null;- /** Limit to events matching this string */- event?: string | null;- /** Filter to events matching any of these event names */- events?: string[] | null;- /** Filter test accounts */- filterTestAccounts?: boolean | null;- /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */- fixedProperties?: (PropertyGroupFilter | PropertyGroupFilterValue | EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- kind?: 'EventsQuery';- /** Number of rows to return */- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Number of rows to skip before returning rows */- offset?: number | null;- /** Columns to order by */- orderBy?: string[] | null;- /** Show events for a given person */- personId?: string | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: EventsQueryResponse | null;- /** Return a limited set of data. Required. */- select: string[];- /** source for querying events for insights */- source?: InsightActorsQuery | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;- /** HogQL filters to apply on returned data */- where?: string[] | null;- }+ export const ClaudeTaskRunCreateSchemaInitialPermissionModeEnum = {+ Default: 'default',+ AcceptEdits: 'acceptEdits',+ Plan: 'plan',+ BypassPermissions: 'bypassPermissions',+ Auto: 'auto',+ } as const;- export type PersonsNodeResponse = { [key: string]: unknown } | null;+ /**+ * Request body for creating a new task run+ */+ export interface ClaudeTaskRunCreateSchema {+ /** Execution mode: 'interactive' for user-connected runs, 'background' for autonomous runs- export interface PersonsNode {- cohort?: number | null;- distinctId?: string | null;- /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */- fixedProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- kind?: 'PersonsNode';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: PersonsNodeResponse;- search?: string | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;- }+ * `interactive` - interactive+ * `background` - background */+ mode?: TaskExecutionModeEnum;+ /**+ * Git branch to checkout in the sandbox+ * @maxLength 255+ * @nullable+ */+ branch?: string | null;+ /** ID of a previous run to resume from. Must belong to the same task. */+ resume_from_run_id?: string;+ /** Initial or follow-up user message to include in the run prompt. */+ pending_user_message?: string;+ /** Identifiers for staged task artifacts that should be attached to the initial run prompt. */+ pending_user_artifact_ids?: string[];+ /** Optional sandbox environment to apply for this cloud run. */+ sandbox_environment_id?: string;+ /** Whether pull requests for this run should be authored by the user or the bot.- export interface GroupsQueryResponse {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- kind?: 'GroupsQuery';- limit: number;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset: number;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ * `user` - user+ * `bot` - bot */+ pr_authorship_mode?: PrAuthorshipModeEnum;+ /** High-level source that triggered this run, used to distinguish manual and signal-based cloud runs.- export interface GroupsQuery {- group_type_index: number;- kind?: 'GroupsQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- orderBy?: string[] | null;- properties?: (GroupPropertyFilter | HogQLPropertyFilter)[] | null;- response?: GroupsQueryResponse | null;- search?: string | null;- select?: string[] | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;- }+ * `manual` - manual+ * `signal_report` - signal_report */+ run_source?: RunSourceEnum;+ /** Optional signal report identifier when this run was started from Inbox. */+ signal_report_id?: string;+ /** Agent runtime adapter to launch for this run. Must be 'claude' for Claude runtimes.- export interface WebExternalClicksTableQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ * `claude` - claude */+ runtime_adapter: ClaudeRuntimeAdapterEnum;+ /** LLM model identifier to run in the Claude runtime. */+ model: string;+ /** Reasoning effort to request for models that expose an effort control.++ * `low` - low+ * `medium` - medium+ * `high` - high+ * `xhigh` - xhigh+ * `max` - max */+ reasoning_effort?: ReasoningEffortEnum;+ /** Optional GitHub user token from PostHog Code for user-authored cloud pull requests. Prefer linking GitHub from Settings → Linked accounts so the server can manage tokens; this field remains supported for callers that still manage their own tokens. */+ github_user_token?: string;+ /** Initial permission mode for Claude runtimes.++ * `default` - default+ * `acceptEdits` - acceptEdits+ * `plan` - plan+ * `bypassPermissions` - bypassPermissions+ * `auto` - auto */+ initial_permission_mode?: ClaudeTaskRunCreateSchemaInitialPermissionModeEnum;}- export interface WebExternalClicksTableQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'WebExternalClicksTableQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: WebExternalClicksTableQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- stripQueryParams?: boolean | null;- tags?: QueryLogTags | null;- useSessionsTable?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export type ClickhouseEventProperties = { [key: string]: unknown };++ /**+ * @nullable+ */+ export type ClickhouseEventPerson = { [key: string]: unknown } | null;++ export interface EventElement {+ event: string;+ /**+ * @maxLength 10000+ * @nullable+ */+ text?: string | null;+ /**+ * @maxLength 1000+ * @nullable+ */+ tag_name?: string | null;+ /** @nullable */+ attr_class?: string[] | null;+ /**+ * @maxLength 10000+ * @nullable+ */+ href?: string | null;+ /**+ * @maxLength 10000+ * @nullable+ */+ attr_id?: string | null;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ nth_child?: number | null;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ nth_of_type?: number | null;+ attributes?: unknown;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ order?: number | null;}- export interface WebGoalsQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Whether the response was served from the lazy precompute path. */- usedLazyPrecompute?: boolean | null;- /** Whether the response was served from a precomputed table. */- usedPreAggregatedTables?: boolean | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface ClickhouseEvent {+ readonly id: string;+ readonly distinct_id: string;+ readonly properties: ClickhouseEventProperties;+ readonly event: string;+ readonly timestamp: string;+ /** @nullable */+ readonly person: ClickhouseEventPerson;+ readonly elements: readonly EventElement[];+ readonly elements_chain: string;}- export interface WebGoalsQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'WebGoalsQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: WebGoalsQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- tags?: QueryLogTags | null;- useSessionsTable?: boolean | null;- /** Opt this specific query into the web_goals_query precompute path. Requires the `web-analytics-precompute-toggle` PostHog feature flag to be on for the team's organization for the gate to pass. * */- useWebAnalyticsPrecompute?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface DiffCluster {+ x: number;+ y: number;+ width: number;+ height: number;+ pixel_count: number;+ centroid_x: number;+ centroid_y: number;}- export interface WebVitalsQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'WebVitalsQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: WebGoalsQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- source: TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | StickinessQuery | LifecycleQuery | WebStatsTableQuery | WebOverviewQuery;- tags?: QueryLogTags | null;- useSessionsTable?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface ClusterSummary {+ items: DiffCluster[];+ total: number;+ truncated: boolean;}- export type WebVitalsMetric = typeof WebVitalsMetric[keyof typeof WebVitalsMetric];+ /**+ * * `trace` - trace+ * `generation` - generation+ * `evaluation` - evaluation+ */+ export type ClusteringJobAnalysisLevelEnum = typeof ClusteringJobAnalysisLevelEnum[keyof typeof ClusteringJobAnalysisLevelEnum];- export const WebVitalsMetric = {- Inp: 'INP',- Lcp: 'LCP',- Cls: 'CLS',- Fcp: 'FCP',+ export const ClusteringJobAnalysisLevelEnum = {+ Trace: 'trace',+ Generation: 'generation',+ Evaluation: 'evaluation',} as const;- export type WebVitalsPercentile = typeof WebVitalsPercentile[keyof typeof WebVitalsPercentile];+ export interface ClusteringJob {+ readonly id: string;+ /** @maxLength 100 */+ name: string;+ analysis_level: ClusteringJobAnalysisLevelEnum;+ event_filters?: unknown;+ enabled?: boolean;+ readonly created_at: string;+ readonly updated_at: string;+ }++ /**+ * * `hdbscan` - hdbscan+ * `kmeans` - kmeans+ */+ export type ClusteringMethodEnum = typeof ClusteringMethodEnum[keyof typeof ClusteringMethodEnum];- export const WebVitalsPercentile = {- P75: 'p75',- P90: 'p90',- P99: 'p99',+ export const ClusteringMethodEnum = {+ Hdbscan: 'hdbscan',+ Kmeans: 'kmeans',} as const;- export interface WebVitalsPathBreakdownQueryResponse {- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;+ export type ClusteringRunRequestEventFiltersItem = { [key: string]: unknown };++ /**+ * * `none` - none+ * `l2` - l2+ */+ export type EmbeddingNormalizationEnum = typeof EmbeddingNormalizationEnum[keyof typeof EmbeddingNormalizationEnum];+++ export const EmbeddingNormalizationEnum = {+ None: 'none',+ L2: 'l2',+ } as const;++ /**+ * * `none` - none+ * `umap` - umap+ * `pca` - pca+ */+ export type DimensionalityReductionMethodEnum = typeof DimensionalityReductionMethodEnum[keyof typeof DimensionalityReductionMethodEnum];+++ export const DimensionalityReductionMethodEnum = {+ None: 'none',+ Umap: 'umap',+ Pca: 'pca',+ } as const;++ /**+ * * `umap` - umap+ * `pca` - pca+ * `tsne` - tsne+ */+ export type VisualizationMethodEnum = typeof VisualizationMethodEnum[keyof typeof VisualizationMethodEnum];+++ export const VisualizationMethodEnum = {+ Umap: 'umap',+ Pca: 'pca',+ Tsne: 'tsne',+ } as const;++ /**+ * Serializer for clustering workflow request parameters.+ */+ export interface ClusteringRunRequest {/**- * @minItems 1- * @maxItems 1+ * Number of days to look back for traces+ * @minimum 1+ * @maximum 90*/- results: WebVitalsPathBreakdownResult[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- usedLazyPrecompute?: boolean | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ lookback_days?: number;+ /**+ * Maximum number of traces to sample for clustering+ * @minimum 20+ * @maximum 10000+ */+ max_samples?: number;+ /** Embedding normalization method: 'none' (raw embeddings) or 'l2' (L2 normalize before clustering)- export interface WebVitalsPathBreakdownQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'WebVitalsPathBreakdownQuery';- metric: WebVitalsMetric;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;- percentile: WebVitalsPercentile;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: WebVitalsPathBreakdownQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- tags?: QueryLogTags | null;+ * `none` - none+ * `l2` - l2 */+ embedding_normalization?: EmbeddingNormalizationEnum;+ /** Dimensionality reduction method: 'none' (cluster on raw), 'umap', or 'pca'++ * `none` - none+ * `umap` - umap+ * `pca` - pca */+ dimensionality_reduction_method?: DimensionalityReductionMethodEnum;/**- * @minItems 2- * @maxItems 2+ * Target dimensions for dimensionality reduction (ignored if method is 'none')+ * @minimum 2+ * @maximum 500*/- thresholds: number[];- useSessionsTable?: boolean | null;- /** Opt this specific query into the web vitals path breakdown precompute path. Requires the `web-analytics-precompute-toggle` PostHog feature flag to be on for the team's organization for the gate to pass. * */- useWebAnalyticsPrecompute?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ dimensionality_reduction_ndims?: number;+ /** Clustering algorithm: 'hdbscan' (density-based, auto-determines k) or 'kmeans' (centroid-based)++ * `hdbscan` - hdbscan+ * `kmeans` - kmeans */+ clustering_method?: ClusteringMethodEnum;+ /**+ * Minimum cluster size as fraction of total samples (e.g., 0.02 = 2%)+ * @minimum 0.02+ * @maximum 0.5+ */+ min_cluster_size_fraction?: number;+ /**+ * HDBSCAN min_samples parameter (higher = more conservative clustering)+ * @minimum 1+ * @maximum 100+ */+ hdbscan_min_samples?: number;+ /**+ * Minimum number of clusters to try for k-means+ * @minimum 2+ * @maximum 50+ */+ kmeans_min_k?: number;+ /**+ * Maximum number of clusters to try for k-means+ * @minimum 2+ * @maximum 100+ */+ kmeans_max_k?: number;+ /**+ * Optional label/tag for the clustering run (used as suffix in run_id for tracking experiments)+ * @maxLength 50+ */+ run_label?: string;+ /** Method for 2D scatter plot visualization: 'umap', 'pca', or 'tsne'++ * `umap` - umap+ * `pca` - pca+ * `tsne` - tsne */+ visualization_method?: VisualizationMethodEnum;+ /** Property filters to scope which traces are included in clustering (PostHog standard format) */+ event_filters?: ClusteringRunRequestEventFiltersItem[];+ /**+ * If provided, use this clustering job's analysis_level and event_filters instead of request params+ * @nullable+ */+ clustering_job_id?: string | null;}- export interface Filters {- dateRange?: DateRange | null;- properties?: SessionPropertyFilter[] | null;+ export interface CodeInviteRedeemRequest {+ /** @maxLength 50 */+ code: string;}- export type SessionAttributionGroupBy = typeof SessionAttributionGroupBy[keyof typeof SessionAttributionGroupBy];+ /**+ * * `codex` - codex+ */+ export type CodexRuntimeAdapterEnum = typeof CodexRuntimeAdapterEnum[keyof typeof CodexRuntimeAdapterEnum];- export const SessionAttributionGroupBy = {- ChannelType: 'ChannelType',- Medium: 'Medium',- Source: 'Source',- Campaign: 'Campaign',- AdIds: 'AdIds',- ReferringDomain: 'ReferringDomain',- InitialURL: 'InitialURL',+ export const CodexRuntimeAdapterEnum = {+ Codex: 'codex',} as const;- export interface SessionAttributionExplorerQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * * `auto` - auto+ * `read-only` - read-only+ * `full-access` - full-access+ */+ export type CodexTaskRunCreateSchemaInitialPermissionModeEnum = typeof CodexTaskRunCreateSchemaInitialPermissionModeEnum[keyof typeof CodexTaskRunCreateSchemaInitialPermissionModeEnum];+++ export const CodexTaskRunCreateSchemaInitialPermissionModeEnum = {+ Auto: 'auto',+ ReadOnly: 'read-only',+ FullAccess: 'full-access',+ } as const;++ /**+ * Request body for creating a new task run+ */+ export interface CodexTaskRunCreateSchema {+ /** Execution mode: 'interactive' for user-connected runs, 'background' for autonomous runs++ * `interactive` - interactive+ * `background` - background */+ mode?: TaskExecutionModeEnum;+ /**+ * Git branch to checkout in the sandbox+ * @maxLength 255+ * @nullable+ */+ branch?: string | null;+ /** ID of a previous run to resume from. Must belong to the same task. */+ resume_from_run_id?: string;+ /** Initial or follow-up user message to include in the run prompt. */+ pending_user_message?: string;+ /** Identifiers for staged task artifacts that should be attached to the initial run prompt. */+ pending_user_artifact_ids?: string[];+ /** Optional sandbox environment to apply for this cloud run. */+ sandbox_environment_id?: string;+ /** Whether pull requests for this run should be authored by the user or the bot.++ * `user` - user+ * `bot` - bot */+ pr_authorship_mode?: PrAuthorshipModeEnum;+ /** High-level source that triggered this run, used to distinguish manual and signal-based cloud runs.++ * `manual` - manual+ * `signal_report` - signal_report */+ run_source?: RunSourceEnum;+ /** Optional signal report identifier when this run was started from Inbox. */+ signal_report_id?: string;+ /** Agent runtime adapter to launch for this run. Must be 'codex' for Codex runtimes.++ * `codex` - codex */+ runtime_adapter: CodexRuntimeAdapterEnum;+ /** LLM model identifier to run in the Codex runtime. */+ model: string;+ /** Reasoning effort to request for models that expose an effort control.++ * `low` - low+ * `medium` - medium+ * `high` - high+ * `xhigh` - xhigh+ * `max` - max */+ reasoning_effort?: ReasoningEffortEnum;+ /** Optional GitHub user token from PostHog Code for user-authored cloud pull requests. Prefer linking GitHub from Settings → Linked accounts so the server can manage tokens; this field remains supported for callers that still manage their own tokens. */+ github_user_token?: string;+ /** Initial permission mode for Codex runtimes.++ * `auto` - auto+ * `read-only` - read-only+ * `full-access` - full-access */+ initial_permission_mode?: CodexTaskRunCreateSchemaInitialPermissionModeEnum;}- export interface SessionAttributionExplorerQuery {- filters?: Filters | null;- groupBy: SessionAttributionGroupBy[];- kind?: 'SessionAttributionExplorerQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- response?: SessionAttributionExplorerQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export type PropertyGroupOperator = typeof PropertyGroupOperator[keyof typeof PropertyGroupOperator];+++ export const PropertyGroupOperator = {+ And: 'AND',+ Or: 'OR',+ } as const;++ export interface CohortFilter {+ bytecode?: unknown[] | null;+ bytecode_error?: string | null;+ conditionHash?: string | null;+ type: 'cohort';+ key: 'id';+ value: number;+ negation?: boolean;}- export interface SessionsQueryResponse {- columns: unknown[];- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql: string;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[][];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types: string[];- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface PersonFilter {+ bytecode?: unknown[] | null;+ bytecode_error?: string | null;+ conditionHash?: string | null;+ type: 'person';+ key: string;+ operator?: string | null;+ value?: unknown;+ negation?: boolean;+ }++ /**+ * AND/OR group containing cohort filters. Named to avoid collision with analytics Group model.+ */+ export interface CohortFilterGroup {+ type: PropertyGroupOperator;+ values: (BehavioralFilter | CohortFilter | PersonFilter | CohortFilterGroup)[];+ }++ export interface CohortFilters {+ properties: CohortFilterGroup;}- export interface SessionsQuery {- /** Filter sessions by action - sessions that contain events matching this action */- actionId?: number | null;- /** Only fetch sessions that started after this timestamp */- after?: string | null;- /** Only fetch sessions that started before this timestamp */- before?: string | null;- /** Filter sessions by event name - sessions that contain this event */- event?: string | null;- /** Event property filters - filters sessions that contain events matching these properties */- eventProperties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- /** Filter test accounts */- filterTestAccounts?: boolean | null;- /** Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person) */- fixedProperties?: (PropertyGroupFilter | PropertyGroupFilterValue | EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- kind?: 'SessionsQuery';- /** Number of rows to return */- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Number of rows to skip before returning rows */- offset?: number | null;- /** Columns to order by */- orderBy?: string[] | null;- /** Show sessions for a given person */- personId?: string | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: SessionsQueryResponse | null;- /** Return a limited set of data. Required. */- select: string[];- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;- /** HogQL filters to apply on returned data */- where?: string[] | null;+ /**+ * * `static` - static+ * `person_property` - person_property+ * `behavioral` - behavioral+ * `realtime` - realtime+ * `analytical` - analytical+ */+ export type CohortTypeEnum = typeof CohortTypeEnum[keyof typeof CohortTypeEnum];+++ export const CohortTypeEnum = {+ Static: 'static',+ PersonProperty: 'person_property',+ Behavioral: 'behavioral',+ Realtime: 'realtime',+ Analytical: 'analytical',+ } as const;++ export interface Cohort {+ readonly id: number;+ /**+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** @maxLength 1000 */+ description?: string;+ groups?: unknown;+ deleted?: boolean;+ filters?: CohortFilters | null;+ query?: unknown;+ /** @nullable */+ readonly version: number | null;+ /** @nullable */+ readonly pending_version: number | null;+ readonly is_calculating: boolean;+ readonly created_by: UserBasic;+ /** @nullable */+ readonly created_at: string | null;+ /** @nullable */+ readonly last_calculation: string | null;+ /** @nullable */+ readonly last_backfill_person_properties_at: string | null;+ readonly errors_calculating: number;+ /** @nullable */+ readonly last_error_message: string | null;+ /** @nullable */+ readonly count: number | null;+ is_static?: boolean;+ /** Type of cohort based on filter complexity++ * `static` - static+ * `person_property` - person_property+ * `behavioral` - behavioral+ * `realtime` - realtime+ * `analytical` - analytical */+ cohort_type?: CohortTypeEnum | BlankEnum | null;+ readonly experiment_set: readonly number[];+ _create_in_folder?: string;+ _create_static_person_ids?: string[];}- export interface RevenueAnalyticsBreakdown {- property: string;- type?: 'revenue_analytics';- }+ export type CohortPersonResultProperties = { [key: string]: unknown };- export type SimpleIntervalType = typeof SimpleIntervalType[keyof typeof SimpleIntervalType];+ export type CohortPersonResultMatchedRecordingsItem = { [key: string]: unknown };++ /**+ * * `person` - person+ */+ export type CohortPersonResultTypeEnum = typeof CohortPersonResultTypeEnum[keyof typeof CohortPersonResultTypeEnum];- export const SimpleIntervalType = {- Day: 'day',- Month: 'month',+ export const CohortPersonResultTypeEnum = {+ Person: 'person',} as const;- export interface RevenueAnalyticsGrossRevenueQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface CohortPersonResult {+ id: string;+ uuid: string;+ type: CohortPersonResultTypeEnum;+ name: string;+ distinct_ids: string[];+ properties: CohortPersonResultProperties;+ /** @nullable */+ created_at: string | null;+ /** @nullable */+ last_seen_at: string | null;+ /** @nullable */+ is_identified: boolean | null;+ matched_recordings: CohortPersonResultMatchedRecordingsItem[];+ /** @nullable */+ value_at_data_point: number | null;}- export interface RevenueAnalyticsGrossRevenueQuery {- breakdown: RevenueAnalyticsBreakdown[];- dateRange?: DateRange | null;- interval: SimpleIntervalType;- kind?: 'RevenueAnalyticsGrossRevenueQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- properties: RevenueAnalyticsPropertyFilter[];- response?: RevenueAnalyticsGrossRevenueQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CohortPersonsResponse {+ results: CohortPersonResult[];+ /** @nullable */+ next: string | null;+ /** @nullable */+ previous: string | null;}- export interface RevenueAnalyticsMetricsQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ /**+ * * `private` - Private (only visible to creator)+ * `shared` - Shared with team+ */+ export type VisibilityEnum = typeof VisibilityEnum[keyof typeof VisibilityEnum];- export interface RevenueAnalyticsMetricsQuery {- breakdown: RevenueAnalyticsBreakdown[];- dateRange?: DateRange | null;- interval: SimpleIntervalType;- kind?: 'RevenueAnalyticsMetricsQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- properties: RevenueAnalyticsPropertyFilter[];- response?: RevenueAnalyticsMetricsQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;++ export const VisibilityEnum = {+ Private: 'private',+ Shared: 'shared',+ } as const;++ export interface ColumnConfiguration {+ readonly id: string;+ /** @maxLength 255 */+ context_key: string;+ columns?: string[];+ /** @maxLength 255 */+ name?: string;+ filters?: unknown;+ /**+ * Ordered list of HogQL expressions describing the table sort. Null preserves the current sort on apply (legacy rows); an empty list explicitly means no sort.+ * @nullable+ */+ order_by?: string[] | null;+ visibility?: VisibilityEnum;+ /** @nullable */+ readonly created_by: number | null;+ readonly created_at: string;+ readonly updated_at: string;}- export interface RevenueAnalyticsMRRQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: RevenueAnalyticsMRRQueryResultItem[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface Comment {+ readonly id: string;+ readonly created_by: UserBasic;+ /** @nullable */+ deleted?: boolean | null;+ mentions?: number[];+ slug?: string;+ /** Whether this comment is an actionable task that can be marked complete. Tasks render with a checkbox in the UI and can be filtered as a separate kind. Cannot be set on replies (source_comment) or emoji reactions. Immutable after creation. */+ is_task?: boolean;+ /** The user who marked this task complete. Null for open tasks and non-task comments. */+ readonly completed_by: UserBasic | null;+ /** @nullable */+ content?: string | null;+ rich_content?: unknown;+ readonly version: number;+ readonly created_at: string;+ /**+ * @maxLength 72+ * @nullable+ */+ item_id?: string | null;+ item_context?: unknown;+ /** @maxLength 79 */+ scope: string;+ /**+ * ISO timestamp when the task was marked complete. Only meaningful when is_task is true. Read-only — toggled via the /complete and /reopen actions, not via PATCH.+ * @nullable+ */+ readonly completed_at: string | null;+ /** @nullable */+ source_comment?: string | null;}- export interface RevenueAnalyticsMRRQuery {- breakdown: RevenueAnalyticsBreakdown[];- dateRange?: DateRange | null;- interval: SimpleIntervalType;- kind?: 'RevenueAnalyticsMRRQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- properties: RevenueAnalyticsPropertyFilter[];- response?: RevenueAnalyticsMRRQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CompareItem {+ label: string;+ value: string;}- export interface RevenueAnalyticsOverviewQueryResponse {- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: RevenueAnalyticsOverviewItem[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface ComposeTicket {+ /** Recipient email address. */+ recipient_email: string;+ /**+ * PostHog distinct_id to link the ticket to a person. Falls back to recipient_email.+ * @maxLength 400+ */+ recipient_distinct_id?: string;+ /**+ * Email subject line.+ * @maxLength 500+ */+ email_subject?: string;+ /** ID of the EmailChannel to send from. */+ email_config_id: string;+ /**+ * Message content in markdown.+ * @maxLength 5000+ */+ message: string;+ /** TipTap rich content JSON for formatted messages. */+ rich_content?: unknown;}- export interface RevenueAnalyticsOverviewQuery {- dateRange?: DateRange | null;- kind?: 'RevenueAnalyticsOverviewQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- properties: RevenueAnalyticsPropertyFilter[];- response?: RevenueAnalyticsOverviewQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface ComposeTicketResponse {+ /** Created ticket UUID. */+ id: string;+ /** Human-readable ticket number. */+ ticket_number: number;}- export type RevenueAnalyticsTopCustomersGroupBy = typeof RevenueAnalyticsTopCustomersGroupBy[keyof typeof RevenueAnalyticsTopCustomersGroupBy];+ /**+ * * `won` - won+ * `lost` - lost+ * `inconclusive` - inconclusive+ * `stopped_early` - stopped_early+ * `invalid` - invalid+ */+ export type ConclusionEnum = typeof ConclusionEnum[keyof typeof ConclusionEnum];- export const RevenueAnalyticsTopCustomersGroupBy = {- Month: 'month',- All: 'all',+ export const ConclusionEnum = {+ Won: 'won',+ Lost: 'lost',+ Inconclusive: 'inconclusive',+ StoppedEarly: 'stopped_early',+ Invalid: 'invalid',} as const;- export interface RevenueAnalyticsTopCustomersQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * Response containing a JWT token for direct sandbox connection+ */+ export interface ConnectionTokenResponse {+ /** JWT token for authenticating with the sandbox */+ token: string;}- export interface RevenueAnalyticsTopCustomersQuery {- dateRange?: DateRange | null;- groupBy: RevenueAnalyticsTopCustomersGroupBy;- kind?: 'RevenueAnalyticsTopCustomersQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- properties: RevenueAnalyticsPropertyFilter[];- response?: RevenueAnalyticsTopCustomersQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;- }+ /**+ * * `utf-8` - utf-8+ * `base64` - base64+ */+ export type ContentEncodingEnum = typeof ContentEncodingEnum[keyof typeof ContentEncodingEnum];- export interface RevenueExampleEventsQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }- export interface RevenueExampleEventsQuery {- kind?: 'RevenueExampleEventsQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- response?: RevenueExampleEventsQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;- }+ export const ContentEncodingEnum = {+ Utf8: 'utf-8',+ Base64: 'base64',+ } as const;- export interface RevenueExampleDataWarehouseTablesQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export type ConversationMessagesItem = { [key: string]: unknown };++ export type ConversationPendingApprovalsItem = { [key: string]: unknown };++ /**+ * * `idle` - Idle+ * `in_progress` - In progress+ * `canceling` - Canceling+ */+ export type ConversationStatus = typeof ConversationStatus[keyof typeof ConversationStatus];+++ export const ConversationStatus = {+ Idle: 'idle',+ InProgress: 'in_progress',+ Canceling: 'canceling',+ } as const;++ /**+ * * `assistant` - Assistant+ * `tool_call` - Tool call+ * `deep_research` - Deep research+ * `slack` - Slack+ */+ export type ConversationType = typeof ConversationType[keyof typeof ConversationType];+++ export const ConversationType = {+ Assistant: 'assistant',+ ToolCall: 'tool_call',+ DeepResearch: 'deep_research',+ Slack: 'slack',+ } as const;++ export interface Conversation {+ readonly id: string;+ readonly status: ConversationStatus;+ /**+ * Title of the conversation.+ * @nullable+ */+ readonly title: string | null;+ readonly user: UserBasic;+ /** @nullable */+ readonly created_at: string | null;+ /** @nullable */+ readonly updated_at: string | null;+ readonly type: ConversationType;+ /**+ * Whether this conversation was created during an impersonated session (e.g., by support agents). Internal conversations are hidden from customers.+ * @nullable+ */+ readonly is_internal: boolean | null;+ /**+ * Unique key for Slack thread: '{workspace_id}:{channel}:{thread_ts}'+ * @nullable+ */+ readonly slack_thread_key: string | null;+ /**+ * Slack workspace subdomain (e.g. 'posthog' for posthog.slack.com)+ * @nullable+ */+ readonly slack_workspace_domain: string | null;+ readonly messages: readonly ConversationMessagesItem[];+ readonly has_unsupported_content: boolean;+ /** @nullable */+ readonly agent_mode: string | null;+ readonly is_sandbox: boolean;+ /** Return pending approval cards as structured data.++ Combines metadata from conversation.approval_decisions with payload from checkpoint+ interrupts (single source of truth for payload data). */+ readonly pending_approvals: readonly ConversationPendingApprovalsItem[];}- export interface RevenueExampleDataWarehouseTablesQuery {- kind?: 'RevenueExampleDataWarehouseTablesQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- response?: RevenueExampleDataWarehouseTablesQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface ConversationMinimal {+ readonly id: string;+ readonly status: ConversationStatus;+ /**+ * Title of the conversation.+ * @nullable+ */+ readonly title: string | null;+ readonly user: UserBasic;+ /** @nullable */+ readonly created_at: string | null;+ /** @nullable */+ readonly updated_at: string | null;+ readonly type: ConversationType;+ /**+ * Whether this conversation was created during an impersonated session (e.g., by support agents). Internal conversations are hidden from customers.+ * @nullable+ */+ readonly is_internal: boolean | null;+ /**+ * Unique key for Slack thread: '{workspace_id}:{channel}:{thread_ts}'+ * @nullable+ */+ readonly slack_thread_key: string | null;+ /**+ * Slack workspace subdomain (e.g. 'posthog' for posthog.slack.com)+ * @nullable+ */+ readonly slack_workspace_domain: string | null;}- export type MarketingAnalyticsDrillDownLevel = typeof MarketingAnalyticsDrillDownLevel[keyof typeof MarketingAnalyticsDrillDownLevel];+ /**+ * * `0` - Disabled+ * `1` - Stateless+ * `2` - Stateful+ */+ export type CookielessServerHashModeEnum = typeof CookielessServerHashModeEnum[keyof typeof CookielessServerHashModeEnum];- export const MarketingAnalyticsDrillDownLevel = {- Channel: 'channel',- Source: 'source',- Campaign: 'campaign',- AdGroup: 'ad_group',- Ad: 'ad',- Medium: 'medium',- Content: 'content',- Term: 'term',+ export const CookielessServerHashModeEnum = {+ Number0: 0,+ Number1: 1,+ Number2: 2,} as const;- export interface IntegrationFilter {- /** Selected integration source IDs to filter by (e.g., table IDs or source map IDs) */- integrationSourceIds?: string[] | null;+ export interface CopyDashboardTemplate {+ /** UUID of a team-scoped template in the same organization. Global and feature-flag templates cannot be copied with this endpoint. */+ source_template_id: string;}- export type MarketingAnalyticsOrderByEnum = typeof MarketingAnalyticsOrderByEnum[keyof typeof MarketingAnalyticsOrderByEnum];--- export const MarketingAnalyticsOrderByEnum = {- Asc: 'ASC',- Desc: 'DESC',- } as const;-- export interface MarketingAnalyticsTableQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: MarketingAnalyticsItem[][];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface CopyDashboardTileRequest {+ /** Dashboard id the tile currently belongs to. */+ fromDashboardId: number;+ /** Dashboard tile id to copy. */+ tileId: number;}- export interface MarketingAnalyticsTableQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- /** Compare to date range */- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- /** Draft conversion goal that can be set in the UI without saving */- draftConversionGoal?: ConversionGoalFilter1 | ConversionGoalFilter2 | ConversionGoalFilter3 | null;- /** Drill-down hierarchy level: channel, source, or campaign (default) */- drillDownLevel?: MarketingAnalyticsDrillDownLevel | null;- /** Filter test accounts */- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Filter by integration type */- integrationFilter?: IntegrationFilter | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'MarketingAnalyticsTableQuery';- /** Number of rows to return */- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Number of rows to skip before returning rows */- offset?: number | null;- /** Columns to order by - similar to EventsQuery format */- orderBy?: ((string | MarketingAnalyticsOrderByEnum)[])[] | null;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: MarketingAnalyticsTableQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- /** Return a limited set of data. Will use default columns if empty. */- select?: string[] | null;- tags?: QueryLogTags | null;- useSessionsTable?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CopyExperimentToProject {+ /** The team ID to copy the experiment to. */+ target_team_id: number;+ /** Optional feature flag key to use in the destination team. */+ feature_flag_key?: string;+ /** Optional name for the copied experiment. */+ name?: string;}- export type MarketingAnalyticsAggregatedQueryResponseResults = {[key: string]: MarketingAnalyticsItem};-- export interface MarketingAnalyticsAggregatedQueryResponse {- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- /** Generated HogQL query. */- hogql?: string | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: MarketingAnalyticsAggregatedQueryResponseResults;- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface CopyFlagsRequest {+ /** Key of the feature flag to copy */+ feature_flag_key: string;+ /** Source project ID to copy the flag from */+ from_project: number;+ /**+ * List of target project IDs to copy the flag to+ * @maxItems 50+ */+ target_project_ids: number[];+ /** Whether to also copy scheduled changes for this flag */+ copy_schedule?: boolean;+ /** Whether to force the copied flag to be disabled in target projects, ignoring the source flag's enabled status */+ disable_copied_flag?: boolean;}- export interface MarketingAnalyticsAggregatedQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- /** Draft conversion goal that can be set in the UI without saving */- draftConversionGoal?: ConversionGoalFilter1 | ConversionGoalFilter2 | ConversionGoalFilter3 | null;- /** Drill-down hierarchy level: channel, source, or campaign (default) */- drillDownLevel?: MarketingAnalyticsDrillDownLevel | null;- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Filter by integration IDs */- integrationFilter?: IntegrationFilter | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'MarketingAnalyticsAggregatedQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: MarketingAnalyticsAggregatedQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- /** Return a limited set of data. Will use default columns if empty. */- select?: string[] | null;- tags?: QueryLogTags | null;- useSessionsTable?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CopyFlagsSuccessItem {+ /** ID of the created feature flag */+ id: number;+ /** Key of the feature flag */+ key: string;+ /** Name of the feature flag */+ name: string;+ /** Whether the flag is active */+ active: boolean;+ /** Team ID the flag was copied to */+ team_id: number;}- export interface NonIntegratedConversionsTableQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: MarketingAnalyticsItem[][];- samplingRate?: SamplingRate | null;- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export interface CopyFlagsResult {+ /** Project ID (present on failure) */+ project_id?: number;+ /** Error message (present on failure) */+ error_message?: string;}- export interface NonIntegratedConversionsTableQuery {- /** Groups aggregation - not used in Web Analytics but required for type compatibility */- aggregation_group_type_index?: number | null;- /** Compare to date range */- compareFilter?: CompareFilter | null;- conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;- /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */- dataColorTheme?: number | null;- dateRange?: DateRange | null;- doPathCleaning?: boolean | null;- /** Draft conversion goal that can be set in the UI without saving */- draftConversionGoal?: ConversionGoalFilter1 | ConversionGoalFilter2 | ConversionGoalFilter3 | null;- /** Filter test accounts */- filterTestAccounts?: boolean | null;- includeRevenue?: boolean | null;- /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */- interval?: IntervalType | null;- kind?: 'NonIntegratedConversionsTableQuery';- /** Number of rows to return */- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Number of rows to skip before returning rows */- offset?: number | null;- /** Columns to order by */- orderBy?: ((string | MarketingAnalyticsOrderByEnum)[])[] | null;- properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];- response?: NonIntegratedConversionsTableQueryResponse | null;- sampling?: WebAnalyticsSampling | null;- /** Sampling rate */- samplingFactor?: number | null;- /** Return a limited set of data. Will use default columns if empty. */- select?: string[] | null;- tags?: QueryLogTags | null;- useSessionsTable?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CopyFlagsResponse {+ /** List of successfully copied flags */+ success: CopyFlagsSuccessItem[];+ /** List of failed copy attempts */+ failed: CopyFlagsResult[];}- export type ErrorTrackingOrderBy = typeof ErrorTrackingOrderBy[keyof typeof ErrorTrackingOrderBy];+ /**+ * * `acquisition` - Acquisition+ * `activation` - Activation+ * `monetization` - Monetization+ * `expansion` - Expansion+ * `referral` - Referral+ * `retention` - Retention+ * `churn` - Churn+ * `reactivation` - Reactivation+ */+ export type CoreEventCategoryEnum = typeof CoreEventCategoryEnum[keyof typeof CoreEventCategoryEnum];- export const ErrorTrackingOrderBy = {- LastSeen: 'last_seen',- FirstSeen: 'first_seen',- Occurrences: 'occurrences',- Users: 'users',- Sessions: 'sessions',+ export const CoreEventCategoryEnum = {+ Acquisition: 'acquisition',+ Activation: 'activation',+ Monetization: 'monetization',+ Expansion: 'expansion',+ Referral: 'referral',+ Retention: 'retention',+ Churn: 'churn',+ Reactivation: 'reactivation',} as const;- export type OrderDirection2 = typeof OrderDirection2[keyof typeof OrderDirection2];+ export interface CoreEvent {+ readonly id: string;+ /**+ * Display name for this core event+ * @maxLength 255+ */+ name: string;+ /** Optional description */+ description?: string;+ /** Lifecycle category for this core event+ * `acquisition` - Acquisition+ * `activation` - Activation+ * `monetization` - Monetization+ * `expansion` - Expansion+ * `referral` - Referral+ * `retention` - Retention+ * `churn` - Churn+ * `reactivation` - Reactivation */+ category: CoreEventCategoryEnum;+ /** Filter configuration - event, action, or data warehouse node */+ filter: unknown;+ readonly created_at: string;+ readonly updated_at: string;+ }- export const OrderDirection2 = {- Asc: 'ASC',- Desc: 'DESC',- } as const;+ /**+ * * `single` - Single page+ * `sitemap` - Sitemap+ * `same_origin` - Same origin crawl+ * `github_repo` - GitHub repository+ */+ export type CrawlModeEnum = typeof CrawlModeEnum[keyof typeof CrawlModeEnum];- export interface ErrorTrackingPendingFingerprintIssueStateUpdate {- assigned_role_id?: string | null;- assigned_user_id?: number | null;- fingerprint: string;- /** ISO 8601 datetime string. */- first_seen: string;- is_deleted: number;- issue_description?: string | null;- issue_id: string;- issue_name?: string | null;- issue_status: string;- /** Client-stamped monotonic version (`Date.now()` ms at mutation success). */- version: number;- }- export interface ErrorTrackingQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: ErrorTrackingIssue[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ export const CrawlModeEnum = {+ Single: 'single',+ Sitemap: 'sitemap',+ SameOrigin: 'same_origin',+ GithubRepo: 'github_repo',+ } as const;- export interface ErrorTrackingQuery {- assignee?: ErrorTrackingIssueAssignee | null;- /** Date range to filter results. */- dateRange: DateRange;- filterGroup?: PropertyGroupFilter | null;- /** Whether to filter out test accounts. */- filterTestAccounts?: boolean | null;- groupKey?: string | null;- groupTypeIndex?: number | null;- /** Filter to a specific error tracking issue by ID. */- issueId?: string | null;- kind?: 'ErrorTrackingQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Field to sort results by. */- orderBy: ErrorTrackingOrderBy;- /** Sort direction. */- orderDirection?: OrderDirection2 | null;- /** Pending fingerprint issue state updates UNIONed into the fingerprint issue state subquery (V3 only). The backend caps the list at 50 entries; extras are dropped silently. */- pendingFingerprintIssueStateUpdates?: ErrorTrackingPendingFingerprintIssueStateUpdate[] | null;- personId?: string | null;- response?: ErrorTrackingQueryResponse | null;- /** Free-text search across exception type, message, and stack frames. */- searchQuery?: string | null;- /** Filter by issue status. */- status?: ErrorTrackingIssueStatus | string | null;- tags?: QueryLogTags | null;- /** Use V2 query path (ClickHouse postgres connector join instead of separate Postgres queries) */- useQueryV2?: boolean | null;- /** Use V3 query path (denormalized ClickHouse table, no Postgres joins) */- useQueryV3?: boolean | null;- /** version of the node, used for schema migrations */- version?: number | null;- volumeResolution: number;- withAggregations?: boolean | null;- withFirstEvent?: boolean | null;- withLastEvent?: boolean | null;- }+ /**+ * Typed configuration for a FileDownload batch-export destination.+ */+ export interface FileDownloadDestinationFileConfig {+ /** File format- export interface ErrorTrackingIssueCorrelationQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: ErrorTrackingCorrelatedIssue[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;- }+ * `Parquet` - Parquet+ * `JSONLines` - JSONLines */+ format?: FileFormatEnum;+ /** Compress the file with a supported compression format- export interface ErrorTrackingIssueCorrelationQuery {- events: string[];- kind?: 'ErrorTrackingIssueCorrelationQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- response?: ErrorTrackingIssueCorrelationQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ * `zstd` - zstd+ * `gzip` - gzip+ * `brotli` - brotli+ * `lz4` - lz4+ * `snappy` - snappy */+ compression?: CompressionEnum | null;+ /**+ * Split download into multiple files of at most this size in MB+ * @minimum 0+ * @nullable+ */+ max_size_mb?: number | null;}- export type ExperimentFunnelsQueryResponseCredibleIntervals = {[key: string]: number[]};+ export type FileDownloadEventsRequestModel = typeof FileDownloadEventsRequestModel[keyof typeof FileDownloadEventsRequestModel];- export type ExperimentFunnelsQueryResponseInsightItemItem = { [key: string]: unknown };- export type ExperimentFunnelsQueryResponseProbability = {[key: string]: number};+ export const FileDownloadEventsRequestModel = {+ Events: 'events',+ } as const;- export interface ExperimentFunnelsQueryResponse {- credible_intervals: ExperimentFunnelsQueryResponseCredibleIntervals;- expected_loss: number;- funnels_query?: FunnelsQuery | null;- insight: ExperimentFunnelsQueryResponseInsightItemItem[][];- kind?: 'ExperimentFunnelsQuery';- probability: ExperimentFunnelsQueryResponseProbability;- significance_code: ExperimentSignificanceCode;- significant: boolean;- stats_version?: number | null;- variants: ExperimentVariantFunnelsBaseStats[];- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * Typed configuration for the events model.+ */+ export interface FileDownloadEventsRequest {+ file: FileDownloadDestinationFileConfig;+ model: FileDownloadEventsRequestModel;+ include?: string[];+ exclude?: string[];+ data_interval_start: string;+ data_interval_end: string;}- export interface ExperimentFunnelsQuery {- experiment_id?: number | null;- fingerprint?: string | null;- funnels_query: FunnelsQuery;- kind?: 'ExperimentFunnelsQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- name?: string | null;- response?: ExperimentFunnelsQueryResponse | null;- tags?: QueryLogTags | null;- uuid?: string | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export type FileDownloadPersonsRequestModel = typeof FileDownloadPersonsRequestModel[keyof typeof FileDownloadPersonsRequestModel];+++ export const FileDownloadPersonsRequestModel = {+ Persons: 'persons',+ } as const;++ /**+ * Typed configuration for the persons model.+ */+ export interface FileDownloadPersonsRequest {+ file: FileDownloadDestinationFileConfig;+ model: FileDownloadPersonsRequestModel;+ data_interval_start: string;+ data_interval_end: string;}- export type ExperimentTrendsQueryResponseCredibleIntervals = {[key: string]: number[]};+ export type FileDownloadSessionsRequestModel = typeof FileDownloadSessionsRequestModel[keyof typeof FileDownloadSessionsRequestModel];- export type ExperimentTrendsQueryResponseInsightItem = { [key: string]: unknown };- export type ExperimentTrendsQueryResponseProbability = {[key: string]: number};+ export const FileDownloadSessionsRequestModel = {+ Sessions: 'sessions',+ } as const;- export interface ExperimentTrendsQueryResponse {- count_query?: TrendsQuery | null;- credible_intervals: ExperimentTrendsQueryResponseCredibleIntervals;- exposure_query?: TrendsQuery | null;- insight: ExperimentTrendsQueryResponseInsightItem[];- kind?: 'ExperimentTrendsQuery';- p_value: number;- probability: ExperimentTrendsQueryResponseProbability;- significance_code: ExperimentSignificanceCode;- significant: boolean;- stats_version?: number | null;- variants: ExperimentVariantTrendsBaseStats[];- /** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * Typed configuration for the sessions model.+ */+ export interface FileDownloadSessionsRequest {+ file: FileDownloadDestinationFileConfig;+ model: FileDownloadSessionsRequestModel;+ data_interval_start: string;+ data_interval_end: string;}- export interface ExperimentTrendsQuery {- count_query: TrendsQuery;- experiment_id?: number | null;- exposure_query?: TrendsQuery | null;- fingerprint?: string | null;- kind?: 'ExperimentTrendsQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- name?: string | null;- response?: ExperimentTrendsQueryResponse | null;- tags?: QueryLogTags | null;- uuid?: string | null;- /** version of the node, used for schema migrations */- version?: number | null;- }+ export type CreateFileDownloadRequest = FileDownloadEventsRequest | FileDownloadPersonsRequest | FileDownloadSessionsRequest;- export interface TracesQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: LLMTrace[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * * `cost` - cost+ * `latency` - latency+ * `eval_pass_rate` - eval_pass_rate+ */+ export type TemplatesEnum = typeof TemplatesEnum[keyof typeof TemplatesEnum];+++ export const TemplatesEnum = {+ Cost: 'cost',+ Latency: 'latency',+ EvalPassRate: 'eval_pass_rate',+ } as const;++ export interface CreateFromPromptInput {+ /** The name of the LLM prompt to experiment on. Must already exist for this team. */+ prompt_name: string;+ /**+ * Ordered list of prompt version numbers to assign to experiment variants. The first entry is the control variant. Must contain between 2 and 10 distinct versions.+ * @minItems 2+ * @maxItems 10+ */+ versions: number[];+ /**+ * One or more metric templates to attach as primary metrics. Each template becomes one metric on the experiment. Allowed values: cost, latency, eval_pass_rate.+ * @minItems 1+ * @maxItems 3+ */+ templates: TemplatesEnum[];+ /** Optional experiment name. If omitted, a name is generated from the prompt and versions. */+ name?: string;+ /** Optional feature flag key. If omitted, a slug is derived from the experiment name. */+ feature_flag_key?: string;+ /** Optional experiment description. */+ description?: string;}- export interface TracesQuery {- dateRange?: DateRange | null;- filterSupportTraces?: boolean | null;- filterTestAccounts?: boolean | null;- groupKey?: string | null;- groupTypeIndex?: number | null;- kind?: 'TracesQuery';- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Person who performed the event */- personId?: string | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- /** Use random ordering instead of timestamp DESC. Useful for representative sampling to avoid recency bias. */- randomOrder?: boolean | null;- response?: TracesQueryResponse | null;- showColumnConfigurator?: boolean | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CreateGroup {+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ */+ group_type_index: number;+ /** @maxLength 400 */+ group_key: string;+ group_properties?: unknown;}- export interface TraceQueryResponse {- columns?: string[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: LLMTrace[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ /**+ * * `BAA` - BAA+ * `DPA` - DPA+ */+ export type CreateLegalDocumentDocumentTypeEnum = typeof CreateLegalDocumentDocumentTypeEnum[keyof typeof CreateLegalDocumentDocumentTypeEnum];+++ export const CreateLegalDocumentDocumentTypeEnum = {+ Baa: 'BAA',+ Dpa: 'DPA',+ } as const;++ /**+ * Input serializer for POST. Mirrors the submittable fields on the model plus+ cross-field rules (BAA addon, DPA mode, uniqueness). The view supplies the+ organization and submitting user.+ */+ export interface CreateLegalDocument {+ /** Either 'BAA' or 'DPA'.++ * `BAA` - BAA+ * `DPA` - DPA */+ document_type: CreateLegalDocumentDocumentTypeEnum;+ /**+ * The customer legal entity entering the agreement (PandaDoc's Client.Company).+ * @maxLength 255+ */+ company_name: string;+ /**+ * The customer address (PandaDoc's Client.StreetAddress).+ * @maxLength 512+ */+ company_address: string;+ /** Email the signed PandaDoc envelope is sent to (PandaDoc's Client.Email). */+ representative_email: string;}- export interface TraceQuery {- dateRange?: DateRange | null;- kind?: 'TraceQuery';- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- /** Properties configurable in the interface */- properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;- response?: TraceQueryResponse | null;- tags?: QueryLogTags | null;- traceId: string;- /** version of the node, used for schema migrations */- version?: number | null;+ /**+ * Typed output for view set `create`.+ */+ export interface CreateOutput {+ id: string;}- export type EndpointsUsageBreakdown = typeof EndpointsUsageBreakdown[keyof typeof EndpointsUsageBreakdown];+ /**+ * * `zoom` - zoom+ * `teams` - teams+ * `meet` - meet+ * `desktop_audio` - desktop_audio+ * `slack` - slack+ */+ export type CreateRecordingRequestPlatformEnum = typeof CreateRecordingRequestPlatformEnum[keyof typeof CreateRecordingRequestPlatformEnum];- export const EndpointsUsageBreakdown = {- Endpoint: 'Endpoint',- MaterializationType: 'MaterializationType',- ApiKey: 'ApiKey',- Status: 'Status',+ export const CreateRecordingRequestPlatformEnum = {+ Zoom: 'zoom',+ Teams: 'teams',+ Meet: 'meet',+ DesktopAudio: 'desktop_audio',+ Slack: 'slack',} as const;- export type MaterializationType = typeof MaterializationType[keyof typeof MaterializationType];+ /**+ * Request body for creating a new recording+ */+ export interface CreateRecordingRequest {+ /** Meeting platform being recorded+ * `zoom` - zoom+ * `teams` - teams+ * `meet` - meet+ * `desktop_audio` - desktop_audio+ * `slack` - slack */+ platform?: CreateRecordingRequestPlatformEnum;+ }- export const MaterializationType = {- Materialized: 'materialized',- Inline: 'inline',+ /**+ * * `zoom` - Zoom+ * `teams` - Microsoft Teams+ * `meet` - Google Meet+ * `desktop_audio` - Desktop audio+ * `slack` - Slack huddle+ */+ export type MeetingPlatformEnum = typeof MeetingPlatformEnum[keyof typeof MeetingPlatformEnum];+++ export const MeetingPlatformEnum = {+ Zoom: 'zoom',+ Teams: 'teams',+ Meet: 'meet',+ DesktopAudio: 'desktop_audio',+ Slack: 'slack',} as const;- export type EndpointsUsageOrderByField = typeof EndpointsUsageOrderByField[keyof typeof EndpointsUsageOrderByField];+ /**+ * * `recording` - Recording+ * `uploading` - Uploading+ * `processing` - Processing+ * `ready` - Ready+ * `error` - Error+ */+ export type DesktopRecordingStatusEnum = typeof DesktopRecordingStatusEnum[keyof typeof DesktopRecordingStatusEnum];- export const EndpointsUsageOrderByField = {- Requests: 'requests',- BytesRead: 'bytes_read',- CpuSeconds: 'cpu_seconds',- AvgQueryDurationMs: 'avg_query_duration_ms',- ErrorRate: 'error_rate',+ export const DesktopRecordingStatusEnum = {+ Recording: 'recording',+ Uploading: 'uploading',+ Processing: 'processing',+ Ready: 'ready',+ Error: 'error',} as const;- export type EndpointsUsageOrderByDirection = typeof EndpointsUsageOrderByDirection[keyof typeof EndpointsUsageOrderByDirection];+ /**+ * Serializer for extracted tasks+ */+ export interface DesktopRecordingTask {+ title: string;+ description?: string;+ /** @nullable */+ assignee?: string | null;+ }++ /**+ * Response for creating a new recording (includes upload_token)+ */+ export interface CreateRecordingResponse {+ readonly id: string;+ readonly team: number;+ /** @nullable */+ readonly created_by: number | null;+ readonly sdk_upload_id: string;+ /** @nullable */+ recall_recording_id?: string | null;+ platform: MeetingPlatformEnum;+ /**+ * @maxLength 255+ * @nullable+ */+ meeting_title?: string | null;+ /**+ * @maxLength 200+ * @nullable+ */+ meeting_url?: string | null;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ duration_seconds?: number | null;+ status?: DesktopRecordingStatusEnum;+ /** @nullable */+ notes?: string | null;+ /** @nullable */+ error_message?: string | null;+ /**+ * @maxLength 200+ * @nullable+ */+ video_url?: string | null;+ /**+ * @minimum -2147483648+ * @maximum 2147483647+ * @nullable+ */+ video_size_bytes?: number | null;+ /** List of participant names */+ participants?: string[];+ readonly transcript_text: string;+ /** Transcript segments with timestamps */+ transcript_segments?: TranscriptSegment[];+ /** @nullable */+ summary?: string | null;+ /** AI-extracted tasks from transcript */+ extracted_tasks?: DesktopRecordingTask[];+ /** @nullable */+ tasks_generated_at?: string | null;+ /** @nullable */+ summary_generated_at?: string | null;+ started_at?: string;+ /** @nullable */+ completed_at?: string | null;+ readonly created_at: string;+ readonly updated_at: string;+ /** Recall.ai upload token for the desktop SDK */+ upload_token: string;+ }+ export interface CreateRepoInput {+ repo_full_name: string;+ /** @nullable */+ repo_external_id?: number | null;+ }- export const EndpointsUsageOrderByDirection = {- Asc: 'ASC',- Desc: 'DESC',- } as const;+ export type CreateRunInputBaselineHashes = {[key: string]: string};- export interface EndpointsUsageTableQueryResponse {- columns?: unknown[] | null;- /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */- error?: string | null;- hasMore?: boolean | null;- /** Generated HogQL query. */- hogql?: string | null;- limit?: number | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- /** Query status indicates whether next to the provided data, a query is still running. */- query_status?: QueryStatus | null;- /** The date range used for the query */- resolved_date_range?: ResolvedDateRangeResponse | null;- results: unknown[];- /** Measured timings for different parts of the query generation process */- timings?: QueryTiming[] | null;- types?: unknown[] | null;- /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. */- warnings?: DataWarehouseSyncWarning[] | null;+ export type CreateRunInputMetadata = { [key: string]: unknown };++ export interface CreateRunInput {+ repo_id: string;+ run_type: string;+ commit_sha: string;+ branch: string;+ snapshots: SnapshotManifestItem[];+ /** @nullable */+ pr_number?: number | null;+ baseline_hashes?: CreateRunInputBaselineHashes;+ unchanged_count?: number;+ removed_identifiers?: string[];+ purpose?: string;+ metadata?: CreateRunInputMetadata;}- export interface EndpointsUsageTableQuery {- breakdownBy: EndpointsUsageBreakdown;- dateRange?: DateRange | null;- /** Filter to specific endpoints by name */- endpointNames?: string[] | null;- kind?: 'EndpointsUsageTableQuery';- limit?: number | null;- /** Filter by materialization type */- materializationType?: MaterializationType | null;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- offset?: number | null;- orderBy?: (EndpointsUsageOrderByField | EndpointsUsageOrderByDirection)[] | null;- response?: EndpointsUsageTableQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CreateRunResult {+ run_id: string;+ uploads: UploadTarget[];}- export type DataTableNodeResponse = { [key: string]: unknown } | Response | Response1 | Response2 | Response3 | Response4 | Response5 | Response6 | Response7 | Response8 | Response9 | Response10 | Response11 | Response12 | Response13 | Response14 | Response15 | Response16 | Response18 | Response19 | Response20 | Response21 | Response22 | Response23 | Response24 | Response25 | Response26 | Response27 | null;+ export interface CreateTextSource {+ /**+ * Short human label for the source. Shown in the settings list and in agent citations.+ * @maxLength 255+ */+ name: string;+ /** Raw text to index. Capped at 1 MB; larger payloads should be split into multiple sources or wait for URL/file support in Stage 2/3. */+ text: string;+ }- export interface DataTableNode {- /** Can the user click on column headers to sort the table? (default: true) */- allowSorting?: boolean | null;- /** Columns shown in the table, unless the `source` provides them. */- columns?: string[] | null;- /** Context for the table, used by components like ColumnConfigurator */- context?: DataTableNodeViewPropsContext | null;- /** Context key for universal column configuration (e.g., "survey:123") */- contextKey?: string | null;- /** Default columns to use when resetting column configuration */- defaultColumns?: string[] | null;- /** Uses the embedded version of LemonTable */- embedded?: boolean | null;- /** Can expand row to show raw event data (default: true) */- expandable?: boolean | null;- /** Show with most visual options enabled. Used in scenes. */- full?: boolean | null;- /** Columns that aren't shown in the table, even if in columns or returned data */- hiddenColumns?: string[] | null;- kind: DataTableNodeKind;- /** Columns that are sticky when scrolling horizontally */- pinnedColumns?: string[] | null;- /** Link properties via the URL (default: false) */- propertiesViaUrl?: boolean | null;- response?: DataTableNodeResponse;- /** Render date-time columns (timestamp, created_at, last_seen, last_seen_at, session_start, session_end) as absolute date+time instead of relative ("X ago"). The toggle is exposed in the column header menu only on EventsQuery / ActorsQuery sources. */- showAbsoluteTime?: boolean | null;- /** Show the kebab menu at the end of the row */- showActions?: boolean | null;- /** Show a button to configure the table's columns if possible */- showColumnConfigurator?: boolean | null;- /** Show count of total and filtered results */- showCount?: boolean | null;- /** Show date range selector */- showDateRange?: boolean | null;- /** Show the time it takes to run a query */- showElapsedTime?: boolean | null;- /** Include an event filter above the table (EventsNode only) */- showEventFilter?: boolean | null;- /** Include an events filter above the table to filter by multiple events (EventsQuery only) */- showEventsFilter?: boolean | null;- /** Show the export button */- showExport?: boolean | null;- /** Include a HogQL query editor above HogQL tables */- showHogQLEditor?: boolean | null;- /** Show a button to open the current query as a new insight. (default: true) */- showOpenEditorButton?: boolean | null;- /** Show a button to configure and persist the table's default columns if possible */- showPersistentColumnConfigurator?: boolean | null;- /** Include a property filter above the table */- showPropertyFilter?: boolean | TaxonomicFilterGroupType[] | null;- /** Show a recording column for events with session recordings */- showRecordingColumn?: boolean | null;- /** Show a reload button */- showReload?: boolean | null;- /** Show a results table */- showResultsTable?: boolean | null;- /** Show saved filters feature for this table (requires uniqueKey) */- showSavedFilters?: boolean | null;- /** Shows a list of saved queries */- showSavedQueries?: boolean | null;- /** Include a free text search field (PersonsNode only) */- showSearch?: boolean | null;- /** Show actors query options and back to source */- showSourceQueryOptions?: boolean | null;- /** Show table views feature for this table (requires uniqueKey) */- showTableViews?: boolean | null;- /** Show filter to exclude test accounts */- showTestAccountFilters?: boolean | null;- /** Show a detailed query timing breakdown */- showTimings?: boolean | null;- /** Source of the events */- source: EventsNode | EventsQuery | PersonsNode | ActorsQuery | GroupsQuery | HogQLQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | SessionAttributionExplorerQuery | SessionsQuery | RevenueAnalyticsGrossRevenueQuery | RevenueAnalyticsMetricsQuery | RevenueAnalyticsMRRQuery | RevenueAnalyticsOverviewQuery | RevenueAnalyticsTopCustomersQuery | RevenueExampleEventsQuery | RevenueExampleDataWarehouseTablesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | NonIntegratedConversionsTableQuery | ErrorTrackingQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | TracesQuery | TraceQuery | EndpointsUsageTableQuery | AccountsQuery;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CreateTextTileRequest {+ /**+ * Markdown body for the text tile. Supports headings, lists, and inline formatting. Useful as a dashboard section heading, divider, or annotation between insights. Max 4000 characters.+ * @minLength 1+ * @maxLength 4000+ */+ body: string;+ /** Optional grid layout per breakpoint. If omitted, the tile is placed at the bottom of the dashboard using the default size. Text tiles typically use a thin full-width banner (e.g. w=12, h=1). */+ layouts?: TileLayouts;+ /**+ * Optional accent color name (e.g. 'blue', 'green', 'purple', 'black').+ * @maxLength 400+ * @nullable+ */+ color?: string | null;}- export type DataVisualizationNodeKind = typeof DataVisualizationNodeKind[keyof typeof DataVisualizationNodeKind];+ /**+ * * `web` - web+ * `api` - api+ * `mcp` - mcp+ */+ export type CreatedViaEnum = typeof CreatedViaEnum[keyof typeof CreatedViaEnum];- export const DataVisualizationNodeKind = {- DataVisualizationNode: 'DataVisualizationNode',+ export const CreatedViaEnum = {+ Web: 'web',+ Api: 'api',+ Mcp: 'mcp',} as const;- export interface TableSettings {- columns?: ChartAxis[] | null;- conditionalFormatting?: ConditionalFormattingRule[] | null;- pinnedColumns?: string[] | null;- transpose?: boolean | null;+ /**+ * * `default` - Default+ * `template` - Template+ * `duplicate` - Duplicate+ * `unlisted` - Unlisted (product-embedded)+ */+ export type CreationModeEnum = typeof CreationModeEnum[keyof typeof CreationModeEnum];+++ export const CreationModeEnum = {+ Default: 'default',+ Template: 'template',+ Duplicate: 'duplicate',+ Unlisted: 'unlisted',+ } as const;++ export interface Credential {+ readonly id: string;+ readonly created_by: UserBasic;+ readonly created_at: string;+ /** @maxLength 500 */+ access_key: string;+ /** @maxLength 500 */+ access_secret: string;}- export interface DataVisualizationNode {- chartSettings?: ChartSettings | null;- display?: ChartDisplayType | null;- kind: DataVisualizationNodeKind;- source: HogQLQuery;- tableSettings?: TableSettings | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface CustomerJourney {+ readonly id: string;+ insight: number;+ /** @maxLength 400 */+ name: string;+ /** @nullable */+ description?: string | null;+ readonly created_at: string;+ /** @nullable */+ readonly created_by: number | null;+ /** @nullable */+ readonly updated_at: string | null;}- export type HogQueryKind = typeof HogQueryKind[keyof typeof HogQueryKind];+ /**+ * * `person` - Person+ * `group_0` - Group 0+ * `group_1` - Group 1+ * `group_2` - Group 2+ * `group_3` - Group 3+ * `group_4` - Group 4+ */+ export type CustomerProfileConfigScopeEnum = typeof CustomerProfileConfigScopeEnum[keyof typeof CustomerProfileConfigScopeEnum];- export const HogQueryKind = {- HogQuery: 'HogQuery',+ export const CustomerProfileConfigScopeEnum = {+ Person: 'person',+ Group0: 'group_0',+ Group1: 'group_1',+ Group2: 'group_2',+ Group3: 'group_3',+ Group4: 'group_4',} as const;- export interface HogQueryResponse {- bytecode?: unknown[] | null;- coloredBytecode?: unknown[] | null;- results: unknown;- stdout?: string | null;+ export interface CustomerProfileConfig {+ readonly id: string;+ scope: CustomerProfileConfigScopeEnum;+ content?: unknown;+ sidebar?: unknown;+ readonly created_at: string;+ /** @nullable */+ readonly updated_at: string | null;}- export interface HogQuery {- code?: string | null;- kind: HogQueryKind;- /** Modifiers used when performing the query */- modifiers?: HogQLQueryModifiers | null;- response?: HogQueryResponse | null;- tags?: QueryLogTags | null;- /** version of the node, used for schema migrations */- version?: number | null;+ export interface Dag {+ readonly id: string;+ /**+ * Human-readable name for this DAG+ * @maxLength 2048+ */+ name: string;+ /** Optional description of the DAG's purpose */+ description?: string;+ /**+ * Sync frequency string (e.g. '24hour', '7day')+ * @nullable+ */+ sync_frequency?: string | null;+ readonly node_count: number;+ readonly created_at: string;+ /** @nullable */+ readonly updated_at: string | null;}+ export type DashboardFilters = { [key: string]: unknown };+/**- * The query definition for this insight. The `kind` field determines the query type:- - `InsightVizNode` — product analytics (trends, funnels, retention, paths, stickiness, lifecycle)- - `DataVisualizationNode` — SQL insights using HogQL- - `DataTableNode` — raw data tables- - `HogQuery` — Hog language queries+ * @nullable*/- export type _InsightQuerySchema = InsightVizNode | DataTableNode | DataVisualizationNode | HogQuery;+ export type DashboardVariables = { [key: string]: unknown } | null;/*** @nullable*/- export type InsightResolvedDateRange = {- readonly date_from?: string;- readonly date_to?: string;- } | null;+ export type DashboardPersistedFilters = { [key: string]: unknown } | null;/**- * Simplified serializer to speed response times when loading large amounts of objects.+ * @nullable*/- export interface Insight {+ export type DashboardPersistedVariables = { [key: string]: unknown } | null;++ export type DashboardTilesItem = { [key: string]: unknown };++ /**+ * * `21` - Everyone in the project can edit+ * `37` - Only those invited to this dashboard can edit+ */+ export type RestrictionLevelEnum = typeof RestrictionLevelEnum[keyof typeof RestrictionLevelEnum];+++ export const RestrictionLevelEnum = {+ Number21: 21,+ Number37: 37,+ } as const;++ /**+ * Serializer mixin that handles tags for objects.+ */+ export interface Dashboard {readonly id: number;- readonly short_id: string;/*** @maxLength 400* @nullable*/name?: string | null;+ description?: string;+ pinned?: boolean;+ readonly created_at: string;+ readonly created_by: UserBasic;+ /** @nullable */+ last_accessed_at?: string | null;+ /** @nullable */+ readonly last_viewed_at: string | null;+ readonly is_shared: boolean;+ deleted?: boolean;+ readonly creation_mode: CreationModeEnum;+ readonly filters: DashboardFilters;+ /** @nullable */+ readonly variables: DashboardVariables;+ /** Custom color mapping for breakdown values. */+ breakdown_colors?: unknown;/**- * @maxLength 400+ * ID of the color theme used for chart visualizations.* @nullable*/- derived_name?: string | null;- query?: _InsightQuerySchema | null;+ data_color_theme_id?: number | null;+ tags?: unknown[];+ restriction_level?: RestrictionLevelEnum;+ readonly effective_restriction_level: EffectivePrivilegeLevelEnum;+ readonly effective_privilege_level: EffectivePrivilegeLevelEnum;/**- * @minimum -2147483648- * @maximum 2147483647+ * The effective access level the user has for this object* @nullable*/- order?: number | null;- deleted?: boolean;- /**- DEPRECATED. Will be removed in a future release. Use dashboard_tiles instead.- A dashboard ID for each of the dashboards that this insight is displayed on.- */- dashboards?: number[];- /**- A dashboard tile ID and dashboard_id for each of the dashboards that this insight is displayed on.- */- readonly dashboard_tiles: readonly DashboardTileBasic[];+ readonly user_access_level: string | null;+ readonly access_control_version: string;+ /** @nullable */+ last_refresh?: string | null;+ /** @nullable */+ readonly persisted_filters: DashboardPersistedFilters;+ /** @nullable */+ readonly persisted_variables: DashboardPersistedVariables;+ readonly team_id: number;/**- *- The datetime this insight's results were generated.- If added to one or more dashboards the insight can be refreshed separately on each.- Returns the appropriate last_refresh datetime for the context the insight is viewed in- (see from_dashboard query parameter).-+ * List of quick filter IDs associated with this dashboard* @nullable*/- readonly last_refresh: string | null;+ quick_filter_ids?: string[] | null;+ /** @nullable */+ readonly tiles: readonly DashboardTilesItem[] | null;+ /** Template key to create the dashboard from a predefined template. */+ use_template?: string;/**- * The target age of the cached results for this insight.+ * ID of an existing dashboard to duplicate.* @nullable*/- readonly cache_target_age: string | null;- /**- *- The earliest possible datetime at which we'll allow the cached results for this insight to be refreshed- by querying the database.+ use_dashboard?: number | null;+ /** When deleting, also delete insights that are only on this dashboard. */+ delete_insights?: boolean;+ _create_in_folder?: string;+ }+ /**+ * Serializer mixin that handles tags for objects.+ */+ export interface DashboardBasic {+ readonly id: number;+ /**+ * Name of the dashboard.* @nullable*/- readonly next_allowed_client_refresh: string | null;- readonly result: unknown;- /** @nullable */- readonly hasMore: boolean | null;+ readonly name: string | null;+ /** Description of the dashboard. */+ readonly description: string;+ /** Whether the dashboard is pinned to the top of the list. */+ readonly pinned: boolean;+ readonly created_at: string;+ readonly created_by: UserBasic;/** @nullable */- readonly columns: readonly string[] | null;+ readonly last_accessed_at: string | null;/** @nullable */- readonly created_at: string | null;- readonly created_by: UserBasic;- /**- * @maxLength 400- * @nullable- */- description?: string | null;- readonly updated_at: string;+ readonly last_viewed_at: string | null;+ readonly is_shared: boolean;+ readonly deleted: boolean;+ readonly creation_mode: CreationModeEnum;tags?: unknown[];- favorited?: boolean;- readonly last_modified_at: string;- readonly last_modified_by: UserBasic;- readonly is_sample: boolean;+ /** Controls who can edit the dashboard.++ * `21` - Everyone in the project can edit+ * `37` - Only those invited to this dashboard can edit */+ readonly restriction_level: RestrictionLevelEnum;readonly effective_restriction_level: EffectivePrivilegeLevelEnum;readonly effective_privilege_level: EffectivePrivilegeLevelEnum;/**@@ -11800,75 +11958,78 @@ export namespace Schemas {* @nullable*/readonly user_access_level: string | null;- /**- * The timezone this chart is displayed in.- * @nullable- */- readonly timezone: string | null;- readonly is_cached: boolean;- readonly query_status: unknown;- /** @nullable */- readonly hogql: string | null;- /** @nullable */- readonly types: readonly unknown[] | null;- /** @nullable */- readonly resolved_date_range: InsightResolvedDateRange;- _create_in_folder?: string;- readonly alerts: readonly unknown[];+ readonly access_control_version: string;/** @nullable */- readonly last_viewed_at: string | null;+ readonly last_refresh: string | null;+ readonly team_id: number;}- export interface Text {- readonly id: number;- readonly created_by: UserBasic;- readonly last_modified_by: UserBasic;- /**- * @maxLength 4000- * @nullable- */- body?: string | null;- readonly dashboard_tiles: readonly DashboardTileBasic[];- readonly last_modified_at: string;- team: number;+ export interface DashboardCollaborator {+ readonly id: string;+ readonly dashboard_id: number;+ readonly user: UserBasic;+ level: RestrictionLevelEnum;+ readonly added_at: string;+ readonly updated_at: string;+ user_uuid: string;}- export interface Nested {+ export interface DashboardFilter {+ breakdown_filter?: BreakdownFilter | null;+ date_from?: string | null;+ date_to?: string | null;+ explicitDate?: boolean | null;+ properties?: (EventPropertyFilter | PersonPropertyFilter | ElementPropertyFilter | EventMetadataPropertyFilter | SessionPropertyFilter | CohortPropertyFilter | RecordingPropertyFilter | LogEntryPropertyFilter | GroupPropertyFilter | FeaturePropertyFilter | FlagPropertyFilter | HogQLPropertyFilter | EmptyPropertyFilter | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter | ErrorTrackingIssueFilter | LogPropertyFilter | SpanPropertyFilter | RevenueAnalyticsPropertyFilter | WorkflowVariablePropertyFilter)[] | null;+ }++ /**+ * * `team` - Only team+ * `global` - Global+ * `feature_flag` - Feature Flag+ */+ export type DashboardTemplateScopeEnum = typeof DashboardTemplateScopeEnum[keyof typeof DashboardTemplateScopeEnum];+++ export const DashboardTemplateScopeEnum = {+ Team: 'team',+ Global: 'global',+ FeatureFlag: 'feature_flag',+ } as const;++ export interface DashboardTemplate {readonly id: string;- /** @maxLength 64 */- widget_type: string;/*** @maxLength 400* @nullable*/- name?: string | null;- description?: string;- config?: unknown;- last_modified_at?: string;+ template_name?: string | null;+ /**+ * @maxLength 400+ * @nullable+ */+ dashboard_description?: string | null;+ dashboard_filters?: unknown;/** @nullable */- created_by?: number | null;+ tags?: string[] | null;+ tiles?: unknown;+ variables?: unknown;/** @nullable */- last_modified_by?: number | null;- team: number;- }-- export interface DashboardTile {- id?: number;- insight: Insight;- text: Text;- button_tile: ButtonTile;- layouts?: unknown;+ deleted?: boolean | null;+ /** @nullable */+ readonly created_at: string | null;+ readonly created_by: UserBasic;/**- * @maxLength 400+ * @maxLength 8201* @nullable*/- color?: string | null;- filters_overrides?: unknown;+ image_url?: string | null;/** @nullable */- show_description?: boolean | null;+ readonly team_id: number | null;+ scope?: DashboardTemplateScopeEnum | BlankEnum | null;/** @nullable */- transparent_background?: boolean | null;- readonly widget: Nested;+ availability_contexts?: string[] | null;+ /** Manually curated; used to highlight templates in the UI. */+ is_featured?: boolean;}/**@@ -11892,6 +12053,23 @@ export namespace Schemas {insight: InsightResult;}+ export interface DashboardWidgetRunResult {+ /** Dashboard tile ID for this widget result. */+ tile_id: number;+ /**+ * Widget type identifier, or null when the tile was not found.+ * @nullable+ */+ widget_type: string | null;+ /** Live widget query result payload. */+ result: unknown;+ /**+ * Error message when the widget could not be run.+ * @nullable+ */+ error: string | null;+ }+export interface DataColorTheme {readonly id: number;/** @maxLength 100 */@@ -15107,18 +15285,6 @@ export namespace Schemas {type?: typeof PropertyItemType[keyof typeof PropertyItemType];}- /**- * * `ASC` - ASC- * `DESC` - DESC- */- export type OrderDirectionEnum = typeof OrderDirectionEnum[keyof typeof OrderDirectionEnum];--- export const OrderDirectionEnum = {- Asc: 'ASC',- Desc: 'DESC',- } as const;-/*** * `summary` - summary* `stack` - stack@@ -15277,24 +15443,6 @@ export namespace Schemas {success: boolean;}- /**- * * `last_seen` - last_seen- * `first_seen` - first_seen- * `occurrences` - occurrences- * `users` - users- * `sessions` - sessions- */- export type ErrorTrackingIssueOrderByEnum = typeof ErrorTrackingIssueOrderByEnum[keyof typeof ErrorTrackingIssueOrderByEnum];--- export const ErrorTrackingIssueOrderByEnum = {- LastSeen: 'last_seen',- FirstSeen: 'first_seen',- Occurrences: 'occurrences',- Users: 'users',- Sessions: 'sessions',- } as const;-export interface ErrorTrackingIssueQueryRequest {/** Error tracking issue ID. */issueId: string;@@ -15333,26 +15481,6 @@ export namespace Schemas {new_issue_ids: string[];}- /**- * * `archived` - archived- * `active` - active- * `resolved` - resolved- * `pending_release` - pending_release- * `suppressed` - suppressed- * `all` - all- */- export type ErrorTrackingIssuesListQueryRequestStatusEnum = typeof ErrorTrackingIssuesListQueryRequestStatusEnum[keyof typeof ErrorTrackingIssuesListQueryRequestStatusEnum];--- export const ErrorTrackingIssuesListQueryRequestStatusEnum = {- Archived: 'archived',- Active: 'active',- Resolved: 'resolved',- PendingRelease: 'pending_release',- Suppressed: 'suppressed',- All: 'all',- } as const;-export interface ErrorTrackingIssuesListQueryRequest {/** Date range for issue aggregates. Defaults to the last 7 days. */dateRange?: ErrorTrackingDateRange;@@ -15364,7 +15492,7 @@ export namespace Schemas {* `pending_release` - pending_release* `suppressed` - suppressed* `all` - all */- status?: ErrorTrackingIssuesListQueryRequestStatusEnum;+ status?: ErrorTrackingIssueStatusEnum;/** Filter by issue assignee. Omit to include all assignees. */assignee?: ErrorTrackingAssignee | null;/** When true, exclude internal/test account data from results. Defaults to true. */@@ -22225,6 +22353,11 @@ export namespace Schemas {FeatureFlag: 'FeatureFlag',} as const;+ export interface MoveTileTile {+ /** Dashboard tile ID to move. */+ id: number;+ }+export interface MyFlagsResponse {feature_flag: MinimalFeatureFlag;value: unknown;@@ -29569,6 +29702,13 @@ export namespace Schemas {deleted?: boolean;}+ export interface PatchedMoveTileRequest {+ /** Destination dashboard ID. */+ to_dashboard?: number;+ /** Tile to move, identified by its dashboard tile ID. */+ tile?: MoveTileTile;+ }+export interface PatchedNode {readonly id?: string;/** @maxLength 2048 */@@ -36793,6 +36933,11 @@ export namespace Schemas {results: DashboardTileResult[];}+ export interface RunWidgetsResponse {+ /** Per-tile widget run results. */+ results: DashboardWidgetRunResult[];+ }+/*** Form fields that must be submitted verbatim with the file upload*/@@ -39466,6 +39611,31 @@ export namespace Schemas {is_organization_first_user: boolean;}+ export interface WidgetCatalogEntry {+ /** Stable widget type identifier used in API requests. */+ widget_type: string;+ /** Product area key for grouping related widget variants. */+ group_id: string;+ /** Human-readable product area label. */+ group_label: string;+ /** Widget variant label within the product area. */+ label: string;+ /** Short description of what the widget shows. */+ description: string;+ /** JSON schema hints for config fields (types, choices, bounds). Not a strict validator. */+ config_schema_hints: unknown;+ /**+ * Product access resource required to view or run this widget, if any.+ * @nullable+ */+ required_product_access?: string | null;+ }++ export interface WidgetCatalogResponse {+ /** Registered dashboard widget types available when dashboard-widgets is enabled. */+ results: WidgetCatalogEntry[];+ }+export interface _CompareFilter {/** When true, also fetch results for a comparison window and return them under `compare`. */compare?: boolean;@@ -40547,6 +40717,22 @@ export namespace Schemas {ForceCache: 'force_cache',} as const;+ export type EnvironmentsDashboardsRunWidgetsRetrieveParams = {+ format?: EnvironmentsDashboardsRunWidgetsRetrieveFormat;+ /**+ * Comma-separated dashboard tile IDs to run widgets for.+ */+ tile_ids: string;+ };++ export type EnvironmentsDashboardsRunWidgetsRetrieveFormat = typeof EnvironmentsDashboardsRunWidgetsRetrieveFormat[keyof typeof EnvironmentsDashboardsRunWidgetsRetrieveFormat];+++ export const EnvironmentsDashboardsRunWidgetsRetrieveFormat = {+ Json: 'json',+ Txt: 'txt',+ } as const;+export type EnvironmentsDashboardsSnapshotCreateParams = {format?: EnvironmentsDashboardsSnapshotCreateFormat;};@@ -40603,6 +40789,18 @@ export namespace Schemas {Txt: 'txt',} as const;+ export type EnvironmentsDashboardsWidgetsBatchCreateParams = {+ format?: EnvironmentsDashboardsWidgetsBatchCreateFormat;+ };++ export type EnvironmentsDashboardsWidgetsBatchCreateFormat = typeof EnvironmentsDashboardsWidgetsBatchCreateFormat[keyof typeof EnvironmentsDashboardsWidgetsBatchCreateFormat];+++ export const EnvironmentsDashboardsWidgetsBatchCreateFormat = {+ Json: 'json',+ Txt: 'txt',+ } as const;+export type EnvironmentsDashboardsBulkUpdateTagsCreateParams = {format?: EnvironmentsDashboardsBulkUpdateTagsCreateFormat;};@@ -40639,6 +40837,18 @@ export namespace Schemas {Txt: 'txt',} as const;+ export type EnvironmentsDashboardsWidgetCatalogRetrieveParams = {+ format?: EnvironmentsDashboardsWidgetCatalogRetrieveFormat;+ };++ export type EnvironmentsDashboardsWidgetCatalogRetrieveFormat = typeof EnvironmentsDashboardsWidgetCatalogRetrieveFormat[keyof typeof EnvironmentsDashboardsWidgetCatalogRetrieveFormat];+++ export const EnvironmentsDashboardsWidgetCatalogRetrieveFormat = {+ Json: 'json',+ Txt: 'txt',+ } as const;+export type EnvironmentsDataColorThemesListParams = {/*** Number of results to return per page.@@ -44669,6 +44879,7 @@ export namespace Schemas {* `Log` - Log* `LogsAlertConfiguration` - LogsAlertConfiguration* `LogsExclusionRule` - LogsExclusionRule+ * `DashboardWidget` - DashboardWidget* `ProductTour` - ProductTour* `Ticket` - Ticket* `InstanceSetting` - InstanceSetting@@ -44746,6 +44957,7 @@ export namespace Schemas {Log: 'Log',LogsAlertConfiguration: 'LogsAlertConfiguration',LogsExclusionRule: 'LogsExclusionRule',+ DashboardWidget: 'DashboardWidget',ProductTour: 'ProductTour',Ticket: 'Ticket',InstanceSetting: 'InstanceSetting',@@ -44809,6 +45021,7 @@ export namespace Schemas {* `Log` - Log* `LogsAlertConfiguration` - LogsAlertConfiguration* `LogsExclusionRule` - LogsExclusionRule+ * `DashboardWidget` - DashboardWidget* `ProductTour` - ProductTour* `Ticket` - Ticket* `InstanceSetting` - InstanceSetting@@ -44874,6 +45087,7 @@ export namespace Schemas {Log: 'Log',LogsAlertConfiguration: 'LogsAlertConfiguration',LogsExclusionRule: 'LogsExclusionRule',+ DashboardWidget: 'DashboardWidget',ProductTour: 'ProductTour',Ticket: 'Ticket',InstanceSetting: 'InstanceSetting',@@ -45621,6 +45835,22 @@ export namespace Schemas {ForceCache: 'force_cache',} as const;+ export type DashboardsRunWidgetsRetrieveParams = {+ format?: DashboardsRunWidgetsRetrieveFormat;+ /**+ * Comma-separated dashboard tile IDs to run widgets for.+ */+ tile_ids: string;+ };++ export type DashboardsRunWidgetsRetrieveFormat = typeof DashboardsRunWidgetsRetrieveFormat[keyof typeof DashboardsRunWidgetsRetrieveFormat];+++ export const DashboardsRunWidgetsRetrieveFormat = {+ Json: 'json',+ Txt: 'txt',+ } as const;+export type DashboardsSnapshotCreateParams = {format?: DashboardsSnapshotCreateFormat;};@@ -45677,6 +45907,18 @@ export namespace Schemas {Txt: 'txt',} as const;+ export type DashboardsWidgetsBatchCreateParams = {+ format?: DashboardsWidgetsBatchCreateFormat;+ };++ export type DashboardsWidgetsBatchCreateFormat = typeof DashboardsWidgetsBatchCreateFormat[keyof typeof DashboardsWidgetsBatchCreateFormat];+++ export const DashboardsWidgetsBatchCreateFormat = {+ Json: 'json',+ Txt: 'txt',+ } as const;+export type DashboardsBulkUpdateTagsCreateParams = {format?: DashboardsBulkUpdateTagsCreateFormat;};@@ -45713,6 +45955,18 @@ export namespace Schemas {Txt: 'txt',} as const;+ export type DashboardsWidgetCatalogRetrieveParams = {+ format?: DashboardsWidgetCatalogRetrieveFormat;+ };++ export type DashboardsWidgetCatalogRetrieveFormat = typeof DashboardsWidgetCatalogRetrieveFormat[keyof typeof DashboardsWidgetCatalogRetrieveFormat];+++ export const DashboardsWidgetCatalogRetrieveFormat = {+ Json: 'json',+ Txt: 'txt',+ } as const;+export type DataColorThemesListParams = {/*** Number of results to return per page.diff --git a/services/mcp/src/generated/platform_features/api.ts b/services/mcp/src/generated/platform_features/api.tsindex 1540929fca59..3bec123b95c9 100644--- a/services/mcp/src/generated/platform_features/api.ts+++ b/services/mcp/src/generated/platform_features/api.ts@@ -158,13 +158,14 @@ export const ActivityLogListQueryParams = /* @__PURE__ */ zod.object({'Log','LogsAlertConfiguration','LogsExclusionRule',+ 'DashboardWidget','ProductTour','Ticket','InstanceSetting',]).optional().describe(- 'Filter by a single activity scope, e.g. "FeatureFlag", "Insight", "Dashboard", "Experiment".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting'+ 'Filter by a single activity scope, e.g. "FeatureFlag", "Insight", "Dashboard", "Experiment".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting'),scopes: zod.array(@@ -227,12 +228,13 @@ export const ActivityLogListQueryParams = /* @__PURE__ */ zod.object({'Log','LogsAlertConfiguration','LogsExclusionRule',+ 'DashboardWidget','ProductTour','Ticket','InstanceSetting',]).describe(- '* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting'+ '* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting')).optional()diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.jsonindex f6bdb1c99d80..2537e181b140 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/activity-log-list.json@@ -19,7 +19,7 @@"type": "number"},"scope": {- "description": "Filter by a single activity scope, e.g. \"FeatureFlag\", \"Insight\", \"Dashboard\", \"Experiment\".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting",+ "description": "Filter by a single activity scope, e.g. \"FeatureFlag\", \"Insight\", \"Dashboard\", \"Experiment\".\n\n* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting","enum": ["Cohort","FeatureFlag",@@ -78,6 +78,7 @@"Log","LogsAlertConfiguration","LogsExclusionRule",+ "DashboardWidget","ProductTour","Ticket","InstanceSetting"@@ -87,7 +88,7 @@"scopes": {"description": "Filter by multiple activity scopes, comma-separated. Values must be valid ActivityScope enum values. E.g. \"FeatureFlag,Insight\".","items": {- "description": "* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting",+ "description": "* `Cohort` - Cohort\n* `FeatureFlag` - FeatureFlag\n* `Person` - Person\n* `Group` - Group\n* `Insight` - Insight\n* `Plugin` - Plugin\n* `PluginConfig` - PluginConfig\n* `HogFunction` - HogFunction\n* `HogFlow` - HogFlow\n* `DataManagement` - DataManagement\n* `EventDefinition` - EventDefinition\n* `PropertyDefinition` - PropertyDefinition\n* `Notebook` - Notebook\n* `Endpoint` - Endpoint\n* `EndpointVersion` - EndpointVersion\n* `Dashboard` - Dashboard\n* `Replay` - Replay\n* `Experiment` - Experiment\n* `ExperimentHoldout` - ExperimentHoldout\n* `ExperimentSavedMetric` - ExperimentSavedMetric\n* `Survey` - Survey\n* `EarlyAccessFeature` - EarlyAccessFeature\n* `SessionRecordingPlaylist` - SessionRecordingPlaylist\n* `Comment` - Comment\n* `Team` - Team\n* `Project` - Project\n* `ErrorTrackingIssue` - ErrorTrackingIssue\n* `DataWarehouseSavedQuery` - DataWarehouseSavedQuery\n* `LegalDocument` - LegalDocument\n* `Organization` - Organization\n* `OrganizationDomain` - OrganizationDomain\n* `OrganizationMembership` - OrganizationMembership\n* `Role` - Role\n* `UserGroup` - UserGroup\n* `BatchExport` - BatchExport\n* `BatchImport` - BatchImport\n* `Integration` - Integration\n* `Annotation` - Annotation\n* `Tag` - Tag\n* `TaggedItem` - TaggedItem\n* `Subscription` - Subscription\n* `PersonalAPIKey` - PersonalAPIKey\n* `ProjectSecretAPIKey` - ProjectSecretAPIKey\n* `User` - User\n* `Action` - Action\n* `AlertConfiguration` - AlertConfiguration\n* `Threshold` - Threshold\n* `AlertSubscription` - AlertSubscription\n* `ExternalDataSource` - ExternalDataSource\n* `ExternalDataSchema` - ExternalDataSchema\n* `Evaluation` - Evaluation\n* `LLMTrace` - LLMTrace\n* `WebAnalyticsFilterPreset` - WebAnalyticsFilterPreset\n* `CustomerProfileConfig` - CustomerProfileConfig\n* `Log` - Log\n* `LogsAlertConfiguration` - LogsAlertConfiguration\n* `LogsExclusionRule` - LogsExclusionRule\n* `DashboardWidget` - DashboardWidget\n* `ProductTour` - ProductTour\n* `Ticket` - Ticket\n* `InstanceSetting` - InstanceSetting","enum": ["Cohort","FeatureFlag",@@ -146,6 +147,7 @@"Log","LogsAlertConfiguration","LogsExclusionRule",+ "DashboardWidget","ProductTour","Ticket","InstanceSetting"diff --git a/tach.toml b/tach.tomlindex fa0a960ffd92..c119271f79c2 100644--- a/tach.toml+++ b/tach.toml@@ -176,6 +176,7 @@ depends_on = ["posthog","products.alerts","products.ai_observability",+ "products.error_tracking","products.mcp_analytics","products.product_analytics",]