{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/my-tv-channel-com/json-schema/my-tv-channel-com-account-status-schema.json",
  "title": "AccountStatus",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/my-tv-channel-com-openapi.yaml#/components/schemas/AccountStatus",
  "type": "object",
  "properties": {
    "user": {
      "type": "object"
    },
    "tier": {
      "type": "string"
    },
    "hasSubscription": {
      "type": "boolean"
    },
    "subscription": {
      "type": "object"
    },
    "limits": {
      "type": "object",
      "description": "The real limits for this account. Read them here rather than hardcoding.",
      "properties": {
        "uploadMinutesPerWeek": {
          "type": "number"
        },
        "streamMinutesPerWeek": {
          "type": "number"
        },
        "liveStreaming": {
          "type": "boolean"
        },
        "manualSchedule": {
          "type": "boolean"
        },
        "publicChannel": {
          "type": "boolean"
        },
        "resolution": {
          "type": "string"
        }
      }
    },
    "quota": {
      "type": "object",
      "description": "Usage over a rolling 7-day window.",
      "properties": {
        "uploadUsedSeconds": {
          "type": "number"
        },
        "uploadLimitSeconds": {
          "type": "number"
        },
        "uploadRemainingSeconds": {
          "type": "number"
        },
        "streamUsedMinutes": {
          "type": "number"
        },
        "streamLimitMinutes": {
          "type": "number"
        },
        "streamRemainingMinutes": {
          "type": "number"
        },
        "window": {
          "type": "string"
        }
      }
    },
    "channels": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/Channel"
          },
          {
            "type": "object",
            "properties": {
              "readyAssetCount": {
                "type": "integer"
              },
              "readyDurationSeconds": {
                "type": "number"
              },
              "meetsLaunchRequirements": {
                "type": "boolean"
              }
            }
          }
        ]
      }
    },
    "launchRequirements": {
      "type": "object",
      "properties": {
        "minReadyAssets": {
          "type": "integer"
        },
        "minReadySeconds": {
          "type": "integer"
        }
      }
    }
  },
  "$defs": {
    "Channel": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "handle": {
          "$ref": "#/$defs/Handle"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "channelType": {
          "type": "string"
        },
        "isPublic": {
          "type": "boolean"
        },
        "category": {
          "type": "string"
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "scheduleStatus": {
          "$ref": "#/$defs/ScheduleStatus"
        },
        "schedule_status": {
          "$ref": "#/$defs/ScheduleStatus",
          "description": "Snake-case alias of `scheduleStatus`; both are returned."
        },
        "watchUrl": {
          "type": "string",
          "format": "uri"
        },
        "launchGaps": {
          "type": "array",
          "description": "What this channel still needs before it can go live, in plain language. Empty once the requirements are met.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Handle": {
      "type": "string",
      "pattern": "^[a-z0-9-]{3,63}$",
      "description": "3–63 characters, lowercase letters, digits and hyphens. Becomes the channel's subdomain — `https://{handle}.my-tv-channel.com` — so treat it as permanent."
    },
    "ScheduleStatus": {
      "type": "string",
      "enum": [
        "inactive",
        "pending",
        "active",
        "error"
      ],
      "description": "`active` means the channel is broadcasting."
    }
  }
}