Files
zeekay 1b367e2b62 chore: rebase the tree onto upstream master
The tree was a debranded snapshot of upstream taken around 2026-02-20, and
upstream has moved about five months since. This replaces it with upstream
master, mechanically re-derived: bin/debrand does the rename, and the
pipeline and squashed migrations are restored from the shipped tree.

Not a merge. The previous import replaced the tree wholesale in a single
commit, so there is no shared content history to merge against. Reproducing
the rename on the new tree is what actually converges.

What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints,
compose files, LLM.md, and insights/migrations. The squashed initial
migration is load-bearing — the live database records it by name, so
upstream's ~918 individual migrations cannot come back.

Nine products are dropped as unreferenced. Twenty-one more that we do not run
are kept anyway because the core app still imports them; unpicking those is a
refactor and does not belong in a rebase.

This base does not build yet, and the reasons are not in the rename:
upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against
our 4.2, and the dependency manifests still name upstream packages that we
republish under our own names. Those are decisions, not renames.
2026-08-01 15:44:40 -07:00

2768 lines
217 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"aggregation_group_type_index": {
"anyOf": [
{
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
{
"type": "null"
}
],
"description": "Groups aggregation"
},
"dateRange": {
"anyOf": [
{
"properties": {
"date_from": {
"description": "ISO8601 date string.",
"type": "string"
},
"date_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ISO8601 date string."
}
},
"required": ["date_from"],
"type": "object"
},
{
"properties": {
"date_from": {
"description": "Duration in the past. Supported units are: `h` (hour), `d` (day), `w` (week), `m` (month), `y` (year), `all` (all time). Use the `Start` suffix to define the exact left date boundary. Examples: `-1d` last day from now, `-180d` last 180 days from now, `mStart` this month start, `-1dStart` yesterday's start.",
"type": "string"
}
},
"required": ["date_from"],
"type": "object"
}
],
"description": "Date range for the query"
},
"filterTestAccounts": {
"description": "Exclude internal and test users by applying the respective filters. When omitted, follows the project's \"Filter out internal and test users\" default setting.",
"type": "boolean"
},
"kind": {
"const": "RetentionQuery",
"default": "RetentionQuery",
"type": "string"
},
"output_format": {
"default": "optimized",
"description": "Output format. \"optimized\" returns a human-readable summary from server-side formatters (recommended for analysis). \"json\" returns the raw query results as JSON.",
"enum": ["optimized", "json"],
"type": "string"
},
"properties": {
"default": [],
"description": "Property filters for all series",
"items": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": ["exact", "is_not", "icontains", "not_icontains", "regex", "not_regex"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["is_date_exact", "is_date_before", "is_date_after"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
}
},
"required": ["key", "operator", "type"],
"type": "object"
}
]
},
{
"anyOf": [
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": ["exact", "is_not", "icontains", "not_icontains", "regex", "not_regex"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["is_date_exact", "is_date_before", "is_date_after"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"const": "id",
"default": "id",
"type": "string"
},
"operator": {
"default": "in",
"enum": ["in", "not_in"],
"type": "string"
},
"type": {
"const": "cohort",
"default": "cohort",
"description": "Filter events by cohort membership. Use this to narrow down results to persons belonging to a specific cohort. Use `operator: \"in\"` to include cohort members, or `operator: \"not_in\"` to exclude them. Examples:\n- Include: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"in\" }`\n- Exclude: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"not_in\" }`",
"type": "string"
},
"value": {
"description": "The cohort ID to filter by.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": ["value"],
"type": "object"
},
{
"anyOf": [
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": ["exact", "is_not", "icontains", "not_icontains", "regex", "not_regex"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": ["is_date_exact", "is_date_before", "is_date_after"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
}
},
"required": ["key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"description": "A InsightsQL boolean expression used as a filter condition.\n\nExamples:\n- Filter where a property exceeds a threshold: `toFloat(properties.load_time) > 5.0`\n- Filter with string matching: `properties.$current_url LIKE '%/pricing%'`\n- Filter with multiple conditions: `properties.$browser = 'Chrome' AND toFloat(properties.duration) > 30`",
"type": "string"
},
"type": {
"const": "insightsql",
"default": "insightsql",
"description": "Filter by a InsightsQL boolean expression for advanced filtering that can't be expressed with standard property filters.",
"type": "string"
}
},
"required": ["key"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The feature flag key.",
"type": "string"
},
"operator": {
"const": "flag_evaluates_to",
"default": "flag_evaluates_to",
"type": "string"
},
"type": {
"const": "flag",
"default": "flag",
"description": "Filter events by feature flag state — only include events where a specific flag evaluated to a given value. Examples:\n- Flag enabled: `{ type: \"flag\", key: \"new-onboarding\", operator: \"flag_evaluates_to\", value: true }`\n- Specific variant: `{ type: \"flag\", key: \"checkout-experiment\", operator: \"flag_evaluates_to\", value: \"variant-a\" }`",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"description": "`true`/`false` for boolean flags, or a variant name string for multivariate flags."
}
},
"required": ["key", "value"],
"type": "object"
}
]
},
"type": "array"
},
"retentionFilter": {
"description": "Properties specific to the retention insight",
"properties": {
"aggregationProperty": {
"description": "The event or person property to aggregate when aggregationType is sum or avg.",
"type": "string"
},
"aggregationPropertyType": {
"default": "event",
"description": "The type of property to aggregate on (event or person). Defaults to event.",
"enum": ["event", "person", "data_warehouse"],
"type": "string"
},
"aggregationType": {
"default": "count",
"description": "The aggregation type to use for retention.",
"enum": ["count", "sum", "avg"],
"type": "string"
},
"cumulative": {
"description": "Whether retention should be rolling (aka unbounded, cumulative). Rolling retention means that a user coming back in period 5 makes them count towards all the previous periods.",
"type": "boolean"
},
"meanRetentionCalculation": {
"description": "Whether an additional series should be shown, showing the mean conversion for each period across cohorts.",
"enum": ["simple", "weighted", "none"],
"type": "string"
},
"minimumOccurrences": {
"description": "Minimum number of times an event must occur to count towards retention.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"period": {
"default": "Day",
"description": "Retention period, the interval to track cohorts by.",
"enum": ["Hour", "Day", "Week", "Month"],
"type": "string"
},
"retentionCustomBrackets": {
"description": "Custom brackets for retention calculations.",
"items": {
"type": "number"
},
"maxItems": 31,
"type": "array"
},
"retentionReference": {
"description": "Whether retention is with regard to initial cohort size, or that of the previous period.",
"enum": ["total", "previous"],
"type": "string"
},
"retentionType": {
"description": "Retention type: recurring or first time. Recurring retention counts a user as part of a cohort if they performed the cohort event during that time period, irrespective of it was their first time or not. First time retention only counts a user as part of the cohort if it was their first time performing the cohort event.",
"enum": ["retention_recurring", "retention_first_time", "retention_first_ever_occurrence"],
"type": "string"
},
"returningEntity": {
"anyOf": [
{
"properties": {
"custom_name": {
"description": "Custom name for the event if it is needed to be renamed.",
"type": "string"
},
"id": {
"description": "The event name from the plan as a string. This is the field the retention query engine uses to match events, so it must be populated exactly as the event appears in the plan. For actions use `AssistantRetentionActionsNode` instead, where `id` is the numeric action ID.",
"type": "string"
},
"name": {
"description": "Optional human-readable label for the event, used for display only. Defaults to `id` if omitted and is never used for event matching.",
"type": "string"
},
"properties": {
"description": "Property filters for the event.",
"items": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
}
},
"required": ["key", "operator", "type"],
"type": "object"
}
]
},
{
"anyOf": [
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"const": "id",
"default": "id",
"type": "string"
},
"operator": {
"default": "in",
"enum": ["in", "not_in"],
"type": "string"
},
"type": {
"const": "cohort",
"default": "cohort",
"description": "Filter events by cohort membership. Use this to narrow down results to persons belonging to a specific cohort. Use `operator: \"in\"` to include cohort members, or `operator: \"not_in\"` to exclude them. Examples:\n- Include: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"in\" }`\n- Exclude: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"not_in\" }`",
"type": "string"
},
"value": {
"description": "The cohort ID to filter by.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": ["value"],
"type": "object"
},
{
"anyOf": [
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
}
},
"required": ["key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"description": "A InsightsQL boolean expression used as a filter condition.\n\nExamples:\n- Filter where a property exceeds a threshold: `toFloat(properties.load_time) > 5.0`\n- Filter with string matching: `properties.$current_url LIKE '%/pricing%'`\n- Filter with multiple conditions: `properties.$browser = 'Chrome' AND toFloat(properties.duration) > 30`",
"type": "string"
},
"type": {
"const": "insightsql",
"default": "insightsql",
"description": "Filter by a InsightsQL boolean expression for advanced filtering that can't be expressed with standard property filters.",
"type": "string"
}
},
"required": ["key"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The feature flag key.",
"type": "string"
},
"operator": {
"const": "flag_evaluates_to",
"default": "flag_evaluates_to",
"type": "string"
},
"type": {
"const": "flag",
"default": "flag",
"description": "Filter events by feature flag state — only include events where a specific flag evaluated to a given value. Examples:\n- Flag enabled: `{ type: \"flag\", key: \"new-onboarding\", operator: \"flag_evaluates_to\", value: true }`\n- Specific variant: `{ type: \"flag\", key: \"checkout-experiment\", operator: \"flag_evaluates_to\", value: \"variant-a\" }`",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"description": "`true`/`false` for boolean flags, or a variant name string for multivariate flags."
}
},
"required": ["key", "value"],
"type": "object"
}
]
},
"type": "array"
},
"type": {
"const": "events",
"default": "events",
"type": "string"
}
},
"required": ["id"],
"type": "object"
},
{
"properties": {
"id": {
"description": "The numeric action ID from the plan. This is the field the retention query engine uses to look up the action definition. For events use `AssistantRetentionEventsNode` instead, where `id` is the event name string.",
"type": "number"
},
"name": {
"description": "Optional human-readable label for the action, used for display only. Defaults to the action's stored name if omitted and is never used for action matching.",
"type": "string"
},
"properties": {
"description": "Property filters for the action.",
"items": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
}
},
"required": ["key", "operator", "type"],
"type": "object"
}
]
},
{
"anyOf": [
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"const": "id",
"default": "id",
"type": "string"
},
"operator": {
"default": "in",
"enum": ["in", "not_in"],
"type": "string"
},
"type": {
"const": "cohort",
"default": "cohort",
"description": "Filter events by cohort membership. Use this to narrow down results to persons belonging to a specific cohort. Use `operator: \"in\"` to include cohort members, or `operator: \"not_in\"` to exclude them. Examples:\n- Include: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"in\" }`\n- Exclude: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"not_in\" }`",
"type": "string"
},
"value": {
"description": "The cohort ID to filter by.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": ["value"],
"type": "object"
},
{
"anyOf": [
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
}
},
"required": ["key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"description": "A InsightsQL boolean expression used as a filter condition.\n\nExamples:\n- Filter where a property exceeds a threshold: `toFloat(properties.load_time) > 5.0`\n- Filter with string matching: `properties.$current_url LIKE '%/pricing%'`\n- Filter with multiple conditions: `properties.$browser = 'Chrome' AND toFloat(properties.duration) > 30`",
"type": "string"
},
"type": {
"const": "insightsql",
"default": "insightsql",
"description": "Filter by a InsightsQL boolean expression for advanced filtering that can't be expressed with standard property filters.",
"type": "string"
}
},
"required": ["key"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The feature flag key.",
"type": "string"
},
"operator": {
"const": "flag_evaluates_to",
"default": "flag_evaluates_to",
"type": "string"
},
"type": {
"const": "flag",
"default": "flag",
"description": "Filter events by feature flag state — only include events where a specific flag evaluated to a given value. Examples:\n- Flag enabled: `{ type: \"flag\", key: \"new-onboarding\", operator: \"flag_evaluates_to\", value: true }`\n- Specific variant: `{ type: \"flag\", key: \"checkout-experiment\", operator: \"flag_evaluates_to\", value: \"variant-a\" }`",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"description": "`true`/`false` for boolean flags, or a variant name string for multivariate flags."
}
},
"required": ["key", "value"],
"type": "object"
}
]
},
"type": "array"
},
"type": {
"const": "actions",
"default": "actions",
"type": "string"
}
},
"required": ["id"],
"type": "object"
}
],
"description": "Retention event (event marking the user coming back)."
},
"targetEntity": {
"anyOf": [
{
"properties": {
"custom_name": {
"description": "Custom name for the event if it is needed to be renamed.",
"type": "string"
},
"id": {
"description": "The event name from the plan as a string. This is the field the retention query engine uses to match events, so it must be populated exactly as the event appears in the plan. For actions use `AssistantRetentionActionsNode` instead, where `id` is the numeric action ID.",
"type": "string"
},
"name": {
"description": "Optional human-readable label for the event, used for display only. Defaults to `id` if omitted and is never used for event matching.",
"type": "string"
},
"properties": {
"description": "Property filters for the event.",
"items": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
}
},
"required": ["key", "operator", "type"],
"type": "object"
}
]
},
{
"anyOf": [
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"const": "id",
"default": "id",
"type": "string"
},
"operator": {
"default": "in",
"enum": ["in", "not_in"],
"type": "string"
},
"type": {
"const": "cohort",
"default": "cohort",
"description": "Filter events by cohort membership. Use this to narrow down results to persons belonging to a specific cohort. Use `operator: \"in\"` to include cohort members, or `operator: \"not_in\"` to exclude them. Examples:\n- Include: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"in\" }`\n- Exclude: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"not_in\" }`",
"type": "string"
},
"value": {
"description": "The cohort ID to filter by.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": ["value"],
"type": "object"
},
{
"anyOf": [
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
}
},
"required": ["key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"description": "A InsightsQL boolean expression used as a filter condition.\n\nExamples:\n- Filter where a property exceeds a threshold: `toFloat(properties.load_time) > 5.0`\n- Filter with string matching: `properties.$current_url LIKE '%/pricing%'`\n- Filter with multiple conditions: `properties.$browser = 'Chrome' AND toFloat(properties.duration) > 30`",
"type": "string"
},
"type": {
"const": "insightsql",
"default": "insightsql",
"description": "Filter by a InsightsQL boolean expression for advanced filtering that can't be expressed with standard property filters.",
"type": "string"
}
},
"required": ["key"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The feature flag key.",
"type": "string"
},
"operator": {
"const": "flag_evaluates_to",
"default": "flag_evaluates_to",
"type": "string"
},
"type": {
"const": "flag",
"default": "flag",
"description": "Filter events by feature flag state — only include events where a specific flag evaluated to a given value. Examples:\n- Flag enabled: `{ type: \"flag\", key: \"new-onboarding\", operator: \"flag_evaluates_to\", value: true }`\n- Specific variant: `{ type: \"flag\", key: \"checkout-experiment\", operator: \"flag_evaluates_to\", value: \"variant-a\" }`",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"description": "`true`/`false` for boolean flags, or a variant name string for multivariate flags."
}
},
"required": ["key", "value"],
"type": "object"
}
]
},
"type": "array"
},
"type": {
"const": "events",
"default": "events",
"type": "string"
}
},
"required": ["id"],
"type": "object"
},
{
"properties": {
"id": {
"description": "The numeric action ID from the plan. This is the field the retention query engine uses to look up the action definition. For events use `AssistantRetentionEventsNode` instead, where `id` is the event name string.",
"type": "number"
},
"name": {
"description": "Optional human-readable label for the action, used for display only. Defaults to the action's stored name if omitted and is never used for action matching.",
"type": "string"
},
"properties": {
"description": "Property filters for the action.",
"items": {
"anyOf": [
{
"anyOf": [
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "type", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"enum": ["event", "person", "session", "feature"],
"type": "string"
}
},
"required": ["key", "operator", "type"],
"type": "object"
}
]
},
{
"anyOf": [
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator", "value"],
"type": "object"
},
{
"properties": {
"group_type_index": {
"description": "Index of the group type from the group mapping.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"key": {
"description": "Use one of the properties the user has provided in the plan.",
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "group",
"default": "group",
"type": "string"
}
},
"required": ["group_type_index", "key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"const": "id",
"default": "id",
"type": "string"
},
"operator": {
"default": "in",
"enum": ["in", "not_in"],
"type": "string"
},
"type": {
"const": "cohort",
"default": "cohort",
"description": "Filter events by cohort membership. Use this to narrow down results to persons belonging to a specific cohort. Use `operator: \"in\"` to include cohort members, or `operator: \"not_in\"` to exclude them. Examples:\n- Include: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"in\" }`\n- Exclude: `{ type: \"cohort\", key: \"id\", value: 42, operator: \"not_in\" }`",
"type": "string"
},
"value": {
"description": "The cohort ID to filter by.",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": ["value"],
"type": "object"
},
{
"anyOf": [
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`icontains` - case insensitive contains. `not_icontains` - case insensitive does not contain. `regex` - matches the regex pattern. `not_regex` - does not match the regex pattern.",
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"regex",
"not_regex"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. If the operator is `regex` or `not_regex`, the value must be a valid Datastore regex pattern to match against. Otherwise, the value must be a substring that will be matched against the property value. Use the string values `true` or `false` for boolean properties.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": ["exact", "gt", "lt"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`exact` - exact match of any of the values. `is_not` - does not match any of the values.",
"enum": ["exact", "is_not"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Only use property values from the plan. Always use strings as values. If you have a number, convert it to a string first. If you have a boolean, convert it to a string \"true\" or \"false\".",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"enum": [
"is_date_exact",
"is_date_before",
"is_date_after"
],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
},
"value": {
"description": "Value must be a date in ISO 8601 format.",
"type": "string"
}
},
"required": ["key", "operator", "value"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The element property to filter on. `tag_name` — HTML tag (e.g., `button`, `a`, `input`). `text` — visible text content of the element. `href` — the `href` attribute for links. `selector` — a CSS selector matching the element (e.g., `div.main > button.cta`).",
"enum": ["tag_name", "text", "href", "selector"],
"type": "string"
},
"operator": {
"description": "`is_set` - the property has any value. `is_not_set` - the property doesn't have a value or wasn't collected.",
"enum": ["is_set", "is_not_set"],
"type": "string"
},
"type": {
"const": "element",
"default": "element",
"description": "Filter by autocaptured HTML element properties (`$autocapture`, `$rageclick`). Example: `{ type: \"element\", key: \"text\", value: \"Sign Up\", operator: \"exact\" }`",
"type": "string"
}
},
"required": ["key", "operator"],
"type": "object"
}
]
},
{
"properties": {
"key": {
"description": "A InsightsQL boolean expression used as a filter condition.\n\nExamples:\n- Filter where a property exceeds a threshold: `toFloat(properties.load_time) > 5.0`\n- Filter with string matching: `properties.$current_url LIKE '%/pricing%'`\n- Filter with multiple conditions: `properties.$browser = 'Chrome' AND toFloat(properties.duration) > 30`",
"type": "string"
},
"type": {
"const": "insightsql",
"default": "insightsql",
"description": "Filter by a InsightsQL boolean expression for advanced filtering that can't be expressed with standard property filters.",
"type": "string"
}
},
"required": ["key"],
"type": "object"
},
{
"properties": {
"key": {
"description": "The feature flag key.",
"type": "string"
},
"operator": {
"const": "flag_evaluates_to",
"default": "flag_evaluates_to",
"type": "string"
},
"type": {
"const": "flag",
"default": "flag",
"description": "Filter events by feature flag state — only include events where a specific flag evaluated to a given value. Examples:\n- Flag enabled: `{ type: \"flag\", key: \"new-onboarding\", operator: \"flag_evaluates_to\", value: true }`\n- Specific variant: `{ type: \"flag\", key: \"checkout-experiment\", operator: \"flag_evaluates_to\", value: \"variant-a\" }`",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"description": "`true`/`false` for boolean flags, or a variant name string for multivariate flags."
}
},
"required": ["key", "value"],
"type": "object"
}
]
},
"type": "array"
},
"type": {
"const": "actions",
"default": "actions",
"type": "string"
}
},
"required": ["id"],
"type": "object"
}
],
"description": "Activation event (event putting the actor into the initial cohort)."
},
"timeWindowMode": {
"description": "The time window mode to use for retention calculations.",
"enum": ["strict_calendar_dates", "24_hour_windows"],
"type": "string"
},
"totalIntervals": {
"default": 8,
"description": "How many intervals to show in the chart. The default value is 8 (meaning 7 periods after initial cohort).",
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
}
},
"required": ["returningEntity", "targetEntity"],
"type": "object"
}
},
"required": ["retentionFilter"],
"type": "object"
}