mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-02 14:32:45 +00:00
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.
475 lines
22 KiB
JSON
475 lines
22 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"properties": {
|
|
"compareFilter": {
|
|
"description": "Compare the current period to a prior period. Disabled by default. Enabling roughly doubles query cost — leave it off unless the user explicitly asks for a period-over-period comparison.",
|
|
"properties": {
|
|
"compare": {
|
|
"default": false,
|
|
"description": "Whether to compare the current date range to a previous date range.",
|
|
"type": "boolean"
|
|
},
|
|
"compare_to": {
|
|
"description": "The date range to compare to. The value is a relative date. Examples of relative dates are: `-1y` for 1 year ago, `-14m` for 14 months ago, `-100w` for 100 weeks ago, `-14d` for 14 days ago, `-30h` for 30 hours ago.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"conversionGoal": {
|
|
"anyOf": [
|
|
{
|
|
"anyOf": [
|
|
{
|
|
"properties": {
|
|
"actionId": {
|
|
"maximum": 9007199254740991,
|
|
"minimum": -9007199254740991,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": ["actionId"],
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"customEventName": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["customEventName"],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
],
|
|
"description": "Conversion goal — pass an `actionId` (must belong to the current project) or a `customEventName`. Adds conversion columns to the response. Disables the pre-aggregated fast path — only set when the user explicitly asks about a conversion."
|
|
},
|
|
"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. Defaults to the last 7 days when omitted. Keep ranges short — the backend has no upper bound and large windows on the slow path (e.g. with `conversionGoal` or `includeAvgTimeOnPage`) can be expensive."
|
|
},
|
|
"doPathCleaning": {
|
|
"default": false,
|
|
"description": "Apply the team's path-cleaning rules to URL-style breakdowns.",
|
|
"type": "boolean"
|
|
},
|
|
"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": "WebOverviewQuery",
|
|
"default": "WebOverviewQuery",
|
|
"type": "string"
|
|
},
|
|
"properties": {
|
|
"default": [],
|
|
"description": "Property filters applied to the query. Accepts event, person, session, or cohort filters.",
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"default": "exact",
|
|
"enum": [
|
|
"exact",
|
|
"is_not",
|
|
"icontains",
|
|
"not_icontains",
|
|
"starts_with",
|
|
"not_starts_with",
|
|
"ends_with",
|
|
"not_ends_with",
|
|
"regex",
|
|
"not_regex",
|
|
"gt",
|
|
"gte",
|
|
"lt",
|
|
"lte",
|
|
"is_set",
|
|
"is_not_set",
|
|
"is_date_exact",
|
|
"is_date_before",
|
|
"is_date_after",
|
|
"between",
|
|
"not_between",
|
|
"min",
|
|
"max",
|
|
"in",
|
|
"not_in",
|
|
"is_cleaned_path_exact",
|
|
"flag_evaluates_to",
|
|
"semver_eq",
|
|
"semver_neq",
|
|
"semver_gt",
|
|
"semver_gte",
|
|
"semver_lt",
|
|
"semver_lte",
|
|
"semver_tilde",
|
|
"semver_caret",
|
|
"semver_wildcard",
|
|
"icontains_multi",
|
|
"not_icontains_multi"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"const": "event",
|
|
"default": "event",
|
|
"description": "Event properties",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"anyOf": [
|
|
{
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["key"],
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"enum": [
|
|
"exact",
|
|
"is_not",
|
|
"icontains",
|
|
"not_icontains",
|
|
"starts_with",
|
|
"not_starts_with",
|
|
"ends_with",
|
|
"not_ends_with",
|
|
"regex",
|
|
"not_regex",
|
|
"gt",
|
|
"gte",
|
|
"lt",
|
|
"lte",
|
|
"is_set",
|
|
"is_not_set",
|
|
"is_date_exact",
|
|
"is_date_before",
|
|
"is_date_after",
|
|
"between",
|
|
"not_between",
|
|
"min",
|
|
"max",
|
|
"in",
|
|
"not_in",
|
|
"is_cleaned_path_exact",
|
|
"flag_evaluates_to",
|
|
"semver_eq",
|
|
"semver_neq",
|
|
"semver_gt",
|
|
"semver_gte",
|
|
"semver_lt",
|
|
"semver_lte",
|
|
"semver_tilde",
|
|
"semver_caret",
|
|
"semver_wildcard",
|
|
"icontains_multi",
|
|
"not_icontains_multi"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"const": "person",
|
|
"default": "person",
|
|
"description": "Person properties",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"anyOf": [
|
|
{
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["key", "operator"],
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"enum": [
|
|
"exact",
|
|
"is_not",
|
|
"icontains",
|
|
"not_icontains",
|
|
"starts_with",
|
|
"not_starts_with",
|
|
"ends_with",
|
|
"not_ends_with",
|
|
"regex",
|
|
"not_regex",
|
|
"gt",
|
|
"gte",
|
|
"lt",
|
|
"lte",
|
|
"is_set",
|
|
"is_not_set",
|
|
"is_date_exact",
|
|
"is_date_before",
|
|
"is_date_after",
|
|
"between",
|
|
"not_between",
|
|
"min",
|
|
"max",
|
|
"in",
|
|
"not_in",
|
|
"is_cleaned_path_exact",
|
|
"flag_evaluates_to",
|
|
"semver_eq",
|
|
"semver_neq",
|
|
"semver_gt",
|
|
"semver_gte",
|
|
"semver_lt",
|
|
"semver_lte",
|
|
"semver_tilde",
|
|
"semver_caret",
|
|
"semver_wildcard",
|
|
"icontains_multi",
|
|
"not_icontains_multi"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"const": "session",
|
|
"default": "session",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"anyOf": [
|
|
{
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"items": {
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "number"
|
|
},
|
|
{
|
|
"type": "boolean"
|
|
}
|
|
]
|
|
},
|
|
"type": "array"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"required": ["key", "operator"],
|
|
"type": "object"
|
|
},
|
|
{
|
|
"properties": {
|
|
"cohort_name": {
|
|
"type": "string"
|
|
},
|
|
"key": {
|
|
"const": "id",
|
|
"default": "id",
|
|
"type": "string"
|
|
},
|
|
"label": {
|
|
"type": "string"
|
|
},
|
|
"operator": {
|
|
"default": "in",
|
|
"enum": [
|
|
"exact",
|
|
"is_not",
|
|
"icontains",
|
|
"not_icontains",
|
|
"starts_with",
|
|
"not_starts_with",
|
|
"ends_with",
|
|
"not_ends_with",
|
|
"regex",
|
|
"not_regex",
|
|
"gt",
|
|
"gte",
|
|
"lt",
|
|
"lte",
|
|
"is_set",
|
|
"is_not_set",
|
|
"is_date_exact",
|
|
"is_date_before",
|
|
"is_date_after",
|
|
"between",
|
|
"not_between",
|
|
"min",
|
|
"max",
|
|
"in",
|
|
"not_in",
|
|
"is_cleaned_path_exact",
|
|
"flag_evaluates_to",
|
|
"semver_eq",
|
|
"semver_neq",
|
|
"semver_gt",
|
|
"semver_gte",
|
|
"semver_lt",
|
|
"semver_lte",
|
|
"semver_tilde",
|
|
"semver_caret",
|
|
"semver_wildcard",
|
|
"icontains_multi",
|
|
"not_icontains_multi"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"const": "cohort",
|
|
"default": "cohort",
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"maximum": 9007199254740991,
|
|
"minimum": -9007199254740991,
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": ["value"],
|
|
"type": "object"
|
|
}
|
|
]
|
|
},
|
|
"type": "array"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|