{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/2x/json-schema/2x-all-streams-list-response-schema.json",
  "title": "AllStreamsListResponse",
  "description": "Response model for listing all streams across all clients.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/2x-streams-api-openapi.yml#/components/schemas/AllStreamsListResponse",
  "properties": {
    "streams": {
      "items": {
        "$ref": "#/$defs/StreamResponse"
      },
      "type": "array",
      "title": "Streams"
    },
    "total": {
      "type": "integer",
      "title": "Total"
    },
    "customerId": {
      "type": "string",
      "title": "Customerid"
    }
  },
  "type": "object",
  "required": [
    "streams",
    "total",
    "customerId"
  ],
  "$defs": {
    "ScoreChange": {
      "properties": {
        "change": {
          "type": "number",
          "title": "Change",
          "description": "Absolute change in score"
        },
        "percentage": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Percentage",
          "description": "Percentage change"
        },
        "previousScore": {
          "type": "number",
          "title": "Previousscore",
          "description": "Score at start of period"
        }
      },
      "type": "object",
      "required": [
        "change",
        "previousScore"
      ],
      "title": "ScoreChange",
      "description": "Score change over a time period."
    },
    "ScoreChanges": {
      "properties": {
        "7day": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScoreChange"
            },
            {
              "type": "null"
            }
          ],
          "description": "7-day change"
        },
        "30day": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScoreChange"
            },
            {
              "type": "null"
            }
          ],
          "description": "30-day change"
        }
      },
      "type": "object",
      "title": "ScoreChanges",
      "description": "Score changes over different time periods."
    },
    "StreamResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "customerId": {
          "type": "string",
          "title": "Customerid"
        },
        "parentClientId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Parentclientid"
        },
        "parentClientName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Parentclientname"
        },
        "score": {
          "type": "number",
          "title": "Score"
        },
        "streamState": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Streamstate",
          "description": "Stream status: pending, active, or inactive"
        },
        "goals": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Goals",
          "description": "Stream goals/objectives"
        },
        "hasInsufficientData": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Hasinsufficientdata"
        },
        "historicalData": {
          "anyOf": [
            {
              "items": {
                "type": "integer"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Historicaldata"
        },
        "scoreChanges": {
          "anyOf": [
            {
              "$ref": "#/$defs/ScoreChanges"
            },
            {
              "type": "null"
            }
          ],
          "description": "Score changes over time"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "customerId",
        "score"
      ],
      "title": "StreamResponse",
      "description": "Response model for a stream (sub-project within a client)"
    }
  }
}