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

130 lines
6.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"display": {
"description": "Visual representation in the UI. One of `number` or `sparkline`.\n\n* `number` - number\n* `sparkline` - sparkline",
"enum": ["number", "sparkline"],
"type": "string"
},
"filters": {
"anyOf": [
{
"description": "Data-warehouse-source filter shape.",
"properties": {
"key_field": {
"description": "Column on the row whose value matches the entity key. v1 supports group profiles only — the column value is compared to the group_key.",
"type": "string"
},
"source": {
"const": "data_warehouse",
"type": "string"
},
"table_name": {
"description": "Name of a synced data warehouse table. Use `external-data-schemas-list` to discover available tables.",
"type": "string"
},
"timestamp_field": {
"description": "Timestamp column or InsightsQL expression on the row (e.g. \"created\" or \"toDateTime(created_at)\"). Use `execute-sql` (`SELECT * FROM <table> LIMIT 1`) to inspect available columns.",
"type": "string"
}
},
"required": ["source", "table_name", "timestamp_field", "key_field"],
"type": "object"
},
{
"description": "Events-source filter shape (default).",
"properties": {
"actions": {
"items": {},
"type": "array"
},
"events": {
"description": "Events to count or sum over.",
"items": {
"properties": {
"id": {
"description": "Event name (e.g. \"$pageview\").",
"type": "string"
},
"name": {
"type": "string"
},
"order": {
"maximum": 9007199254740991,
"minimum": -9007199254740991,
"type": "integer"
},
"properties": {
"items": {},
"type": "array"
},
"type": {
"const": "events",
"type": "string"
}
},
"required": ["id"],
"type": "object"
},
"type": "array"
},
"filter_test_accounts": {
"type": "boolean"
},
"properties": {
"items": {},
"type": "array"
}
},
"required": ["events"],
"type": "object"
}
],
"description": "Filter definition. Pick exactly one branch: `data_warehouse` (set `source: \"data_warehouse\"` plus `table_name`/`timestamp_field`/`key_field`) or `events` (InsightsFunction filter shape with an `events` array)."
},
"format": {
"description": "How the metric value is formatted in the UI. One of `numeric` or `currency`.\n\n* `numeric` - numeric\n* `currency` - currency",
"enum": ["numeric", "currency"],
"type": "string"
},
"group_type_index": {
"description": "Legacy URL parameter retained for backward compatibility. Pass `0`. The stored value does not scope the metric — usage metrics apply to both groups and persons regardless of this value.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": "number"
},
"id": {
"description": "A UUID string identifying this group usage metric.",
"type": "string"
},
"interval": {
"description": "Rolling time window in days used to compute the metric. Defaults to 7.",
"type": "number"
},
"math": {
"description": "Aggregation function. `count` counts matching events; `sum` sums the value of `math_property` on matching events.\n\n* `count` - count\n* `sum` - sum",
"enum": ["count", "sum"],
"type": "string"
},
"math_property": {
"anyOf": [
{
"maxLength": 255,
"type": "string"
},
{
"type": "null"
}
],
"description": "Required when `math` is `sum`; must be empty when `math` is `count`. For events metrics this is an event property name. For data warehouse metrics this is the column name (or InsightsQL expression) to sum on the DW table."
},
"name": {
"description": "Name of the usage metric. Must be unique per group type within the project.",
"maxLength": 255,
"type": "string"
}
},
"required": ["group_type_index", "id"],
"type": "object"
}