{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract": {
      "type": "string",
      "const": "MenuRuntimeBundle"
    },
    "version": {
      "type": "number",
      "const": 1
    },
    "applicationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "sourceVersion": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "contentHash": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "menus": {
      "maxItems": 128,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "surface": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "menuId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "nodes": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "nodeId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "parentNodeId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "order": {
                      "type": "integer",
                      "minimum": -1000000,
                      "maximum": 1000000
                    },
                    "kind": {
                      "type": "string",
                      "const": "group"
                    },
                    "label": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "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
                          }
                        }
                      ]
                    },
                    "iconRef": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "disabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "nodeId",
                    "order",
                    "kind"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "nodeId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "parentNodeId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "order": {
                      "type": "integer",
                      "minimum": -1000000,
                      "maximum": 1000000
                    },
                    "kind": {
                      "type": "string",
                      "const": "divider"
                    }
                  },
                  "required": [
                    "nodeId",
                    "order",
                    "kind"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "nodeId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "parentNodeId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "order": {
                      "type": "integer",
                      "minimum": -1000000,
                      "maximum": 1000000
                    },
                    "kind": {
                      "type": "string",
                      "const": "item"
                    },
                    "label": {
                      "anyOf": [
                        {
                          "type": "string",
                          "minLength": 1
                        },
                        {
                          "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
                          }
                        }
                      ]
                    },
                    "iconRef": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "tone": {
                      "type": "string",
                      "enum": [
                        "default",
                        "danger"
                      ]
                    },
                    "disabled": {
                      "type": "boolean"
                    },
                    "behavior": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "navigate"
                            },
                            "page": {
                              "type": "object",
                              "properties": {
                                "applicationId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "pageId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "required": [
                                "applicationId",
                                "pageId"
                              ],
                              "additionalProperties": false
                            },
                            "activationId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "input": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "exposure": {
                                      "type": "string",
                                      "const": "client"
                                    },
                                    "value": {
                                      "type": "object",
                                      "propertyNames": {
                                        "type": "string"
                                      },
                                      "additionalProperties": {
                                        "$ref": "#/$defs/__schema0"
                                      }
                                    }
                                  },
                                  "required": [
                                    "exposure",
                                    "value"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "exposure": {
                                      "type": "string",
                                      "const": "server"
                                    }
                                  },
                                  "required": [
                                    "exposure"
                                  ],
                                  "additionalProperties": false
                                }
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "page",
                            "activationId"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "action"
                            },
                            "actionRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "input": {
                              "type": "object",
                              "propertyNames": {
                                "type": "string"
                              },
                              "additionalProperties": {
                                "$ref": "#/$defs/__schema0"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "actionRef"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    },
                    "access": {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "default": true,
                          "type": "boolean"
                        },
                        "permissionAllOf": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "permissionAnyOf": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "featureFlags": {
                          "default": [],
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "requiredPermission": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "required": [
                        "authenticated",
                        "permissionAllOf",
                        "permissionAnyOf",
                        "featureFlags"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "nodeId",
                    "order",
                    "kind",
                    "label",
                    "behavior",
                    "access"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "contributions": {
            "maxItems": 1024,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "providerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "parentNodeId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                "order": {
                  "type": "integer",
                  "minimum": -1000000,
                  "maximum": 1000000
                }
              },
              "required": [
                "providerId",
                "order"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "applicationId",
          "surface",
          "menuId",
          "nodes",
          "contributions"
        ],
        "additionalProperties": false
      }
    },
    "navigationTargets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "page": {
            "type": "object",
            "properties": {
              "applicationId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "pageId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              }
            },
            "required": [
              "applicationId",
              "pageId"
            ],
            "additionalProperties": false
          },
          "activationId": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256
          },
          "input": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "exposure": {
                    "type": "string",
                    "const": "client"
                  },
                  "value": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "$ref": "#/$defs/__schema0"
                    }
                  }
                },
                "required": [
                  "exposure",
                  "value"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "exposure": {
                    "type": "string",
                    "const": "server"
                  }
                },
                "required": [
                  "exposure"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "page",
          "activationId"
        ],
        "additionalProperties": false
      }
    },
    "sourceMap": {
      "default": {},
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 1,
        "maxLength": 256
      }
    }
  },
  "required": [
    "contract",
    "version",
    "applicationId",
    "sourceVersion",
    "contentHash",
    "menus",
    "navigationTargets",
    "sourceMap"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  },
  "$id": "https://schemas.infmonkeys.com/contracts/menu-runtime-bundle.schema.json",
  "title": "menu-runtime-bundle"
}
