{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "DeclarativeWorkbenchCatalog"
    },
    "schemaVersion": {
      "type": "number",
      "const": 1
    },
    "tenantScope": {
      "type": "object",
      "properties": {
        "tenantRef": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "ownerRepo": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required": [
            "kind",
            "id",
            "ownerRepo"
          ],
          "additionalProperties": false
        },
        "dataSpaceRef": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "ownerRepo": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required": [
            "kind",
            "id",
            "ownerRepo"
          ],
          "additionalProperties": false
        },
        "teamRef": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "ownerRepo": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            }
          },
          "required": [
            "kind",
            "id",
            "ownerRepo"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "tenantRef",
        "dataSpaceRef"
      ],
      "additionalProperties": false
    },
    "environmentRef": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "ownerRepo": {
          "type": "string",
          "minLength": 1,
          "maxLength": 256
        },
        "visibility": {
          "type": "string",
          "enum": [
            "tenant",
            "global",
            "public"
          ]
        },
        "tenantScope": {
          "type": "object",
          "properties": {
            "tenantRef": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "ownerRepo": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "required": [
                "kind",
                "id",
                "ownerRepo"
              ],
              "additionalProperties": false
            },
            "dataSpaceRef": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "ownerRepo": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "required": [
                "kind",
                "id",
                "ownerRepo"
              ],
              "additionalProperties": false
            },
            "teamRef": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "ownerRepo": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "required": [
                "kind",
                "id",
                "ownerRepo"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "tenantRef",
            "dataSpaceRef"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "kind",
        "id",
        "ownerRepo",
        "visibility"
      ],
      "additionalProperties": false
    },
    "surface": {
      "type": "string",
      "enum": [
        "studio",
        "kernel"
      ]
    },
    "generation": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "entries": {
      "maxItems": 4096,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "workbenchId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "authority": {
            "type": "string",
            "enum": [
              "declarative",
              "legacy",
              "unavailable"
            ]
          },
          "identity": {
            "type": "object",
            "properties": {
              "name": {
                "type": "object",
                "properties": {
                  "defaultLocale": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "values": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "defaultLocale",
                  "values"
                ],
                "additionalProperties": false
              },
              "description": {
                "type": "object",
                "properties": {
                  "defaultLocale": {
                    "type": "string",
                    "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                  },
                  "values": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "pattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-[A-Z]{2}|-\\d{3})?$"
                    },
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "defaultLocale",
                  "values"
                ],
                "additionalProperties": false
              },
              "tags": {
                "default": [],
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                }
              },
              "iconRef": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "ownerRepo": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "tenant",
                      "global",
                      "public"
                    ]
                  },
                  "tenantScope": {
                    "type": "object",
                    "properties": {
                      "tenantRef": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "ownerRepo": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "ownerRepo"
                        ],
                        "additionalProperties": false
                      },
                      "dataSpaceRef": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "ownerRepo": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "ownerRepo"
                        ],
                        "additionalProperties": false
                      },
                      "teamRef": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "id": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "ownerRepo": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "kind",
                          "id",
                          "ownerRepo"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "tenantRef",
                      "dataSpaceRef"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "kind",
                  "id",
                  "ownerRepo",
                  "visibility"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "name",
              "tags"
            ],
            "additionalProperties": false
          },
          "order": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "isDefaultCandidate": {
            "type": "boolean"
          },
          "activeReleaseRevisionRef": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "ownerRepo": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "tenant",
                  "global",
                  "public"
                ]
              },
              "tenantScope": {
                "type": "object",
                "properties": {
                  "tenantRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "ownerRepo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "ownerRepo"
                    ],
                    "additionalProperties": false
                  },
                  "dataSpaceRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "ownerRepo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "ownerRepo"
                    ],
                    "additionalProperties": false
                  },
                  "teamRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "ownerRepo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "ownerRepo"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "tenantRef",
                  "dataSpaceRef"
                ],
                "additionalProperties": false
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "schemaVersion": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "contentHash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "kind",
              "id",
              "ownerRepo",
              "visibility",
              "revision",
              "schemaVersion",
              "contentHash"
            ],
            "additionalProperties": false
          },
          "legacyAdapterRevisionRef": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "ownerRepo": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "visibility": {
                "type": "string",
                "enum": [
                  "tenant",
                  "global",
                  "public"
                ]
              },
              "tenantScope": {
                "type": "object",
                "properties": {
                  "tenantRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "ownerRepo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "ownerRepo"
                    ],
                    "additionalProperties": false
                  },
                  "dataSpaceRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "ownerRepo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "ownerRepo"
                    ],
                    "additionalProperties": false
                  },
                  "teamRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      },
                      "ownerRepo": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "id",
                      "ownerRepo"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "tenantRef",
                  "dataSpaceRef"
                ],
                "additionalProperties": false
              },
              "revision": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "schemaVersion": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "contentHash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              }
            },
            "required": [
              "kind",
              "id",
              "ownerRepo",
              "visibility",
              "revision",
              "schemaVersion",
              "contentHash"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "workbenchId",
          "authority",
          "identity",
          "order",
          "isDefaultCandidate"
        ],
        "additionalProperties": false
      }
    },
    "contentHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "rebuildable": {
      "type": "boolean",
      "const": true
    }
  },
  "required": [
    "contract",
    "schemaVersion",
    "tenantScope",
    "environmentRef",
    "surface",
    "generation",
    "entries",
    "contentHash",
    "rebuildable"
  ],
  "additionalProperties": false,
  "$id": "https://schemas.infmonkeys.com/contracts/declarative-workbench-catalog.schema.json",
  "title": "declarative-workbench-catalog"
}
