mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-02 14:32:45 +00:00
Mechanically re-derived: bin/debrand runs over a fresh import of posthog/posthog@fa1a9a60d4 (2026-08-06). The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md and the squashed initial migration are restored from the shipped tree, same as the previous import. The prune's import-closure guard kept 21 products the new core now imports; dropping them is a refactor now, recorded rather than forced.
479 lines
22 KiB
JSON
479 lines
22 KiB
JSON
{
|
||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
"properties": {
|
||
"base_updated_at": {
|
||
"description": "Optimistic concurrency: the updated_at (or draft_updated_at when editing a staged draft) you last read. If the stored side is newer, the write fails with 409 instead of overwriting the concurrent edit. Omit to overwrite unconditionally.",
|
||
"format": "date-time",
|
||
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"description": "Human-readable description of what this function does.",
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"description": "Set to true to activate or false to deactivate the function.",
|
||
"type": "boolean"
|
||
},
|
||
"execution_order": {
|
||
"anyOf": [
|
||
{
|
||
"maximum": 32767,
|
||
"minimum": 0,
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "Execution priority for transformations. Lower values run first."
|
||
},
|
||
"filters": {
|
||
"description": "Event filters that control which events trigger this function.",
|
||
"properties": {
|
||
"actions": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"bytecode": {},
|
||
"bytecode_error": {
|
||
"type": "string"
|
||
},
|
||
"data_warehouse": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"events": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"filter_test_accounts": {
|
||
"type": "boolean"
|
||
},
|
||
"properties": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"source": {
|
||
"default": "events",
|
||
"description": "* `events` - events\n* `person-updates` - person-updates\n* `data-warehouse-table` - data-warehouse-table",
|
||
"enum": ["events", "person-updates", "data-warehouse-table"],
|
||
"type": "string"
|
||
},
|
||
"transpiled": {}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"script": {
|
||
"description": "Source code. Script language for most types; TypeScript for site_destination and site_app.",
|
||
"type": "string"
|
||
},
|
||
"icon_url": {
|
||
"anyOf": [
|
||
{
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "URL for the function's icon displayed in the UI."
|
||
},
|
||
"id": {
|
||
"description": "A UUID string identifying this script function.",
|
||
"type": "string"
|
||
},
|
||
"inputs": {
|
||
"additionalProperties": {
|
||
"properties": {
|
||
"bytecode": {
|
||
"items": {},
|
||
"type": "array"
|
||
},
|
||
"order": {
|
||
"type": "number"
|
||
},
|
||
"templating": {
|
||
"description": "* `script` - script\n* `liquid` - liquid",
|
||
"enum": ["script", "liquid"],
|
||
"type": "string"
|
||
},
|
||
"transpiled": {},
|
||
"value": {}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"description": "Values for each input defined in inputs_schema.",
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"inputs_schema": {
|
||
"description": "Schema defining the configurable input parameters for this function.",
|
||
"items": {
|
||
"properties": {
|
||
"choices": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"default": {},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"hidden": {
|
||
"default": false,
|
||
"type": "boolean"
|
||
},
|
||
"key": {
|
||
"type": "string"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"required": {
|
||
"default": false,
|
||
"type": "boolean"
|
||
},
|
||
"searchable": {
|
||
"type": "boolean"
|
||
},
|
||
"secret": {
|
||
"default": false,
|
||
"type": "boolean"
|
||
},
|
||
"templating": {
|
||
"anyOf": [
|
||
{
|
||
"type": "boolean"
|
||
},
|
||
{
|
||
"enum": ["script", "liquid"],
|
||
"type": "string"
|
||
}
|
||
]
|
||
},
|
||
"type": {
|
||
"description": "* `string` - string\n* `number` - number\n* `boolean` - boolean\n* `dictionary` - dictionary\n* `choice` - choice\n* `json` - json\n* `integration` - integration\n* `integration_multi` - integration_multi\n* `integration_field` - integration_field\n* `email` - email\n* `native_email` - native_email\n* `insights_assignee` - insights_assignee\n* `insights_ticket_tags` - insights_ticket_tags\n* `insights_business_hours` - insights_business_hours\n* `non_failure_status_codes` - non_failure_status_codes\n* `customer_analytics_account_properties` - customer_analytics_account_properties\n* `customer_analytics_account_relationships` - customer_analytics_account_relationships",
|
||
"enum": [
|
||
"string",
|
||
"number",
|
||
"boolean",
|
||
"dictionary",
|
||
"choice",
|
||
"json",
|
||
"integration",
|
||
"integration_multi",
|
||
"integration_field",
|
||
"email",
|
||
"native_email",
|
||
"insights_assignee",
|
||
"insights_ticket_tags",
|
||
"insights_business_hours",
|
||
"non_failure_status_codes",
|
||
"customer_analytics_account_properties",
|
||
"customer_analytics_account_relationships"
|
||
],
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": ["type", "key"],
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"mappings": {
|
||
"anyOf": [
|
||
{
|
||
"items": {
|
||
"properties": {
|
||
"filters": {
|
||
"properties": {
|
||
"actions": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"data_warehouse": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"events": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"filter_test_accounts": {
|
||
"type": "boolean"
|
||
},
|
||
"properties": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"source": {
|
||
"default": "events",
|
||
"description": "* `events` - events\n* `person-updates` - person-updates\n* `data-warehouse-table` - data-warehouse-table",
|
||
"enum": ["events", "person-updates", "data-warehouse-table"],
|
||
"type": "string"
|
||
}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"inputs": {
|
||
"additionalProperties": {
|
||
"properties": {
|
||
"bytecode": {
|
||
"items": {},
|
||
"type": "array"
|
||
},
|
||
"order": {
|
||
"type": "number"
|
||
},
|
||
"templating": {
|
||
"description": "* `script` - script\n* `liquid` - liquid",
|
||
"enum": ["script", "liquid"],
|
||
"type": "string"
|
||
},
|
||
"transpiled": {},
|
||
"value": {}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"inputs_schema": {
|
||
"items": {
|
||
"properties": {
|
||
"choices": {
|
||
"items": {
|
||
"additionalProperties": {},
|
||
"propertyNames": {
|
||
"type": "string"
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"default": {},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"hidden": {
|
||
"default": false,
|
||
"type": "boolean"
|
||
},
|
||
"key": {
|
||
"type": "string"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"required": {
|
||
"default": false,
|
||
"type": "boolean"
|
||
},
|
||
"searchable": {
|
||
"type": "boolean"
|
||
},
|
||
"secret": {
|
||
"default": false,
|
||
"type": "boolean"
|
||
},
|
||
"templating": {
|
||
"anyOf": [
|
||
{
|
||
"type": "boolean"
|
||
},
|
||
{
|
||
"enum": ["script", "liquid"],
|
||
"type": "string"
|
||
}
|
||
]
|
||
},
|
||
"type": {
|
||
"description": "* `string` - string\n* `number` - number\n* `boolean` - boolean\n* `dictionary` - dictionary\n* `choice` - choice\n* `json` - json\n* `integration` - integration\n* `integration_multi` - integration_multi\n* `integration_field` - integration_field\n* `email` - email\n* `native_email` - native_email\n* `insights_assignee` - insights_assignee\n* `insights_ticket_tags` - insights_ticket_tags\n* `insights_business_hours` - insights_business_hours\n* `non_failure_status_codes` - non_failure_status_codes\n* `customer_analytics_account_properties` - customer_analytics_account_properties\n* `customer_analytics_account_relationships` - customer_analytics_account_relationships",
|
||
"enum": [
|
||
"string",
|
||
"number",
|
||
"boolean",
|
||
"dictionary",
|
||
"choice",
|
||
"json",
|
||
"integration",
|
||
"integration_multi",
|
||
"integration_field",
|
||
"email",
|
||
"native_email",
|
||
"insights_assignee",
|
||
"insights_ticket_tags",
|
||
"insights_business_hours",
|
||
"non_failure_status_codes",
|
||
"customer_analytics_account_properties",
|
||
"customer_analytics_account_relationships"
|
||
],
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": ["type", "key"],
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"type": "object"
|
||
},
|
||
"type": "array"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "Event-to-destination field mappings. Only for destination and site_destination types."
|
||
},
|
||
"masking": {
|
||
"anyOf": [
|
||
{
|
||
"properties": {
|
||
"bytecode": {
|
||
"description": "Compiled bytecode for the hash expression. Auto-generated."
|
||
},
|
||
"hash": {
|
||
"description": "Script expression used to compute the masking hash.",
|
||
"type": "string"
|
||
},
|
||
"threshold": {
|
||
"anyOf": [
|
||
{
|
||
"type": "number"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "Optional threshold count before masking applies."
|
||
},
|
||
"ttl": {
|
||
"description": "Time-to-live in seconds for the masking cache (60–86400).",
|
||
"maximum": 86400,
|
||
"minimum": 60,
|
||
"type": "number"
|
||
}
|
||
},
|
||
"required": ["ttl", "hash"],
|
||
"type": "object"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "PII masking configuration with TTL, threshold, and hash expression."
|
||
},
|
||
"name": {
|
||
"anyOf": [
|
||
{
|
||
"maxLength": 400,
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "Display name for the function."
|
||
},
|
||
"template_id": {
|
||
"anyOf": [
|
||
{
|
||
"maxLength": 400,
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "ID of the template to create this function from."
|
||
},
|
||
"type": {
|
||
"anyOf": [
|
||
{
|
||
"description": "* `destination` - Destination\n* `site_destination` - Site Destination\n* `internal_destination` - Internal Destination\n* `source_webhook` - Source Webhook\n* `warehouse_source_webhook` - Warehouse Source Webhook\n* `site_app` - Site App\n* `transformation` - Transformation\n* `transformation_log` - Transformation Log",
|
||
"enum": [
|
||
"destination",
|
||
"site_destination",
|
||
"internal_destination",
|
||
"source_webhook",
|
||
"warehouse_source_webhook",
|
||
"site_app",
|
||
"transformation",
|
||
"transformation_log"
|
||
],
|
||
"type": "string"
|
||
},
|
||
{
|
||
"type": "null"
|
||
}
|
||
],
|
||
"description": "Function type: destination, site_destination, internal_destination, source_webhook, warehouse_source_webhook, site_app, transformation, or transformation_log.\n\n* `destination` - Destination\n* `site_destination` - Site Destination\n* `internal_destination` - Internal Destination\n* `source_webhook` - Source Webhook\n* `warehouse_source_webhook` - Warehouse Source Webhook\n* `site_app` - Site App\n* `transformation` - Transformation\n* `transformation_log` - Transformation Log"
|
||
}
|
||
},
|
||
"required": ["id"],
|
||
"type": "object"
|
||
}
|