{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peakcam-io/json-schema/peakcam-io-timelapse-list-schema.json",
  "title": "TimelapseList",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peakcam-io-openapi.json#/components/schemas/TimelapseList",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "canonicalUrl": {
      "type": "string"
    },
    "webcamsUrl": {
      "type": "string",
      "description": "The resort's webcams page, where the clips play."
    },
    "available": {
      "type": "boolean",
      "description": "False when the clip table is not served by this deployment yet."
    },
    "clipCount": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "newestRenderedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "lastStorm": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "window": {
              "type": "string",
              "description": "Which clip: `24h` (rolling day, replaced every render), `storm` (one storm, see `stormDate`), or another label."
            },
            "url": {
              "type": "string",
              "description": "Public MP4 URL (H.264, 7 fps, 720p max, at most 3 MB). Link it; never inline it."
            },
            "posterUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Public JPEG of the clip's last frame, the <video> poster. Null for clips rendered before the poster existed."
            },
            "frames": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "Archived frames in the clip; at 7 fps the duration is frames / 7 seconds."
            },
            "startsAt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Capture time of the first frame (ISO-8601)."
            },
            "endsAt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Capture time of the last frame (ISO-8601)."
            },
            "bytes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ],
              "description": "Size of the MP4."
            },
            "renderedAt": {
              "type": "string",
              "description": "ISO-8601 instant the clip was rendered."
            },
            "stormDate": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "YYYY-MM-DD of the storm a `storm` clip covers."
            },
            "camId": {
              "type": "string"
            },
            "camName": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "window",
            "url",
            "posterUrl",
            "frames",
            "startsAt",
            "endsAt",
            "bytes",
            "renderedAt",
            "stormDate",
            "camId",
            "camName"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "The newest storm reel across the resort's cams."
    },
    "cams": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CamTimelapses"
      },
      "description": "Only cams with at least one clip, in the resort's cam order."
    },
    "note": {
      "type": "string"
    },
    "attribution": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "updatedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "slug",
    "name",
    "canonicalUrl",
    "webcamsUrl",
    "available",
    "clipCount",
    "newestRenderedAt",
    "lastStorm",
    "cams",
    "note",
    "attribution",
    "license",
    "updatedAt"
  ],
  "additionalProperties": false,
  "$defs": {
    "CamKind": {
      "type": "string",
      "enum": [
        "summit",
        "mid",
        "base",
        "snow-stake",
        "village",
        "approach"
      ]
    },
    "CamTimelapse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "window": {
          "type": "string",
          "description": "Which clip: `24h` (rolling day, replaced every render), `storm` (one storm, see `stormDate`), or another label."
        },
        "url": {
          "type": "string",
          "description": "Public MP4 URL (H.264, 7 fps, 720p max, at most 3 MB). Link it; never inline it."
        },
        "posterUrl": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Public JPEG of the clip's last frame, the <video> poster. Null for clips rendered before the poster existed."
        },
        "frames": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ],
          "description": "Archived frames in the clip; at 7 fps the duration is frames / 7 seconds."
        },
        "startsAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Capture time of the first frame (ISO-8601)."
        },
        "endsAt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Capture time of the last frame (ISO-8601)."
        },
        "bytes": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ],
          "description": "Size of the MP4."
        },
        "renderedAt": {
          "type": "string",
          "description": "ISO-8601 instant the clip was rendered."
        },
        "stormDate": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "YYYY-MM-DD of the storm a `storm` clip covers."
        }
      },
      "required": [
        "id",
        "window",
        "url",
        "posterUrl",
        "frames",
        "startsAt",
        "endsAt",
        "bytes",
        "renderedAt",
        "stormDate"
      ],
      "additionalProperties": false
    },
    "CamTimelapses": {
      "type": "object",
      "properties": {
        "camId": {
          "type": "string"
        },
        "camName": {
          "type": "string"
        },
        "pageUrl": {
          "type": "string",
          "description": "The cam's anchor on the resort's webcams page."
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/CamKind"
            },
            {
              "type": "null"
            }
          ]
        },
        "credit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Attribution line for the frames; null means credit the resort."
        },
        "current": {
          "anyOf": [
            {
              "$ref": "#/$defs/CamTimelapse"
            },
            {
              "type": "null"
            }
          ],
          "description": "The rolling 24 h clip; null when none is rendered yet."
        },
        "storms": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CamTimelapse"
          },
          "description": "Storm reels, newest first, at most three."
        }
      },
      "required": [
        "camId",
        "camName",
        "pageUrl",
        "kind",
        "credit",
        "current",
        "storms"
      ],
      "additionalProperties": false
    }
  }
}