Files
game-server-watcher/public/game-server-config.schema.json
2023-08-05 16:48:12 +02:00

190 lines
5.8 KiB
JSON

{
"title": "Game Server",
"type": "object",
"required": [
"name",
"type",
"host",
"port"
],
"properties": {
"name": {
"title": "Name",
"type": "string",
"minLength": 1,
"options": {
"grid_columns": 12
}
},
"type": {
"title": "Gamedig type",
"description": "Look for the <i>GameDig Type ID</i> in the <a href=\"https://github.com/gamedig/node-gamedig#games-list\">games list</a>.",
"type": "string",
"minLength": 1,
"options": {
"grid_columns": 6
}
},
"appId": {
"title": "Steam App ID",
"description": "Look for the <i>AppID</i> in the <a href=\"https://steamdb.info/apps/\">apps list</a>.",
"type": "integer",
"minimum": 1,
"format": "number",
"options": {
"grid_columns": 6
}
},
"host": {
"title": "Host name or IP",
"type": "string",
"pattern": "^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$",
"options": {
"grid_columns": 6,
"error_messages": {
"en": {
"error_pattern": "Value must be a valid host name or IP"
}
}
}
},
"port": {
"title": "Port number",
"type": "integer",
"default": 1,
"minimum": 1,
"maximum": 65535,
"format": "number",
"options": {
"grid_columns": 6
}
},
"discord": {
"type": "array",
"title": "Discord channels",
"description": "The simplest way to get a discord channel ID is to enable developer mode in settings, then right clicking on the channel name will give you the <b>Copy ID</b> option.",
"minItems": 0,
"uniqueItems": true,
"items": {
"type": "object",
"title": "Channel",
"required": [
"channelId"
],
"properties": {
"channelId": {
"title": "Channel ID",
"type": "string"
}
}
},
"format": "table",
"options": {
"grid_columns": 12
}
},
"telegram": {
"type": "array",
"title": "Telegram chats",
"description": "The simplest way to get a telegram chat ID is to invite <a target=\"_blank\" href=\"https://telegram.me/getidsbot\">@getidsbot</a> and use <code>/start</code> to make it post (among other data) the chat ID.",
"minItems": 0,
"uniqueItems": true,
"items": {
"type": "object",
"title": "Chat",
"required": [
"chatId"
],
"properties": {
"chatId": {
"type": "string",
"title": "Chat ID"
}
}
},
"format": "table",
"options": {
"grid_columns": 12
}
},
"graphHistoryHours": {
"title": "Graph history time span (hours)",
"type": "integer",
"default": 12,
"minimum": 1,
"maximum": 24,
"format": "range",
"options": {
"grid_columns": 12
}
},
"timezoneOffset": {
"title": "Time zone offset of the server",
"default": 0,
"type": "number",
"minimum": -12,
"maximum": 14,
"format": "range",
"options": {
"grid_columns": 6
}
},
"givenPortOnly": {
"title": "givenPortOnly",
"description": "Only attempt to query server on given port.",
"type": "boolean",
"options": {
"grid_columns": 6
}
},
"requestRules": {
"title": "requestRules (Valve)",
"description": "Additional server info may be fetched into the <code>raw</code> field.",
"type": "boolean",
"options": {
"grid_columns": 6
}
},
"teamspeakQueryPort": {
"title": "teamspeakQueryPort (TeamSpeak 3)",
"type": "integer",
"minimum": 1,
"maximum": 65535,
"format": "number",
"options": {
"grid_columns": 6
}
},
"guildId": {
"title": "guildId (Discord)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"login": {
"title": "login (Nadeo)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"password": {
"title": "password (Nadeo)",
"type": "string",
"options": {
"grid_columns": 6
}
},
"token": {
"title": "token (Terraria)",
"type": "string",
"options": {
"grid_columns": 6
}
}
},
"format": "grid",
"headerTemplate": "{{#self.name}}{{self.name}}{{/self.name}}{{^self.name}}{{self.type}}:{{self.host}}:{{self.port}}{{/self.name}}"
}