{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hg-insights/json-schema/hg-insights-intent-response-schema.json",
  "title": "IntentResponse",
  "description": "Intent signals for a single company, combining HG topics and TrustRadius activities.",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hg-insights-openapi.yaml#/components/schemas/IntentResponse",
  "properties": {
    "activities": {
      "allOf": [
        {
          "$ref": "#/$defs/IntentActivitiesSection"
        }
      ],
      "type": [
        "object",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    },
    "company": {
      "$ref": "#/$defs/IntentCompany"
    },
    "summary": {
      "allOf": [
        {
          "$ref": "#/$defs/IntentSummary"
        }
      ],
      "type": [
        "object",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    },
    "topics": {
      "allOf": [
        {
          "$ref": "#/$defs/IntentTopicsSection"
        }
      ],
      "type": [
        "object",
        "null"
      ],
      "x-struct": null,
      "x-validate": null
    }
  },
  "required": [
    "company"
  ],
  "type": "object",
  "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.Response",
  "x-validate": null,
  "$defs": {
    "IntentActivitiesSection": {
      "description": "TrustRadius buyer intent activities with total count.",
      "properties": {
        "count": {
          "description": "Total matching activities (before pagination)",
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "data": {
          "items": {
            "$ref": "#/$defs/IntentActivity"
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "required": [
        "data",
        "count"
      ],
      "title": "IntentActivitiesSection",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.ActivitiesSection",
      "x-validate": null
    },
    "IntentActivity": {
      "description": "A TrustRadius buyer intent activity.",
      "properties": {
        "activity_date": {
          "description": "Activity date",
          "format": "date",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "activity_label": {
          "description": "Activity label",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "activity_type": {
          "description": "Activity type",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "city_name": {
          "description": "Visitor city name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "country_name": {
          "description": "Visitor country name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "daily_views": {
          "description": "Daily views",
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "intent_signal_url": {
          "description": "Intent signal URL",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "products": {
          "description": "Product names referenced by the activity",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "state_name": {
          "description": "Visitor state or province name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "vendors": {
          "description": "Vendor names referenced by the activity",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "IntentActivity",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.ActivityItem",
      "x-validate": null
    },
    "IntentCompany": {
      "additionalProperties": false,
      "description": "Resolved company information.",
      "properties": {
        "domain": {
          "description": "Company domain",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "id": {
          "description": "HG company ID (hex-encoded)",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "name": {
          "description": "Company name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "IntentCompany",
      "type": [
        "object",
        "null"
      ],
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.Company",
      "x-validate": null
    },
    "IntentSummary": {
      "description": "Aggregate summary computed from the fetched signals.",
      "properties": {
        "active_topics_count": {
          "description": "Number of HG topics with active signals",
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "high_signal_topics_count": {
          "description": "Number of HG topics with HIGH signal level",
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "latest_signal_date": {
          "description": "Most recent signal date across both sources",
          "format": "date",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "sources": {
          "additionalProperties": {
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "description": "Count of signals per source (HG, TRUSTRADIUS)",
          "type": "object",
          "x-struct": null,
          "x-validate": null
        },
        "top_context_types": {
          "additionalProperties": {
            "type": "integer",
            "x-struct": null,
            "x-validate": null
          },
          "description": "Frequency of top context types",
          "type": "object",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "IntentSummary",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.Summary",
      "x-validate": null
    },
    "IntentTopic": {
      "description": "An HG topic intent signal.",
      "properties": {
        "buyers_journey_name": {
          "description": "Buyer's journey name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "buyers_journey_names": {
          "description": "Deduped buyer's journey names (populated when granularity is set, null otherwise)",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": [
            "array",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "context_dispositions": {
          "description": "Context dispositions",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "context_type_names": {
          "description": "Context type names",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "country_name": {
          "description": "Country name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "id": {
          "description": "Topic ID",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "last_seen_at": {
          "description": "Last seen date",
          "format": "date",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "location_count": {
          "description": "Number of distinct locations with signal (populated at global/region/country granularity, null otherwise)",
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "location_strength": {
          "description": "Location-based signal strength score",
          "type": [
            "integer",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "name": {
          "description": "Topic display name",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "product_names": {
          "description": "Product names",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        },
        "region_name": {
          "description": "Geographic region name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "score": {
          "description": "Signal score",
          "type": "number",
          "x-struct": null,
          "x-validate": null
        },
        "signal_level": {
          "description": "Signal level (HIGH/MEDIUM/LOW)",
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "source": {
          "description": "Source of the signal",
          "enum": [
            "hg"
          ],
          "type": "string",
          "x-struct": null,
          "x-validate": null
        },
        "state_name": {
          "description": "US state name",
          "type": [
            "string",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "trend": {
          "description": "Signal trend",
          "type": [
            "number",
            "null"
          ],
          "x-struct": null,
          "x-validate": null
        },
        "vendor_names": {
          "description": "Vendor names",
          "items": {
            "type": "string",
            "x-struct": null,
            "x-validate": null
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "title": "IntentTopic",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.TopicItem",
      "x-validate": null
    },
    "IntentTopicsSection": {
      "description": "HG topic intent signals with total count.",
      "properties": {
        "count": {
          "description": "Total matching topics (before pagination)",
          "type": "integer",
          "x-struct": null,
          "x-validate": null
        },
        "data": {
          "items": {
            "$ref": "#/$defs/IntentTopic"
          },
          "type": "array",
          "x-struct": null,
          "x-validate": null
        }
      },
      "required": [
        "data",
        "count"
      ],
      "title": "IntentTopicsSection",
      "type": "object",
      "x-struct": "Elixir.TalariaWeb.Schemas.V2.Intent.Enrich.TopicsSection",
      "x-validate": null
    }
  }
}