{
  "description": "A bounded playlist page containing playable tracks or episodes.",
  "type": "object",
  "properties": {
    "playlistId": {
      "title": "MediaId",
      "type": "string",
      "minLength": 1,
      "example": "portos-media://portoperatingsystem.com/spotify/audio/track/Ab123",
      "pattern": "^(portos-media://(portpowered[.]com|portoperatingsystem[.]com)/[a-z][a-z0-9_-]*/(audio|video|image)/[a-z][a-z0-9_-]*/([^/?#\\s]|%[0-9A-Fa-f]{2})+|https?://[^\\s]+|portos://[^\\s]+)$",
      "description": "Exact provider resource identity. The canonical form is portos-media://portoperatingsystem.com/provider/media-type/resource-kind/resource-id, with no URI version. Spotify emits audio track, playlist, album, artist, show and episode identities. The prior authority remains readable. YouTube and YouTube Music share provider youtube, with video/video and video/channel resource kinds. Copy an ID returned by search or library discovery; do not send a search phrase as an ID. See https://portoperatingsystem.com/docs/media.\n"
    },
    "tracks": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Track information",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the track",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "Track name",
            "minLength": 1
          },
          "artists": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Artist information",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for the artist",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "description": "Artist name",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "name"
              ],
              "additionalProperties": false,
              "title": "Artist"
            },
            "description": "Track artists"
          },
          "album": {
            "description": "Track album when supplied by the provider. Omitted for sources such as YouTube videos that do not supply album metadata.",
            "allOf": [
              {
                "type": "object",
                "description": "Album information",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Unique identifier for the album",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "description": "Album name",
                    "minLength": 1
                  },
                  "artists": {
                    "type": "array",
                    "items": {
                      "$ref": "#/properties/tracks/items/properties/artists/items"
                    },
                    "description": "Album artists"
                  }
                },
                "required": [
                  "id",
                  "name",
                  "artists"
                ],
                "additionalProperties": false,
                "title": "Album"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "artists"
        ],
        "additionalProperties": false,
        "title": "Track"
      }
    },
    "episodes": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Provider-qualified podcast episode with selection metadata.",
        "properties": {
          "id": {
            "$ref": "#/properties/playlistId"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "showId": {
            "$ref": "#/properties/playlistId"
          },
          "releaseDate": {
            "type": "string",
            "description": "Provider release date; precision can be year, month or day."
          },
          "releaseDatePrecision": {
            "type": "string",
            "description": "Provider date precision."
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false,
        "title": "PodcastEpisode"
      }
    },
    "nextToken": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "playlistId",
    "tracks",
    "episodes"
  ],
  "additionalProperties": false
}
