{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-sdk-combined-signal-volume-response-schema.json",
  "title": "SdkCombinedSignalVolumeResponse",
  "description": "Complete bounded signal-volume response combined across several projects.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-volume-api-openapi.yml#/components/schemas/SdkCombinedSignalVolumeResponse",
  "properties": {
    "coverage": {
      "$ref": "#/$defs/SdkSignalVolumeCoverageResponse",
      "description": "Completeness and evidence qualification."
    },
    "purpose": {
      "description": "Concise product and machine interpretation.",
      "type": "string"
    },
    "query": {
      "$ref": "#/$defs/SdkCombinedSignalVolumeQueryResponse",
      "description": "Normalized query and bucket semantics."
    },
    "schema_version": {
      "description": "Exact response schema.",
      "format": "uint8",
      "maximum": 1,
      "minimum": 1,
      "type": "integer"
    },
    "series": {
      "description": "Fixed-order, independently scalable signal lanes.",
      "items": {
        "$ref": "#/$defs/SdkSignalVolumeSeriesResponse"
      },
      "maxItems": 5,
      "minItems": 5,
      "type": "array"
    }
  },
  "required": [
    "schema_version",
    "query",
    "purpose",
    "series",
    "coverage"
  ],
  "type": "object",
  "$defs": {
    "SdkCombinedSignalVolumeQueryResponse": {
      "description": "Normalized query echoed by the combined signal-volume response.",
      "properties": {
        "bucket_alignment": {
          "$ref": "#/$defs/SdkSignalVolumeBucketAlignment",
          "description": "Query-relative UTC alignment used by every series."
        },
        "bucket_count": {
          "description": "Number of aligned buckets returned per series.",
          "format": "uint64",
          "maximum": 500,
          "minimum": 0,
          "type": "integer"
        },
        "environment": {
          "description": "Optional exact environment filter.",
          "type": [
            "string",
            "null"
          ]
        },
        "interval": {
          "description": "Stable effective interval token.",
          "type": "string"
        },
        "interval_seconds": {
          "description": "Fixed interval width in seconds.",
          "format": "uint64",
          "minimum": 0,
          "type": "integer"
        },
        "project_ids": {
          "description": "Readable projects combined in this result, sorted.",
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        },
        "release": {
          "description": "Optional exact release filter.",
          "type": [
            "string",
            "null"
          ]
        },
        "requested_since": {
          "description": "Original inclusive UTC lower bound before retention policy is applied.",
          "format": "date-time",
          "type": "string"
        },
        "service_name": {
          "description": "Optional exact service filter.",
          "type": [
            "string",
            "null"
          ]
        },
        "since": {
          "description": "Effective inclusive UTC lower bound used for this result.",
          "format": "date-time",
          "type": "string"
        },
        "until": {
          "description": "Effective exclusive UTC upper bound.",
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "project_ids",
        "requested_since",
        "since",
        "until",
        "interval",
        "interval_seconds",
        "bucket_alignment",
        "bucket_count"
      ],
      "type": "object"
    },
    "SdkSignalVolumeBucketAlignment": {
      "description": "Closed alignment semantics shared by every signal lane.",
      "oneOf": [
        {
          "const": "query_relative_utc_half_open",
          "description": "Buckets begin at the effective lower bound and use inclusive-start, exclusive-end UTC\nboundaries; only the final bucket may be shorter than the selected interval.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeCountPrecisionResponse": {
      "description": "Aggregate cardinality precision.",
      "oneOf": [
        {
          "const": "exact",
          "description": "Counts use exact distinct aggregation rather than an estimate.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeCountUnit": {
      "description": "Exact counting unit for one signal lane.",
      "oneOf": [
        {
          "const": "issue_occurrences",
          "description": "Distinct retained issue-event IDs.",
          "type": "string"
        },
        {
          "const": "log_events",
          "description": "Distinct retained log-event IDs.",
          "type": "string"
        },
        {
          "const": "unique_traces_by_first_observed_span",
          "description": "Distinct trace IDs attributed to the first retained span in the selected window.",
          "type": "string"
        },
        {
          "const": "action_events",
          "description": "Distinct retained action-event IDs.",
          "type": "string"
        },
        {
          "const": "metric_points",
          "description": "Distinct retained metric-point IDs.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeCoverageResponse": {
      "description": "Completeness, bounds, retention, and sampling receipt.",
      "properties": {
        "count_precision": {
          "$ref": "#/$defs/SdkSignalVolumeCountPrecisionResponse",
          "description": "Whether aggregate cardinalities are exact or estimated."
        },
        "integer_safety": {
          "$ref": "#/$defs/SdkSignalVolumeIntegerSafetyResponse",
          "description": "Whether serialized counts retain integer precision in JavaScript."
        },
        "javascript_safe_integer_max": {
          "description": "Exact inclusive safe-integer ceiling enforced before serialization.",
          "format": "uint64",
          "maximum": 9007199254740991,
          "minimum": 9007199254740991,
          "type": "integer"
        },
        "limitations": {
          "description": "Stable limitations that materially qualify interpretation.",
          "items": {
            "$ref": "#/$defs/SdkSignalVolumeLimitationResponse"
          },
          "type": "array"
        },
        "max_buckets_per_series": {
          "description": "Hard maximum buckets accepted for one lane.",
          "format": "uint64",
          "maximum": 500,
          "minimum": 500,
          "type": "integer"
        },
        "output_truncation": {
          "$ref": "#/$defs/SdkSignalVolumeOutputTruncationResponse",
          "description": "Whether any aggregate output was clipped by a limit."
        },
        "payload_shape": {
          "$ref": "#/$defs/SdkSignalVolumePayloadShapeResponse",
          "description": "Whether the payload contains aggregate or source-row data."
        },
        "retention": {
          "$ref": "#/$defs/SdkSignalVolumeRetentionResponse",
          "description": "Retention qualification for the effective window."
        },
        "returned_points": {
          "description": "Aligned points returned across all lanes.",
          "format": "uint64",
          "maximum": 2500,
          "minimum": 0,
          "type": "integer"
        },
        "returned_series": {
          "description": "Fixed number of expected and returned signal lanes.",
          "format": "uint8",
          "maximum": 5,
          "minimum": 5,
          "type": "integer"
        },
        "sampling": {
          "$ref": "#/$defs/SdkSignalVolumeSamplingResponse",
          "description": "Sampling qualification for retained counts."
        },
        "storage_evaluation": {
          "$ref": "#/$defs/SdkSignalVolumeStorageEvaluationResponse",
          "description": "Whether all matching retained rows were evaluated."
        }
      },
      "required": [
        "storage_evaluation",
        "output_truncation",
        "payload_shape",
        "count_precision",
        "integer_safety",
        "javascript_safe_integer_max",
        "returned_series",
        "returned_points",
        "max_buckets_per_series",
        "retention",
        "sampling",
        "limitations"
      ],
      "type": "object"
    },
    "SdkSignalVolumeIntegerSafetyResponse": {
      "description": "Serialized integer-safety state.",
      "oneOf": [
        {
          "const": "javascript_safe",
          "description": "Every serialized count is within JavaScript's exact integer range.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeLimitationResponse": {
      "description": "Stable material limitation codes for localized clients and agents.",
      "oneOf": [
        {
          "const": "upstream_sampling_unknown",
          "description": "SDK or collector sampling before ingestion is not represented by stored aggregates.",
          "type": "string"
        },
        {
          "const": "retention_window_clipped",
          "description": "The requested lower bound preceded the configured retention cutoff.",
          "type": "string"
        },
        {
          "const": "release_volume_not_included",
          "description": "Releases are omitted until a durable first-seen release index exists.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeOutputTruncationResponse": {
      "description": "Aggregate output truncation state.",
      "oneOf": [
        {
          "const": "not_truncated",
          "description": "No aggregate row or aligned point was clipped by a response limit.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumePayloadShapeResponse": {
      "description": "Public response payload shape.",
      "oneOf": [
        {
          "const": "aggregate_only",
          "description": "Only counts and bucket boundaries are returned; source telemetry rows are absent.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumePointResponse": {
      "description": "One aligned, zero-filled aggregate bucket.",
      "properties": {
        "bucket_end": {
          "description": "Exclusive UTC bucket end, clipped to the query upper bound.",
          "format": "date-time",
          "type": "string"
        },
        "bucket_start": {
          "description": "Inclusive UTC bucket start.",
          "format": "date-time",
          "type": "string"
        },
        "count": {
          "description": "Exact retained count for the lane's declared unit.",
          "format": "uint64",
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "bucket_start",
        "bucket_end",
        "count"
      ],
      "type": "object"
    },
    "SdkSignalVolumeRetentionResponse": {
      "description": "Retention-policy qualification for the evaluated window.",
      "properties": {
        "cutoff": {
          "description": "Evaluated UTC retention cutoff, when a fixed policy exists.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "policy_days": {
          "description": "Configured retention policy in days, or null when the backend has no fixed policy.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "window_clipped": {
          "description": "Whether the requested lower bound was clipped to the retention cutoff.",
          "type": "boolean"
        }
      },
      "required": [
        "policy_days",
        "window_clipped"
      ],
      "type": "object"
    },
    "SdkSignalVolumeSamplingResponse": {
      "description": "Sampling qualification for retained counts.",
      "properties": {
        "server": {
          "$ref": "#/$defs/SdkSignalVolumeServerSamplingResponse",
          "description": "Server-side aggregation sampling state."
        },
        "upstream": {
          "$ref": "#/$defs/SdkSignalVolumeUpstreamSamplingResponse",
          "description": "Upstream capture sampling knowledge."
        }
      },
      "required": [
        "server",
        "upstream"
      ],
      "type": "object"
    },
    "SdkSignalVolumeSeriesResponse": {
      "description": "One independently scalable signal lane.",
      "properties": {
        "count_unit": {
          "$ref": "#/$defs/SdkSignalVolumeCountUnit",
          "description": "Exact semantic unit used by every point and summary count."
        },
        "non_empty_buckets": {
          "description": "Number of buckets with at least one matching item.",
          "format": "uint64",
          "maximum": 500,
          "minimum": 0,
          "type": "integer"
        },
        "peak": {
          "description": "Largest retained bucket count.",
          "format": "uint64",
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        },
        "points": {
          "description": "Complete aligned series, including explicit zero buckets.",
          "items": {
            "$ref": "#/$defs/SdkSignalVolumePointResponse"
          },
          "maxItems": 500,
          "type": "array"
        },
        "signal": {
          "$ref": "#/$defs/SdkSignalVolumeSignal",
          "description": "Stable signal identity."
        },
        "total": {
          "description": "Sum of the mutually exclusive aligned buckets.",
          "format": "uint64",
          "maximum": 9007199254740991,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "signal",
        "count_unit",
        "total",
        "peak",
        "non_empty_buckets",
        "points"
      ],
      "type": "object"
    },
    "SdkSignalVolumeServerSamplingResponse": {
      "description": "Backend-side sampling state.",
      "oneOf": [
        {
          "const": "not_applied",
          "description": "The aggregate query does not sample stored rows.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeSignal": {
      "description": "Stable signal lane returned by the aggregate summary.",
      "oneOf": [
        {
          "const": "issues",
          "description": "Retained issue occurrences, not grouped issue identities.",
          "type": "string"
        },
        {
          "const": "logs",
          "description": "Retained log events.",
          "type": "string"
        },
        {
          "const": "traces",
          "description": "Unique traces attributed to their first retained span inside the selected window.",
          "type": "string"
        },
        {
          "const": "actions",
          "description": "Retained product-action events.",
          "type": "string"
        },
        {
          "const": "metrics",
          "description": "Retained metric points.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeStorageEvaluationResponse": {
      "description": "Storage evaluation state for the requested retained window.",
      "oneOf": [
        {
          "const": "complete",
          "description": "Every matching retained row was evaluated or the request failed.",
          "type": "string"
        }
      ]
    },
    "SdkSignalVolumeUpstreamSamplingResponse": {
      "description": "Upstream sampling knowledge available to the aggregate query.",
      "oneOf": [
        {
          "const": "unknown",
          "description": "SDK or collector sampling performed before ingestion cannot be reconstructed here.",
          "type": "string"
        }
      ]
    }
  }
}