{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "initialWorkspaceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "revisionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "manifestSha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "readiness": {
      "type": "string",
      "enum": [
        "uploading",
        "validating",
        "indexing",
        "ready",
        "failed"
      ]
    },
    "collaboration": {
      "type": "object",
      "required": [
        "review",
        "settings",
        "permissions",
        "providerSync",
        "revisionKey"
      ],
      "properties": {
        "review": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "draft"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "package"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "guide"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "snapshot"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "preview"
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1000
                }
              },
              "required": [
                "kind",
                "id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "pr"
                },
                "provider": {
                  "enum": [
                    "github",
                    "azure_devops"
                  ]
                },
                "owner": {
                  "type": "string"
                },
                "repo": {
                  "type": "string"
                },
                "projectName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "prNumber": {
                  "type": "integer",
                  "minimum": 1
                }
              },
              "required": [
                "kind",
                "provider",
                "owner",
                "repo",
                "prNumber"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "const": "branch"
                },
                "provider": {
                  "enum": [
                    "github",
                    "azure_devops"
                  ]
                },
                "owner": {
                  "type": "string"
                },
                "repo": {
                  "type": "string"
                },
                "projectName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "branchRef": {
                  "type": "string"
                }
              },
              "required": [
                "kind",
                "provider",
                "owner",
                "repo",
                "branchRef"
              ],
              "additionalProperties": false
            }
          ]
        },
        "settings": {
          "type": "object",
          "required": [
            "version",
            "polls",
            "consensus"
          ],
          "properties": {
            "version": {
              "type": "integer",
              "minimum": 0
            },
            "polls": {
              "type": "boolean"
            },
            "consensus": {
              "type": "object"
            }
          },
          "additionalProperties": false
        },
        "permissions": {
          "type": "object",
          "properties": {
            "comment": {
              "type": "boolean"
            },
            "configure": {
              "type": "boolean"
            },
            "humanSignOff": {
              "type": "boolean"
            }
          }
        },
        "providerSync": {
          "type": "object",
          "properties": {
            "comments": {
              "type": "boolean"
            },
            "pollSnapshots": {
              "type": "boolean"
            },
            "liveVotes": {
              "const": false
            },
            "decisions": {
              "const": false
            }
          }
        },
        "revisionKey": {
          "type": [
            "string",
            "null"
          ]
        },
        "filePaths": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "participants": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "initialWorkspaceId",
    "title",
    "revisionId",
    "version",
    "manifestSha256",
    "readiness"
  ]
}