{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://nevergreen.io/schema.json",
    "title": "Nevergreen",
    "description": "Nevergreen settings",
    "type": "object",
    "properties": {
        "settings": {
            "type": "object",
            "properties": {
                "showTrayName": {
                    "type": "boolean"
                },
                "showBuildTime": {
                    "type": "boolean"
                },
                "showBuildLabel": {
                    "type": "boolean"
                },
                "showSystemNotifications": {
                    "type": "boolean"
                },
                "playBrokenBuildSoundFx": {
                    "type": "boolean"
                },
                "brokenBuildSoundFx": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "refreshTime": {
                    "type": "number"
                },
                "maxProjectsToShow": {
                    "type": "string",
                    "enum": [
                        "small",
                        "medium",
                        "large",
                        "all"
                    ]
                },
                "clickToShowMenu": {
                    "type": "boolean"
                },
                "showPrognosis": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "sort": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "trays": {
            "type": "object",
            "patternProperties": {
                ".*": {
                    "type": "object",
                    "properties": {
                        "trayId": {
                            "type": "string"
                        },
                        "url": {
                            "type": "string"
                        },
                        "name": {
                            "type": "string"
                        },
                        "serverType": {
                            "type": "string"
                        },
                        "authType": {
                            "type": "string"
                        },
                        "username": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "encryptedPassword": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "encryptedAccessToken": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "timestamp": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "includeNew": {
                            "type": "boolean"
                        }
                    },
                    "required": [
                        "trayId",
                        "url"
                    ],
                    "additionalProperties": false
                }
            }
        },
        "projects": {
            "type": "object",
            "patternProperties": {
                ".*": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "projectId": {
                                "type": "string"
                            },
                            "description": {
                                "type": "string"
                            },
                            "removed": {
                                "type": "boolean"
                            },
                            "isNew": {
                                "type": "boolean"
                            },
                            "trayId": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "projectId",
                            "description",
                            "trayId"
                        ],
                        "additionalProperties": false
                    }
                }
            }
        },
        "success": {
            "type": "array",
            "items": {
                "type": "string"
            },
            "additionalProperties": false
        },
        "selected": {
            "type": "object",
            "patternProperties": {
                ".*": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                },
                "additionalProperties": false
            },
            "additionalProperties": false
        },
        "backup": {
            "type": "object",
            "patternProperties": {
                ".*": {
                    "type": "object",
                    "properties": {
                        "id": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "description": {
                            "type": [
                                "string",
                                "null"
                            ]
                        },
                        "url": {
                            "type": "string"
                        }
                    },
                    "required": [
                        "id",
                        "url"
                    ],
                    "additionalProperties": false
                }
            }
        },
        "appliedMigrations": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "timestamp": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "timestamp"
                ],
                "additionalItems": false
            }
        }
    },
    "additionalProperties": false
}