{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-native-issue-v5-response-schema.json",
  "title": "NativeIssueV5Response",
  "description": "A grouped issue in response version 5.",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-openapi.json#/components/schemas/NativeIssueV5Response",
  "properties": {
    "archive": {
      "anyOf": [
        {
          "$ref": "#/$defs/IssueArchiveResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "How the issue reopens by itself while it is archived; null for other statuses."
    },
    "assignee": {
      "anyOf": [
        {
          "$ref": "#/$defs/IssueAssigneeV4Response"
        },
        {
          "type": "null"
        }
      ],
      "description": "Current assignee: an account, a team, or null when the issue is unassigned, its\naccount can no longer read the project, or its team was deleted."
    },
    "attributes": {
      "description": "Structured issue attributes."
    },
    "diagnostics": {
      "anyOf": [
        {
          "$ref": "#/$defs/NativeIssueDiagnosticsResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Typed privacy-bounded diagnostic evidence projected from the latest occurrence."
    },
    "environment": {
      "description": "Deployment environment.",
      "type": "string"
    },
    "fingerprint": {
      "description": "Stable grouping fingerprint.",
      "type": "string"
    },
    "first_seen_at": {
      "description": "First time this issue was seen.",
      "format": "date-time",
      "type": "string"
    },
    "id": {
      "description": "Unique issue identifier.",
      "format": "uuid",
      "type": "string"
    },
    "last_seen_at": {
      "description": "Most recent time this issue was seen.",
      "format": "date-time",
      "type": "string"
    },
    "message": {
      "description": "Human-readable issue message.",
      "type": "string"
    },
    "next_action": {
      "$ref": "#/$defs/CorrelatedTelemetryNextActionResponse",
      "description": "Machine-readable next investigation action."
    },
    "occurrence_count": {
      "description": "Number of occurrences in this issue group.",
      "format": "int64",
      "type": "integer"
    },
    "priority": {
      "$ref": "#/$defs/IssuePriority",
      "description": "Effective triage priority."
    },
    "priority_source": {
      "$ref": "#/$defs/IssuePrioritySource",
      "description": "Whether a user set the priority or it is derived from the issue."
    },
    "project_id": {
      "description": "Owning project ID.",
      "format": "uuid",
      "type": "string"
    },
    "release": {
      "description": "Application release.",
      "type": "string"
    },
    "service_name": {
      "description": "Logical service name.",
      "type": "string"
    },
    "severity": {
      "description": "Issue severity.",
      "type": "string"
    },
    "span_id": {
      "description": "Exact span identifier within the distributed trace.",
      "type": [
        "string",
        "null"
      ]
    },
    "stack_trace": {
      "description": "Original stack trace text.",
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "description": "Issue status.",
      "type": "string"
    },
    "symbolication": {
      "anyOf": [
        {
          "$ref": "#/$defs/NativeIssueSymbolicationResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Original source position resolved from release artifacts on issue detail reads."
    },
    "title": {
      "description": "Short issue title.",
      "type": "string"
    },
    "trace_id": {
      "description": "Distributed trace identifier.",
      "type": [
        "string",
        "null"
      ]
    },
    "triage": {
      "anyOf": [
        {
          "$ref": "#/$defs/SignalTriageResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Reversible user triage. `severity` remains the immutable captured value."
    }
  },
  "required": [
    "id",
    "project_id",
    "fingerprint",
    "severity",
    "title",
    "message",
    "stack_trace",
    "attributes",
    "environment",
    "release",
    "service_name",
    "trace_id",
    "next_action",
    "status",
    "occurrence_count",
    "first_seen_at",
    "last_seen_at",
    "priority",
    "priority_source",
    "assignee",
    "archive"
  ],
  "type": "object",
  "$defs": {
    "CorrelatedTelemetryNextActionCode": {
      "description": "Stable correlation-aware investigation action code.",
      "oneOf": [
        {
          "const": "inspect_trace",
          "description": "Inspect the correlated distributed trace.",
          "type": "string"
        },
        {
          "const": "inspect_related_logs",
          "description": "Inspect logs related by project, release, service, and environment.",
          "type": "string"
        }
      ]
    },
    "CorrelatedTelemetryNextActionResponse": {
      "description": "Correlation-aware next action shared by issues, logs, and product actions.",
      "properties": {
        "code": {
          "$ref": "#/$defs/CorrelatedTelemetryNextActionCode",
          "description": "Stable action code."
        },
        "target": {
          "$ref": "#/$defs/CorrelatedTelemetryNextActionTarget",
          "description": "Stable action target."
        }
      },
      "required": [
        "code",
        "target"
      ],
      "type": "object"
    },
    "CorrelatedTelemetryNextActionTarget": {
      "description": "Stable correlation-aware investigation target.",
      "oneOf": [
        {
          "const": "trace_summary",
          "description": "Privacy-safe trace summary endpoint.",
          "type": "string"
        },
        {
          "const": "telemetry_logs",
          "description": "Native telemetry logs endpoint.",
          "type": "string"
        }
      ]
    },
    "IssueArchiveResponse": {
      "description": "How an archived issue reopens by itself.",
      "properties": {
        "count": {
          "description": "For `events` or `users`, how many new ones reopen the issue; for `escalating`, the events\nin one hour that count as escalating; otherwise null.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "reopen_at": {
          "description": "For `time`, when the issue reopens; otherwise null.",
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "until": {
          "$ref": "#/$defs/IssueArchiveUntil",
          "description": "What reopens the issue."
        }
      },
      "required": [
        "until",
        "reopen_at",
        "count"
      ],
      "type": "object"
    },
    "IssueArchiveUntil": {
      "description": "What reopens an archived issue by itself.",
      "oneOf": [
        {
          "const": "forever",
          "description": "Nothing: the issue stays archived until someone changes its status.",
          "type": "string"
        },
        {
          "const": "escalating",
          "description": "One hour with at least twice the events of the issue's busiest hour in the week before\nit was archived, and at least 10.",
          "type": "string"
        },
        {
          "const": "time",
          "description": "A point in time.",
          "type": "string"
        },
        {
          "const": "events",
          "description": "A number of new events.",
          "type": "string"
        },
        {
          "const": "users",
          "description": "A number of new distinct identified users.",
          "type": "string"
        }
      ]
    },
    "IssueAssigneeResponse": {
      "description": "The account an issue is assigned to.",
      "properties": {
        "email": {
          "description": "Account email.",
          "type": "string"
        },
        "name": {
          "description": "Display name, or null when the account has none.",
          "type": [
            "string",
            "null"
          ]
        },
        "user_id": {
          "description": "Account ID.",
          "format": "uuid",
          "type": "string"
        }
      },
      "required": [
        "user_id",
        "name",
        "email"
      ],
      "type": "object"
    },
    "IssueAssigneeV4Response": {
      "description": "Who an issue is assigned to in response version 4.",
      "oneOf": [
        {
          "$ref": "#/$defs/IssueAssigneeResponse",
          "description": "An account that can read the project.",
          "properties": {
            "type": {
              "const": "user",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        },
        {
          "$ref": "#/$defs/IssueTeamResponse",
          "description": "A team of the project's organization.",
          "properties": {
            "type": {
              "const": "team",
              "type": "string"
            }
          },
          "required": [
            "type"
          ],
          "type": "object"
        }
      ]
    },
    "IssuePriority": {
      "description": "Triage priority of a grouped issue.",
      "oneOf": [
        {
          "const": "high",
          "description": "Needs attention first.",
          "type": "string"
        },
        {
          "const": "medium",
          "description": "Needs attention after high-priority issues.",
          "type": "string"
        },
        {
          "const": "low",
          "description": "Can wait.",
          "type": "string"
        }
      ]
    },
    "IssuePrioritySource": {
      "description": "Where an issue's priority comes from.",
      "oneOf": [
        {
          "const": "manual",
          "description": "A user set it; it no longer follows the derived rule.",
          "type": "string"
        },
        {
          "const": "derived",
          "description": "Derived from the issue. `high`: seen in the last 24 hours and harming production now (a\nfatal or critical error, a repeated server error, a failed backup or restore, or a\ncritical vulnerability). `low`: resolved, routine, test, or non-main CI issues, and\nissues not seen for 72 hours. `medium`: every other issue.",
          "type": "string"
        }
      ]
    },
    "IssueTeamResponse": {
      "description": "An organization team that issues can be assigned to.",
      "properties": {
        "name": {
          "description": "Display name.",
          "type": "string"
        },
        "slug": {
          "description": "Unique handle in the organization.",
          "type": "string"
        },
        "team_id": {
          "description": "Team ID.",
          "format": "uuid",
          "type": "string"
        }
      },
      "required": [
        "team_id",
        "slug",
        "name"
      ],
      "type": "object"
    },
    "NativeIssueBreadcrumbResponse": {
      "description": "One privacy-bounded step that happened before an issue occurrence.",
      "properties": {
        "category": {
          "description": "Required low-cardinality source category.",
          "type": "string"
        },
        "data": {
          "additionalProperties": true,
          "description": "At most eight flat primitive fields.",
          "type": "object"
        },
        "level": {
          "description": "Optional canonical severity.",
          "type": [
            "string",
            "null"
          ]
        },
        "message": {
          "description": "Optional bounded display-safe description.",
          "type": [
            "string",
            "null"
          ]
        },
        "timestamp": {
          "description": "When this step occurred.",
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "description": "Optional stable breadcrumb kind.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "timestamp",
        "category"
      ],
      "type": "object"
    },
    "NativeIssueDiagnosticsResponse": {
      "description": "Versioned structured diagnostics projected from one issue occurrence.",
      "properties": {
        "breadcrumbs": {
          "description": "Oldest-to-newest bounded breadcrumb history.",
          "items": {
            "$ref": "#/$defs/NativeIssueBreadcrumbResponse"
          },
          "type": "array"
        },
        "breadcrumbs_truncated": {
          "default": false,
          "description": "Whether older or invalid breadcrumb history was omitted.",
          "type": "boolean"
        },
        "exception": {
          "anyOf": [
            {
              "$ref": "#/$defs/NativeIssueExceptionResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Structured exception identity when available."
        },
        "schema_version": {
          "description": "Additive diagnostics response schema version.",
          "format": "uint8",
          "maximum": 255,
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "schema_version",
        "breadcrumbs_truncated"
      ],
      "type": "object"
    },
    "NativeIssueExceptionMechanismResponse": {
      "description": "Runtime path that captured an exception and whether it escaped that path.",
      "properties": {
        "handled": {
          "description": "Whether the exception was handled by the capture boundary.",
          "type": "boolean"
        },
        "type": {
          "description": "Stable low-cardinality capture mechanism.",
          "type": "string"
        }
      },
      "required": [
        "type",
        "handled"
      ],
      "type": "object"
    },
    "NativeIssueExceptionResponse": {
      "description": "Structured runtime exception identity returned with issue details.",
      "properties": {
        "mechanism": {
          "anyOf": [
            {
              "$ref": "#/$defs/NativeIssueExceptionMechanismResponse"
            },
            {
              "type": "null"
            }
          ],
          "description": "Capture mechanism when the SDK could determine it."
        },
        "type": {
          "description": "Bounded runtime exception class or error type.",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "type": "object"
    },
    "NativeIssueResolvedSourcePosition": {
      "description": "Privacy-safe source position or native function resolved for an issue.",
      "properties": {
        "column": {
          "description": "One-based source column when debug line information is available.",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "line": {
          "description": "One-based source line when debug line information is available.",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "name": {
          "description": "Optional bounded source symbol name.",
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "description": "Relative source path or filename when debug line information is available.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object"
    },
    "NativeIssueSymbolicatedFrameResponse": {
      "description": "One privacy-safe source-map result matched by structured stack-frame index.",
      "properties": {
        "index": {
          "description": "Zero-based index in the SDK-provided `stackFrames` array.",
          "format": "uint",
          "minimum": 0,
          "type": "integer"
        },
        "resolved": {
          "anyOf": [
            {
              "$ref": "#/$defs/NativeIssueResolvedSourcePosition"
            },
            {
              "type": "null"
            }
          ],
          "description": "Safe source position or native function identity when this frame resolves."
        },
        "status": {
          "$ref": "#/$defs/NativeIssueSymbolicationStatus",
          "description": "Stable resolution status for this frame."
        }
      },
      "required": [
        "index",
        "status",
        "resolved"
      ],
      "type": "object"
    },
    "NativeIssueSymbolicationResponse": {
      "description": "Safe issue-detail source-map resolution result.",
      "properties": {
        "frames": {
          "description": "Ordered per-frame results for additive structured SDK stacks.",
          "items": {
            "$ref": "#/$defs/NativeIssueSymbolicatedFrameResponse"
          },
          "type": "array"
        },
        "resolved": {
          "anyOf": [
            {
              "$ref": "#/$defs/NativeIssueResolvedSourcePosition"
            },
            {
              "type": "null"
            }
          ],
          "description": "Safe source position or native function identity when resolution succeeds."
        },
        "status": {
          "$ref": "#/$defs/NativeIssueSymbolicationStatus",
          "description": "Stable resolution status."
        }
      },
      "required": [
        "status",
        "resolved"
      ],
      "type": "object"
    },
    "NativeIssueSymbolicationStatus": {
      "description": "Stable issue-detail source-map resolution status.",
      "oneOf": [
        {
          "const": "resolved",
          "description": "A matching retained artifact resolved a source position or native function.",
          "type": "string"
        },
        {
          "const": "invalid_metadata",
          "description": "Release-artifact metadata was present but incomplete or inconsistent.",
          "type": "string"
        },
        {
          "const": "artifact_not_found",
          "description": "No uploaded artifact matched the issue release identity and Debug ID.",
          "type": "string"
        },
        {
          "const": "source_not_resolved",
          "description": "A matching artifact existed but did not resolve the generated frame.",
          "type": "string"
        },
        {
          "const": "unavailable",
          "description": "Artifact lookup or retained evidence was temporarily unavailable.",
          "type": "string"
        }
      ]
    },
    "SignalTriageResponse": {
      "description": "User-owned presentation rule layered over immutable captured telemetry.",
      "properties": {
        "effective_severity": {
          "description": "Effective presentation severity after applying an optional user override.",
          "type": "string"
        },
        "ignored": {
          "description": "Whether the signal is excluded from the active view.",
          "type": "boolean"
        },
        "rule_applied": {
          "description": "Whether a non-default rule currently applies.",
          "type": "boolean"
        }
      },
      "required": [
        "effective_severity",
        "ignored",
        "rule_applied"
      ],
      "type": "object"
    }
  }
}