{
  "type": "object",
  "properties": {
    "schema": {
      "const": "quay.worldpack",
      "type": "string"
    },
    "version": {
      "const": "1.0.0",
      "type": "string"
    },
    "container": {
      "const": "zip-store/1",
      "type": "string"
    },
    "worldId": {
      "type": "string"
    },
    "sceneId": {
      "type": "string"
    },
    "buildId": {
      "type": "string"
    },
    "runtime": {
      "type": "object",
      "properties": {
        "scene": {
          "const": "2.0.0-draft.1",
          "type": "string"
        },
        "wright": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "const": "wright.resolved/1",
              "type": "string"
            }
          ]
        },
        "experience": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "const": "1.0.0",
              "type": "string"
            }
          ]
        },
        "cinematic": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "const": "1.0.0",
              "type": "string"
            }
          ]
        },
        "capabilities": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "scene",
        "wright",
        "experience",
        "cinematic",
        "capabilities"
      ],
      "additionalProperties": false
    },
    "world": {
      "type": "string"
    },
    "topology": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "experience": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "cinematic": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "string"
        }
      ]
    },
    "entry": {
      "type": "object",
      "properties": {
        "room": {
          "type": "string"
        },
        "state": {
          "anyOf": [
            {
              "type": "null"
            },
            {
              "type": "string"
            }
          ]
        }
      },
      "required": ["room", "state"],
      "additionalProperties": false
    },
    "rooms": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "chunk": {
            "type": "string"
          },
          "adjacent": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "objects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": ["id", "chunk", "adjacent", "objects"],
        "additionalProperties": false
      }
    },
    "assets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "scope": {
            "anyOf": [
              {
                "const": "standard",
                "type": "string"
              },
              {
                "const": "user",
                "type": "string"
              },
              {
                "const": "project",
                "type": "string"
              }
            ]
          },
          "projectId": {
            "anyOf": [
              {
                "type": "null"
              },
              {
                "type": "string"
              }
            ]
          },
          "manifestId": {
            "type": "string"
          }
        },
        "required": ["id", "resource", "scope", "projectId", "manifestId"],
        "additionalProperties": false
      }
    },
    "audio": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          }
        },
        "required": ["id", "resource"],
        "additionalProperties": false
      }
    },
    "content": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "resource": {
            "type": "string"
          },
          "mediaType": {
            "type": "string"
          }
        },
        "required": ["id", "resource", "mediaType"],
        "additionalProperties": false
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "licenses": {
          "type": "string"
        },
        "provenance": {
          "type": "string"
        },
        "build": {
          "type": "string"
        }
      },
      "required": ["licenses", "provenance", "build"],
      "additionalProperties": false
    },
    "profiles": {
      "type": "object",
      "properties": {
        "desktop": {
          "type": "string"
        },
        "mobile": {
          "type": "string"
        }
      },
      "required": ["desktop", "mobile"],
      "additionalProperties": false
    },
    "rams": {
      "type": "object",
      "properties": {
        "config": {
          "type": "string"
        },
        "site": {
          "type": "object",
          "properties": {
            "entry": {
              "type": "string"
            },
            "files": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": ["entry", "files"],
          "additionalProperties": false
        }
      },
      "required": ["config"],
      "additionalProperties": false
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "path": {
            "type": "string"
          },
          "hash": {
            "type": "string"
          },
          "bytes": {
            "type": "number"
          },
          "kind": {
            "anyOf": [
              {
                "const": "scene",
                "type": "string"
              },
              {
                "const": "world",
                "type": "string"
              },
              {
                "const": "topology",
                "type": "string"
              },
              {
                "const": "experience",
                "type": "string"
              },
              {
                "const": "cinematic",
                "type": "string"
              },
              {
                "const": "glb",
                "type": "string"
              },
              {
                "const": "audio",
                "type": "string"
              },
              {
                "const": "image",
                "type": "string"
              },
              {
                "const": "content",
                "type": "string"
              },
              {
                "const": "metadata",
                "type": "string"
              },
              {
                "const": "debug",
                "type": "string"
              },
              {
                "const": "rams",
                "type": "string"
              },
              {
                "const": "site",
                "type": "string"
              }
            ]
          },
          "encoding": {
            "anyOf": [
              {
                "const": "json",
                "type": "string"
              },
              {
                "const": "cbor",
                "type": "string"
              },
              {
                "const": "binary",
                "type": "string"
              }
            ]
          },
          "dependencies": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "path",
          "hash",
          "bytes",
          "kind",
          "encoding",
          "dependencies"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "schema",
    "version",
    "container",
    "worldId",
    "sceneId",
    "buildId",
    "runtime",
    "world",
    "topology",
    "experience",
    "cinematic",
    "entry",
    "rooms",
    "assets",
    "audio",
    "metadata",
    "resources"
  ],
  "additionalProperties": false
}
