feat: most of the schemas done

This commit is contained in:
2026-09-02 18:05:49 +00:00
parent 0753703351
commit 6381c27c48
62 changed files with 1101 additions and 46 deletions
@@ -0,0 +1,31 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/ams_change_filament.schema.json",
"title": "AmsChangeFilamentReport",
"description": "Perform filament change using AMS",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "ams_change_filament" },
"target": {
"type": "integer",
"description": "Filament tray ID",
"minimum": 0
},
"curr_temp": {
"type": "integer",
"description": "Old print temperature",
"minimum": 0
},
"tar_temp": {
"type": "integer",
"description": "New print temperature",
"minimum": 0
}
},
"required": ["target", "curr_temp", "tar_temp"]
}
]
}
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/ams_control.schema.json",
"title": "AmsControlReport",
"description": "Control AMS Unit",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "ams_control" },
"param": { "type": "string", "enum": ["resume", "reset", "pause"] }
},
"required": ["param"]
}
]
}
@@ -0,0 +1,26 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/ams_filament_setting.schema.json",
"title": "AmsFilamentSettingReport",
"description": "Change AMS settings of the given unit",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "ams_filament_setting" },
"ams_id": { "type": "integer", "minimum": 0 },
"tray_id": { "type": "integer", "minimum": 0 },
"tray_info_idx": { "type": "string" },
"tray_color": { "$ref": "../../../common/color_hex.schema.json" },
"nozzle_temp_min": { "type": "integer", "minimum": 0 },
"nozzle_temp_max": { "type": "integer", "minimum": 0 },
"tray_type": { "type": "string" }
},
"required": [
"ams_id", "tray_id", "tray_info_idx", "tray_color",
"nozzle_temp_min", "nozzle_temp_max", "tray_type"
]
}
]
}
@@ -0,0 +1,18 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/ams_get_rfid.schema.json",
"title": "AmsGetRfidReport",
"description": "Read RFID info of filament",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "ams_get_rfid" },
"ams_id": { "type": "integer", "minimum": 0 },
"ams_slot": { "type": "integer", "minimum": 0 }
},
"required": ["ams_id", "ams_slot"]
}
]
}
@@ -0,0 +1,19 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/ams_user_setting.schema.json",
"title": "AmsUserSettingReport",
"description": "Change AMS settings of the given unit",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "ams_user_setting" },
"ams_id": { "type": "integer", "minimum": 0 },
"startup_read_option": { "type": "boolean" },
"tray_read_option": { "type": "boolean" }
},
"required": ["ams_id", "startup_read_option", "tray_read_option"]
}
]
}
@@ -0,0 +1,16 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/print_option.schema.json",
"title": "PrintOptionReport",
"description": "Modifies printer's print mode.",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "print_option" },
"auto_recovery": { "type": "boolean" }
}
}
]
}
@@ -0,0 +1,58 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/project_file.schema.json",
"title": "PrintProjectFileReport",
"description": "Print project file",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "project_file" },
"param": { "type": "string" },
"project_id": { "type": "string", "description": "\"0\" for local prints" },
"profile_id": { "type": "string", "description": "\"0\" for local prints" },
"task_id": { "type": "string", "description": "\"0\" for local prints" },
"subtask_id": { "type": "string", "description": "\"0\" for local prints" },
"subtask_name": { "type": "string", "description": "Empty string for local prints" },
"file": { "type": "string", "description": "File name to print - may be empty string if `url` field already contains the file name" },
"url": { "$ref": "../../../common/file_url.schema.json" },
"md5": { "type": "string", "description": "MD5 hash of the project file. Can be empty" },
"timelapse": { "type": "boolean" },
"bed_type": { "$ref": "../../common/bed_type.schema.json" },
"bed_levelling": { "type": "boolean" },
"flow_cali": { "type": "boolean" },
"vibration_cali": { "type": "boolean" },
"layer_inspect": { "type": "boolean" },
"ams_mapping": {
"oneOf": [
{ "$ref": "../../common/ams/ams_mapping.schema.json" },
{ "type": "string" }
]
},
"use_ams": { "type": "boolean" }
},
"required": ["param"],
"anyOf": [{ "required": ["file"] }, { "required": ["url"] }]
},
{
"oneOf": [
{
"type": "object",
"properties": {
"ams_mapping": { "$ref": "../../common/ams/ams_mapping.schema.json" },
"use_ams": true
},
"required": ["ams_mapping", "use_ams"]
},
{
"type": "object",
"properties": {
"ams_mapping": { "type": "string", "const": "" },
"use_ams": false
}
}
]
}
]
}
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/print.schema.json",
"title": "PrintReport",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/push_status.schema.json",
"title": "PushStatusReport",
"description": "The ongoing print-state push (root key \"print\") - NOT a direct reply to the pushall request (that goes to \"pushing\", see request/pushing/pushall.schema.json). Sending pushall makes the printer start/refresh this stream; it isn't itself request/response, which is also why this is its own category folder rather than sitting under pushing/ - a category here is 'what root key does this arrive under', not 'what triggered it'.",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
@@ -35,7 +35,7 @@
"big_fan1_speed": { "type": "string" },
"big_fan2_speed": { "type": "string" },
"s_obj": { "type": "array", "items": {} },
"s_obj": { "type": "array", "items": { "type": "number" } },
"filam_bak": { "type": "array", "items": {} },
"stg": { "type": "array", "items": { "type": "number" } },
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/print/stop.schema.json",
"title": "StopPrintRequest",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/stop.schema.json",
"title": "StopPrintReport",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
@@ -0,0 +1,50 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/system/ledctrl.schema.json",
"title": "LedctrlReport",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "ledctrl" },
"led_node": { "$ref": "../../common/led_node.schema.json" }
},
"required": ["led_node"]
},
{
"oneOf": [
{
"type": "object",
"properties": {
"led_mode": {
"type": "string",
"enum": ["on", "off", "ON", "OFF"]
}
},
"required": ["led_mode"]
},
{
"type": "object",
"properties": {
"led_mode": {
"type": "string",
"enum": ["flashing", "FLASHING"]
},
"led_on_time": { "type": "integer", "minimum": 1 },
"led_off_time": { "type": "integer", "minimum": 1 },
"loop_times": { "type": "integer", "minimum": 1 },
"interval_time": { "type": "integer", "minimum": 1 }
},
"required": [
"led_mode",
"led_on_time",
"led_off_time",
"loop_times",
"interval_time"
]
}
]
}
]
}