diff --git a/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--dark.png b/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--dark.png index a820c399ecbf2..f427261f0c801 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--dark.png and b/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--dark.png differ diff --git a/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--light.png b/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--light.png index 1276a2564f958..fa79b1b313e1d 100644 Binary files a/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--light.png and b/frontend/__snapshots__/exporter-exporter--funnel-historical-trends-insight--light.png differ diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json index d766c423a4199..6312b673fbd9f 100644 --- a/frontend/src/queries/schema.json +++ b/frontend/src/queries/schema.json @@ -55,16 +55,9 @@ "additionalProperties": false, "properties": { "fixedProperties": { - "description": "Currently only person filters supported (including via HogQL), See `filter_conditions()` in actor_strategies.py.", + "description": "Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py.", "items": { - "anyOf": [ - { - "$ref": "#/definitions/PersonPropertyFilter" - }, - { - "$ref": "#/definitions/HogQLPropertyFilter" - } - ] + "$ref": "#/definitions/AnyPersonScopeFilter" }, "type": "array" }, @@ -89,16 +82,9 @@ "type": "array" }, "properties": { - "description": "Currently only person filters supported (including via HogQL). see `filter_conditions()` in actor_strategies.py.", + "description": "Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py.", "items": { - "anyOf": [ - { - "$ref": "#/definitions/PersonPropertyFilter" - }, - { - "$ref": "#/definitions/HogQLPropertyFilter" - } - ] + "$ref": "#/definitions/AnyPersonScopeFilter" }, "type": "array" }, @@ -255,6 +241,23 @@ } ] }, + "AnyPersonScopeFilter": { + "anyOf": [ + { + "$ref": "#/definitions/PersonPropertyFilter" + }, + { + "$ref": "#/definitions/CohortPropertyFilter" + }, + { + "$ref": "#/definitions/HogQLPropertyFilter" + }, + { + "$ref": "#/definitions/EmptyPropertyFilter" + } + ], + "description": "Any filter type supported by `property_to_expr(scope=\"person\", ...)`." + }, "AnyPropertyFilter": { "anyOf": [ { diff --git a/frontend/src/queries/schema.ts b/frontend/src/queries/schema.ts index f0f59f042aed6..4298451282d75 100644 --- a/frontend/src/queries/schema.ts +++ b/frontend/src/queries/schema.ts @@ -1,4 +1,5 @@ import { + AnyPersonScopeFilter, AnyPropertyFilter, BaseMathType, Breakdown, @@ -13,7 +14,6 @@ import { FunnelsFilterType, GroupMathType, HogQLMathType, - HogQLPropertyFilter, InsightShortId, InsightType, IntervalType, @@ -990,10 +990,10 @@ export interface ActorsQuery extends DataNode { source?: InsightActorsQuery | FunnelsActorsQuery | FunnelCorrelationActorsQuery | HogQLQuery select?: HogQLExpression[] search?: string - /** Currently only person filters supported (including via HogQL). see `filter_conditions()` in actor_strategies.py. */ - properties?: (PersonPropertyFilter | HogQLPropertyFilter)[] - /** Currently only person filters supported (including via HogQL), See `filter_conditions()` in actor_strategies.py. */ - fixedProperties?: (PersonPropertyFilter | HogQLPropertyFilter)[] + /** Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py. */ + properties?: AnyPersonScopeFilter[] + /** Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py. */ + fixedProperties?: AnyPersonScopeFilter[] orderBy?: string[] limit?: integer offset?: integer diff --git a/frontend/src/types.ts b/frontend/src/types.ts index cb5d43ddf6911..ce48e54f79837 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -772,6 +772,13 @@ export type AnyPropertyFilter = | DataWarehousePropertyFilter | DataWarehousePersonPropertyFilter +/** Any filter type supported by `property_to_expr(scope="person", ...)`. */ +export type AnyPersonScopeFilter = + | PersonPropertyFilter + | CohortPropertyFilter + | HogQLPropertyFilter + | EmptyPropertyFilter + export type AnyFilterLike = AnyPropertyFilter | PropertyGroupFilter | PropertyGroupFilterValue export type SessionRecordingId = SessionRecordingType['id'] diff --git a/posthog/schema.py b/posthog/schema.py index a92e64f794c6a..913ddee550cd5 100644 --- a/posthog/schema.py +++ b/posthog/schema.py @@ -4134,9 +4134,11 @@ class ActorsQuery(BaseModel): model_config = ConfigDict( extra="forbid", ) - fixedProperties: Optional[list[Union[PersonPropertyFilter, HogQLPropertyFilter]]] = Field( + fixedProperties: Optional[ + list[Union[PersonPropertyFilter, CohortPropertyFilter, HogQLPropertyFilter, EmptyPropertyFilter]] + ] = Field( default=None, - description="Currently only person filters supported (including via HogQL), See `filter_conditions()` in actor_strategies.py.", + description="Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py.", ) kind: Literal["ActorsQuery"] = "ActorsQuery" limit: Optional[int] = None @@ -4145,9 +4147,11 @@ class ActorsQuery(BaseModel): ) offset: Optional[int] = None orderBy: Optional[list[str]] = None - properties: Optional[list[Union[PersonPropertyFilter, HogQLPropertyFilter]]] = Field( + properties: Optional[ + list[Union[PersonPropertyFilter, CohortPropertyFilter, HogQLPropertyFilter, EmptyPropertyFilter]] + ] = Field( default=None, - description="Currently only person filters supported (including via HogQL). see `filter_conditions()` in actor_strategies.py.", + description="Currently only person filters supported. No filters for querying groups. See `filter_conditions()` in actor_strategies.py.", ) response: Optional[ActorsQueryResponse] = None search: Optional[str] = None