{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-sdk-product-analytics-overview-response-schema.json",
  "title": "SdkProductAnalyticsOverviewResponse",
  "description": "Complete bounded product-analytics overview response.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-product-analytics-api-openapi.yml#/components/schemas/SdkProductAnalyticsOverviewResponse",
  "properties": {
    "analysis_level": {
      "$ref": "#/$defs/SdkProductAnalyticsAnalysisLevelResponse",
      "description": "Strongest analysis supported by current capture coverage."
    },
    "classified_activity": {
      "$ref": "#/$defs/SdkProductAnalyticsClassifiedActivityResponse",
      "description": "Explicitly classified page views, screen views, and interactions."
    },
    "coverage": {
      "$ref": "#/$defs/SdkProductAnalyticsCoverageResponse",
      "description": "Truthful capture and result coverage."
    },
    "detail": {
      "anyOf": [
        {
          "$ref": "#/$defs/SdkProductAnalyticsDetailResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Version 4: sessions of every top exact event in the previous period, with example sessions."
    },
    "estimation": {
      "$ref": "#/$defs/SdkProductAnalyticsEstimationResponse",
      "description": "Accuracy contract for unique counts."
    },
    "next_action": {
      "$ref": "#/$defs/SdkProductAnalyticsNextActionResponse",
      "description": "Stable recommended follow-up."
    },
    "purpose": {
      "description": "Product-level explanation of what this resource answers.",
      "type": "string"
    },
    "query": {
      "$ref": "#/$defs/SdkProductAnalyticsQueryResponse",
      "description": "Normalized effective query."
    },
    "schema_version": {
      "description": "Stable response schema for exact machine consumers.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": "integer"
    },
    "series": {
      "description": "Ordered non-empty activity buckets.",
      "items": {
        "$ref": "#/$defs/SdkProductAnalyticsPointResponse"
      },
      "type": "array"
    },
    "summary": {
      "$ref": "#/$defs/SdkProductAnalyticsSummaryResponse",
      "description": "Aggregate activity summary."
    },
    "top_actions": {
      "description": "Highest-volume action names, bounded by the query.",
      "items": {
        "$ref": "#/$defs/SdkProductAnalyticsTopActionResponse"
      },
      "type": "array"
    }
  },
  "required": [
    "schema_version",
    "query",
    "purpose",
    "analysis_level",
    "summary",
    "coverage",
    "estimation",
    "series",
    "top_actions",
    "classified_activity",
    "next_action"
  ],
  "type": "object",
  "$defs": {
    "SdkProductAnalyticsAnalysisLevelResponse": {
      "description": "Strongest analysis level supported by the matching capture coverage.",
      "oneOf": [
        {
          "const": "no_data",
          "description": "No matching action events exist.",
          "type": "string"
        },
        {
          "const": "event_only",
          "description": "Event volume is available, but explicit user and session analysis is not.",
          "type": "string"
        },
        {
          "const": "user_level",
          "description": "Explicit active-user analysis is available, but session analysis is not.",
          "type": "string"
        },
        {
          "const": "user_and_session",
          "description": "Explicit active-user and session analysis are both available.",
          "type": "string"
        }
      ]
    },
    "SdkProductAnalyticsBreakdownValueResponse": {
      "description": "Exact property value that defines one breakdown group.",
      "properties": {
        "property_key": {
          "description": "Standard-context or `tag.`-prefixed property key.",
          "type": "string"
        },
        "value": {
          "description": "Exact captured value; absent for units that never carried the key.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "property_key"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsClassifiedActivityResponse": {
      "description": "Explicit version-1 page, screen, and interaction analytics.",
      "properties": {
        "coverage": {
          "$ref": "#/$defs/SdkProductAnalyticsClassifiedCoverageResponse",
          "description": "Capture and result coverage for this classified subset."
        },
        "series": {
          "description": "Ordered non-empty classified activity buckets.",
          "items": {
            "$ref": "#/$defs/SdkProductAnalyticsClassifiedPointResponse"
          },
          "type": "array"
        },
        "summary": {
          "$ref": "#/$defs/SdkProductAnalyticsClassifiedSummaryResponse",
          "description": "Aggregate classified event counts."
        },
        "top_events": {
          "description": "Highest-volume exact classified event names for funnel construction.",
          "items": {
            "$ref": "#/$defs/SdkProductAnalyticsTopEventResponse"
          },
          "type": "array"
        },
        "top_surfaces": {
          "description": "Highest-volume non-empty route templates and screen names.",
          "items": {
            "$ref": "#/$defs/SdkProductAnalyticsTopSurfaceResponse"
          },
          "type": "array"
        }
      },
      "required": [
        "summary",
        "coverage",
        "series",
        "top_surfaces",
        "top_events"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsClassifiedCoverageResponse": {
      "description": "Capture quality and result coverage for explicitly classified product activity.",
      "properties": {
        "action_classification_rate": {
          "description": "Fraction of matching action rows carrying a supported classification.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "classified_actions": {
          "description": "Action rows represented by a supported screen-view or interaction classification.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "event_name_rate": {
          "description": "Fraction of classified events carrying an exact derived event name.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "expected_buckets": {
          "description": "Maximum possible time buckets in the selected range.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "first_seen_at": {
          "description": "Earliest matching classified event.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "identification_rate": {
          "description": "Fraction eligible under the selected identified-user semantics.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "identified_events": {
          "description": "Classified events eligible for identified-user analysis under the selected response\nversion.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "last_seen_at": {
          "description": "Latest matching classified event.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "limitations": {
          "description": "Material limitations clients should disclose with classified analytics.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "named_events": {
          "description": "Classified events carrying an exact derived event name.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "returned_points": {
          "description": "Non-empty classified time buckets actually returned.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "returned_top_events": {
          "description": "Top exact classified event names actually returned.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "returned_top_surfaces": {
          "description": "Top non-empty surfaces actually returned.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sessionization_rate": {
          "description": "Fraction of classified events carrying an explicit session ID.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "sessionized_events": {
          "description": "Classified events carrying an explicit opaque session ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "subject_coverage": {
          "anyOf": [
            {
              "$ref": "#/$defs/SdkProductAnalyticsSubjectCoverageResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Exhaustive version-2 evidence for which events can contribute to identified-user analysis."
        },
        "surface_rate": {
          "description": "Fraction of classified events carrying a stable surface.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "surfaced_events": {
          "description": "Classified events carrying a stable non-empty surface.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "top_events_truncated": {
          "description": "Whether lower-volume exact event names were omitted by `top_limit`.",
          "type": "boolean"
        },
        "top_surfaces_truncated": {
          "description": "Whether lower-volume surfaces were omitted by `top_limit`.",
          "type": "boolean"
        },
        "trace_link_rate": {
          "description": "Fraction of classified events carrying a trace ID.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "traced_events": {
          "description": "Classified events carrying a trace ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "unclassified_actions": {
          "description": "Matching action rows without a supported version-1 classification.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "classified_actions",
        "unclassified_actions",
        "surfaced_events",
        "named_events",
        "identified_events",
        "sessionized_events",
        "traced_events",
        "expected_buckets",
        "returned_points",
        "returned_top_surfaces",
        "returned_top_events",
        "top_surfaces_truncated",
        "top_events_truncated",
        "limitations"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsClassifiedPointResponse": {
      "description": "One non-empty time bucket split by the supported product-analytics kinds.",
      "properties": {
        "bucket_end": {
          "description": "Exclusive UTC bucket end.",
          "format": "date-time",
          "type": "string"
        },
        "bucket_start": {
          "description": "Inclusive UTC bucket start.",
          "format": "date-time",
          "type": "string"
        },
        "events": {
          "description": "All classified events in the bucket.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "interactions": {
          "description": "Interactions in the bucket.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "page_views": {
          "description": "Page views in the bucket.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "screen_views": {
          "description": "Screen views in the bucket.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "bucket_start",
        "bucket_end",
        "events",
        "page_views",
        "screen_views",
        "interactions"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsClassifiedSummaryResponse": {
      "description": "Aggregate counts for events carrying the supported versioned analytics vocabulary.",
      "properties": {
        "active_anonymous_subjects": {
          "description": "Approximate unique typed anonymous subjects, reported separately from users in version 2.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "active_identified_users": {
          "description": "Approximate unique eligible actor IDs; v2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "distinct_event_names": {
          "description": "Approximate unique non-empty exact classified event names.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "distinct_surfaces": {
          "description": "Approximate unique non-empty route templates and screen names.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "events": {
          "description": "All supported classified events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "interactions": {
          "description": "Explicit product interaction actions.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "page_views": {
          "description": "Browser page-view spans.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "screen_views": {
          "description": "Application screen-view actions.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sessions": {
          "description": "Approximate unique explicit session IDs across classified events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "events",
        "page_views",
        "screen_views",
        "interactions",
        "distinct_surfaces",
        "distinct_event_names",
        "active_identified_users",
        "sessions"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsCoverageResponse": {
      "description": "Capture and result coverage that qualifies the product-analytics summary.",
      "properties": {
        "anonymous_actions": {
          "description": "Actions not eligible for identified-user analysis under the selected response version.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "expected_buckets": {
          "description": "Maximum possible time buckets in the selected range.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "first_seen_at": {
          "description": "Earliest matching action.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "identification_rate": {
          "description": "Fraction of matching actions eligible under the selected identified-user semantics.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "identified_actions": {
          "description": "Actions eligible for identified-user analysis under the selected response version.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "last_seen_at": {
          "description": "Latest matching action.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "limitations": {
          "description": "Material data limitations that clients should disclose.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "returned_points": {
          "description": "Non-empty time buckets actually returned.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "returned_top_actions": {
          "description": "Top action names actually returned.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sessionization_rate": {
          "description": "Fraction of matching actions carrying a session ID.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "sessionized_actions": {
          "description": "Actions carrying a non-empty explicit session ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "subject_coverage": {
          "anyOf": [
            {
              "$ref": "#/$defs/SdkProductAnalyticsSubjectCoverageResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Exhaustive version-2 evidence for which events can contribute to identified-user analysis."
        },
        "top_actions_truncated": {
          "description": "Whether lower-volume action names were omitted by `top_limit`.",
          "type": "boolean"
        },
        "trace_link_rate": {
          "description": "Fraction of matching actions carrying a trace ID.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "traced_actions": {
          "description": "Actions carrying a non-empty trace ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "identified_actions",
        "anonymous_actions",
        "sessionized_actions",
        "traced_actions",
        "expected_buckets",
        "returned_points",
        "returned_top_actions",
        "top_actions_truncated",
        "limitations"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsDetailGroupResponse": {
      "description": "One number of the result with its previous-period value and supporting units.",
      "properties": {
        "base_units": {
          "description": "Denominator of `rate` in the selected period, such as entered or eligible units.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "breakdown": {
          "anyOf": [
            {
              "$ref": "#/$defs/SdkProductAnalyticsBreakdownValueResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Property value that defines this group when the result is broken down by a property."
        },
        "change": {
          "description": "`units` minus `previous_units`.",
          "format": "int64",
          "type": "integer"
        },
        "change_rate": {
          "description": "Relative change; absent when the previous value is zero.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "events": {
          "description": "Matching events behind this number, when events are counted separately from units.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "key": {
          "description": "Stable machine key, unique inside the response.",
          "type": "string"
        },
        "label": {
          "description": "Short human-readable label.",
          "type": "string"
        },
        "previous_rate": {
          "description": "The same rate for the previous period.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "previous_units": {
          "description": "The same number for the previous period of equal length.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "rate": {
          "description": "`units` divided by `base_units`.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "rate_change_p_value": {
          "description": "Two-sided p-value of a two-proportion z-test of `rate` against `previous_rate`; absent\nwhen either period has no base units, a rate is above 1, or both rates are 0 or 1.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "rate_change_significant": {
          "description": "Whether `rate_change_p_value` is below 0.05.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "units": {
          "description": "Units behind this number in the selected period.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "key",
        "label",
        "units",
        "previous_units",
        "change",
        "examples"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsDetailResponse": {
      "description": "Previous-period comparison, sample size, and supporting units for one result.",
      "properties": {
        "evidence_hint": {
          "description": "How to read the actions, page views, and traces behind an example.",
          "type": "string"
        },
        "example_limit": {
          "description": "Most examples listed for one group.",
          "format": "uint8",
          "maximum": 255,
          "minimum": 0,
          "type": "integer"
        },
        "groups": {
          "description": "One entry for each number in the result.",
          "items": {
            "$ref": "#/$defs/SdkProductAnalyticsDetailGroupResponse"
          },
          "type": "array"
        },
        "previous_sample_size": {
          "description": "The same population in the previous period.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "previous_since": {
          "description": "Inclusive start of the previous period, which has the selected period's length.",
          "format": "date-time",
          "type": "string"
        },
        "previous_until": {
          "description": "Exclusive end of the previous period, equal to the selected `since`.",
          "format": "date-time",
          "type": "string"
        },
        "sample_size": {
          "description": "Units in the population behind the headline result.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "unit": {
          "$ref": "#/$defs/SdkProductAnalyticsUnit",
          "description": "Unit that every group counts and every example names."
        }
      },
      "required": [
        "unit",
        "previous_since",
        "previous_until",
        "sample_size",
        "previous_sample_size",
        "example_limit",
        "groups",
        "evidence_hint"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsEstimationResponse": {
      "description": "Cardinality-estimation contract for unique user, session, and action-name counts.",
      "properties": {
        "description": {
          "description": "Human- and agent-readable accuracy explanation.",
          "type": "string"
        },
        "method": {
          "description": "Versioned estimation method; version 3 uses `approximate_distinct`.",
          "type": "string"
        },
        "unique_counts_are_approximate": {
          "description": "Whether unique actor, session, and action-name counts are estimates.",
          "type": "boolean"
        }
      },
      "required": [
        "unique_counts_are_approximate",
        "method",
        "description"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsExampleUnitResponse": {
      "description": "One unit behind a number, with links to its own evidence.",
      "properties": {
        "action_ids": {
          "description": "Up to three product action IDs of this unit inside the selected scope.",
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        "first_seen_at": {
          "description": "First classified event of this unit inside the selected scope.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "last_seen_at": {
          "description": "Last classified event of this unit inside the selected scope.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "trace_ids": {
          "description": "Up to three trace IDs of this unit inside the selected scope; page views live here.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "unit_id": {
          "description": "Opaque session ID or user-subject ID exactly as the application captured it.",
          "type": "string"
        }
      },
      "required": [
        "unit_id",
        "action_ids",
        "trace_ids"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsNextActionResponse": {
      "description": "Stable follow-up guidance for improving or investigating product analytics.",
      "properties": {
        "code": {
          "description": "Stable action code.",
          "type": "string"
        },
        "reason": {
          "description": "Why the follow-up is useful.",
          "type": "string"
        },
        "target": {
          "description": "API or capture resource to use next.",
          "type": "string"
        }
      },
      "required": [
        "code",
        "target",
        "reason"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsPointResponse": {
      "description": "One non-empty time bucket of product activity.",
      "properties": {
        "actions": {
          "description": "Matching action events in the bucket.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "active_identified_users": {
          "description": "Approximate unique eligible actors; v2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "bucket_end": {
          "description": "Exclusive UTC bucket end.",
          "format": "date-time",
          "type": "string"
        },
        "bucket_start": {
          "description": "Inclusive UTC bucket start.",
          "format": "date-time",
          "type": "string"
        },
        "identified_actions": {
          "description": "Actions eligible for identified-user analysis under the selected response version.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sessionized_actions": {
          "description": "Actions carrying explicit session IDs.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sessions": {
          "description": "Approximate unique sessions active in the bucket.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "traced_actions": {
          "description": "Actions carrying trace IDs.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "bucket_start",
        "bucket_end",
        "actions",
        "active_identified_users",
        "sessions",
        "identified_actions",
        "sessionized_actions",
        "traced_actions"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsQueryResponse": {
      "description": "Normalized query echoed in a product-analytics response.",
      "properties": {
        "environment": {
          "description": "Optional exact environment filter.",
          "type": [
            "string",
            "null"
          ]
        },
        "interval": {
          "description": "Stable display token for the effective bucket interval.",
          "type": "string"
        },
        "interval_seconds": {
          "description": "Effective bucket interval in seconds.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "project_id": {
          "description": "Exact project queried.",
          "format": "uuid",
          "type": "string"
        },
        "release": {
          "description": "Optional exact release filter.",
          "type": [
            "string",
            "null"
          ]
        },
        "service_name": {
          "description": "Optional exact service filter.",
          "type": [
            "string",
            "null"
          ]
        },
        "since": {
          "description": "Inclusive UTC lower bound.",
          "format": "date-time",
          "type": "string"
        },
        "top_limit": {
          "description": "Maximum top action, surface, and exact classified event names requested per list.",
          "format": "uint8",
          "maximum": 255,
          "minimum": 0,
          "type": "integer"
        },
        "until": {
          "description": "Exclusive UTC upper bound.",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "project_id",
        "since",
        "until",
        "interval",
        "interval_seconds",
        "top_limit"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsSubjectCoverageResponse": {
      "description": "Exhaustive subject-kind coverage for one product-analytics event population.",
      "properties": {
        "anonymous_subject_events": {
          "description": "Events with a typed anonymous subject and usable opaque ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "historical_unindexed_events": {
          "description": "Historical events captured before subject-kind indexing.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "identified_user_events": {
          "description": "Events with a typed user subject and usable opaque ID.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "index_version": {
          "description": "Current subject-kind extraction contract.",
          "format": "uint8",
          "maximum": 255,
          "minimum": 0,
          "type": "integer"
        },
        "legacy_unknown_kind_events": {
          "description": "Events with a legacy actor ID but no typed subject kind.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "missing_subject_events": {
          "description": "Current-index events without a usable subject identity.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "index_version",
        "identified_user_events",
        "anonymous_subject_events",
        "legacy_unknown_kind_events",
        "missing_subject_events",
        "historical_unindexed_events"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsSummaryResponse": {
      "description": "Aggregate product-usage summary for the selected half-open window.",
      "properties": {
        "actions": {
          "description": "Matching product action events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "actions_per_identified_user": {
          "description": "Matching eligible actions per approximate active actor; v2 uses typed-user subjects.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "actions_per_session": {
          "description": "Sessionized matching actions per approximate session.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "active_anonymous_subjects": {
          "description": "Approximate unique typed anonymous subjects, reported separately from users in version 2.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "active_identified_users": {
          "description": "Approximate unique eligible actor IDs; v2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "distinct_action_names": {
          "description": "Approximate distinct action names represented by matching actions.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "sessions": {
          "description": "Approximate unique non-empty session IDs represented by matching actions.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "actions",
        "active_identified_users",
        "sessions",
        "distinct_action_names"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsTopActionResponse": {
      "description": "One bounded top action-name aggregate.",
      "properties": {
        "actions": {
          "description": "Matching action events with this name.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "active_identified_users": {
          "description": "Approximate unique eligible actors; v2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "name": {
          "description": "Exact stored action name.",
          "type": "string"
        },
        "sessions": {
          "description": "Approximate unique sessions containing this action.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "share_of_actions": {
          "description": "Fraction of all matching actions represented by this name.",
          "format": "double",
          "type": "number"
        }
      },
      "required": [
        "name",
        "actions",
        "active_identified_users",
        "sessions",
        "share_of_actions"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsTopEventResponse": {
      "description": "One bounded exact classified event name suitable for funnel construction.",
      "properties": {
        "active_identified_users": {
          "description": "Approximate unique eligible actor IDs; v2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "event_name": {
          "description": "Stable route template, screen name, or bounded action name.",
          "type": "string"
        },
        "events": {
          "description": "Matching classified events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "kind": {
          "description": "`page_view`, `screen_view`, or `interaction`.",
          "type": "string"
        },
        "sessions": {
          "description": "Approximate unique explicit sessions reaching this event.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "share_of_classified_events": {
          "description": "Fraction of all classified events represented by this exact event key.",
          "format": "double",
          "type": "number"
        }
      },
      "required": [
        "kind",
        "event_name",
        "events",
        "active_identified_users",
        "sessions",
        "share_of_classified_events"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsTopSurfaceResponse": {
      "description": "One bounded route-template or screen-name aggregate.",
      "properties": {
        "active_identified_users": {
          "description": "Approximate unique eligible actor IDs; v2 requires typed-user subject evidence.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "events": {
          "description": "Matching classified events.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "kind": {
          "description": "`page_view`, `screen_view`, or `interaction`.",
          "type": "string"
        },
        "sessions": {
          "description": "Approximate unique explicit sessions on this surface.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "share_of_classified_events": {
          "description": "Fraction of all classified events represented by this surface and kind.",
          "format": "double",
          "type": "number"
        },
        "surface": {
          "description": "Stable route template or app-owned screen name.",
          "type": "string"
        }
      },
      "required": [
        "kind",
        "surface",
        "events",
        "active_identified_users",
        "sessions",
        "share_of_classified_events"
      ],
      "type": "object"
    },
    "SdkProductAnalyticsUnit": {
      "description": "Explicit identity boundary used for aggregate analysis.",
      "oneOf": [
        {
          "const": "session",
          "description": "Count explicit application sessions.",
          "type": "string"
        },
        {
          "const": "identified_user",
          "description": "Count explicit opaque user-subject IDs without returning them.",
          "type": "string"
        }
      ]
    }
  }
}