Update machine-api spec (#3252)

YOYO NEW API SPEC!

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
zoo-github-actions-auth[bot]
2024-08-03 15:25:02 -07:00
committed by GitHub
parent 5825ba575c
commit b0a41c31ac

View File

@ -13,6 +13,18 @@
} }
}, },
"schemas": { "schemas": {
"AccessoryType": {
"description": "The type of accessory.",
"oneOf": [
{
"description": "No accessory.",
"enum": [
"none"
],
"type": "string"
}
]
},
"Error": { "Error": {
"description": "Error information from a response.", "description": "Error information from a response.",
"properties": { "properties": {
@ -33,16 +45,17 @@
"type": "object" "type": "object"
}, },
"Info": { "Info": {
"description": "An info command.",
"oneOf": [
{
"additionalProperties": true, "additionalProperties": true,
"description": "A info message.", "description": "Get the version.",
"properties": { "properties": {
"command": { "command": {
"allOf": [ "enum": [
{ "get_version"
"$ref": "#/components/schemas/InfoCommand"
}
], ],
"description": "The info command." "type": "string"
}, },
"module": { "module": {
"description": "The info module.", "description": "The info module.",
@ -52,14 +65,21 @@
"type": "array" "type": "array"
}, },
"reason": { "reason": {
"allOf": [
{
"$ref": "#/components/schemas/Reason"
}
],
"description": "The reason of the info command.", "description": "The reason of the info command.",
"nullable": true, "nullable": true
"type": "string"
}, },
"result": { "result": {
"description": "The result of the info command.", "allOf": [
"nullable": true, {
"type": "string" "$ref": "#/components/schemas/Result"
}
],
"description": "The result of the info command."
}, },
"sequence_id": { "sequence_id": {
"allOf": [ "allOf": [
@ -73,19 +93,10 @@
"required": [ "required": [
"command", "command",
"module", "module",
"result",
"sequence_id" "sequence_id"
], ],
"type": "object" "type": "object"
},
"InfoCommand": {
"description": "An info command.",
"oneOf": [
{
"description": "Get the version.",
"enum": [
"get_version"
],
"type": "string"
} }
] ]
}, },
@ -132,6 +143,51 @@
], ],
"type": "object" "type": "object"
}, },
"LedMode": {
"description": "The mode for the led.",
"oneOf": [
{
"description": "Turn the LED on.",
"enum": [
"on"
],
"type": "string"
},
{
"description": "Turn the LED off.",
"enum": [
"off"
],
"type": "string"
},
{
"description": "Flash the LED.",
"enum": [
"flashing"
],
"type": "string"
}
]
},
"LedNode": {
"description": "The node for the led.",
"oneOf": [
{
"description": "The chamber light.",
"enum": [
"chamber_light"
],
"type": "string"
},
{
"description": "The work light.",
"enum": [
"work_light"
],
"type": "string"
}
]
},
"Machine": { "Machine": {
"description": "Details for a 3d printer connected over USB.", "description": "Details for a 3d printer connected over USB.",
"oneOf": [ "oneOf": [
@ -373,6 +429,25 @@
} }
] ]
}, },
"NozzleType": {
"description": "A nozzle type.",
"oneOf": [
{
"description": "Hardened steel nozzle.",
"enum": [
"hardened_steel"
],
"type": "string"
},
{
"description": "Stainless steel nozzle.",
"enum": [
"stainless_steel"
],
"type": "string"
}
]
},
"Pong": { "Pong": {
"description": "The response from the `/ping` endpoint.", "description": "The response from the `/ping` endpoint.",
"properties": { "properties": {
@ -387,8 +462,11 @@
"type": "object" "type": "object"
}, },
"Print": { "Print": {
"description": "A print command.",
"oneOf": [
{
"additionalProperties": true, "additionalProperties": true,
"description": "A print message.", "description": "The status of the print.",
"properties": { "properties": {
"ams": { "ams": {
"allOf": [ "allOf": [
@ -411,6 +489,11 @@
"nullable": true, "nullable": true,
"type": "integer" "type": "integer"
}, },
"aux_part_fan": {
"description": "The aux part fan.",
"nullable": true,
"type": "boolean"
},
"bed_target_temper": { "bed_target_temper": {
"description": "The target bed temperature.", "description": "The target bed temperature.",
"format": "double", "format": "double",
@ -440,12 +523,10 @@
"type": "number" "type": "number"
}, },
"command": { "command": {
"allOf": [ "enum": [
{ "push_status"
"$ref": "#/components/schemas/PrintCommand"
}
], ],
"description": "The command." "type": "string"
}, },
"cooling_fan_speed": { "cooling_fan_speed": {
"description": "The cooling fan speed.", "description": "The cooling fan speed.",
@ -568,6 +649,11 @@
"nullable": true, "nullable": true,
"type": "integer" "type": "integer"
}, },
"nozzle_diameter": {
"description": "The nozzle diameter.",
"nullable": true,
"type": "string"
},
"nozzle_target_temper": { "nozzle_target_temper": {
"description": "The target nozzle temperature.", "description": "The target nozzle temperature.",
"format": "double", "format": "double",
@ -580,6 +666,15 @@
"nullable": true, "nullable": true,
"type": "number" "type": "number"
}, },
"nozzle_type": {
"allOf": [
{
"$ref": "#/components/schemas/NozzleType"
}
],
"description": "The nozzle type.",
"nullable": true
},
"online": { "online": {
"allOf": [ "allOf": [
{ {
@ -737,7 +832,231 @@
], ],
"type": "object" "type": "object"
}, },
{
"additionalProperties": true,
"description": "The gcode line.",
"properties": {
"command": {
"enum": [
"gcode_line"
],
"type": "string"
},
"line": {
"description": "The gcode line.",
"type": "string"
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
}
},
"required": [
"command",
"line",
"sequence_id"
],
"type": "object"
},
{
"additionalProperties": true,
"description": "Project file.",
"properties": {
"command": {
"enum": [
"project_file"
],
"type": "string"
},
"gcode_file": {
"description": "The gcode file.",
"type": "string"
},
"profile_id": {
"description": "The profile id.",
"type": "string"
},
"project_id": {
"description": "The project id.",
"type": "string"
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
},
"subtask_id": {
"description": "The subtask id.",
"type": "string"
},
"subtask_name": {
"description": "The subtask name.",
"type": "string"
},
"task_id": {
"description": "The task id.",
"type": "string"
}
},
"required": [
"command",
"gcode_file",
"profile_id",
"project_id",
"sequence_id",
"subtask_id",
"subtask_name",
"task_id"
],
"type": "object"
},
{
"additionalProperties": true,
"description": "Pause the print.",
"properties": {
"command": {
"enum": [
"pause"
],
"type": "string"
},
"reason": {
"allOf": [
{
"$ref": "#/components/schemas/Reason"
}
],
"description": "The reason for the message."
},
"result": {
"allOf": [
{
"$ref": "#/components/schemas/Result"
}
],
"description": "The result of the command."
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
}
},
"required": [
"command",
"reason",
"result",
"sequence_id"
],
"type": "object"
},
{
"additionalProperties": true,
"description": "Resume the print.",
"properties": {
"command": {
"enum": [
"resume"
],
"type": "string"
},
"reason": {
"allOf": [
{
"$ref": "#/components/schemas/Reason"
}
],
"description": "The reason for the message."
},
"result": {
"allOf": [
{
"$ref": "#/components/schemas/Result"
}
],
"description": "The result of the command."
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
}
},
"required": [
"command",
"reason",
"result",
"sequence_id"
],
"type": "object"
},
{
"additionalProperties": true,
"description": "Stop the print.",
"properties": {
"command": {
"enum": [
"stop"
],
"type": "string"
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
}
},
"required": [
"command",
"sequence_id"
],
"type": "object"
},
{
"additionalProperties": true,
"description": "Extrusion calibration get.",
"properties": {
"command": {
"enum": [
"extrusion_cali_get"
],
"type": "string"
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
}
},
"required": [
"command",
"sequence_id"
],
"type": "object"
}
]
},
"PrintAms": { "PrintAms": {
"additionalProperties": true,
"description": "The print ams.", "description": "The print ams.",
"properties": { "properties": {
"ams": { "ams": {
@ -808,6 +1127,7 @@
"type": "object" "type": "object"
}, },
"PrintAmsData": { "PrintAmsData": {
"additionalProperties": true,
"description": "The print ams data.", "description": "The print ams data.",
"properties": { "properties": {
"humidity": { "humidity": {
@ -838,54 +1158,8 @@
], ],
"type": "object" "type": "object"
}, },
"PrintCommand": {
"description": "A print command.",
"oneOf": [
{
"description": "The status of the print.",
"enum": [
"push_status"
],
"type": "string"
},
{
"description": "The gcode line.",
"enum": [
"gcode_line"
],
"type": "string"
},
{
"description": "Project file.",
"enum": [
"project_file"
],
"type": "string"
},
{
"description": "Resume the print.",
"enum": [
"resume"
],
"type": "string"
},
{
"description": "Stop the print.",
"enum": [
"stop"
],
"type": "string"
},
{
"description": "Extrusion calibration get.",
"enum": [
"extrusion_cali_get"
],
"type": "string"
}
]
},
"PrintIpcam": { "PrintIpcam": {
"additionalProperties": true,
"description": "The print ipcam.", "description": "The print ipcam.",
"properties": { "properties": {
"ipcam_dev": { "ipcam_dev": {
@ -935,15 +1209,24 @@
"type": "object" "type": "object"
}, },
"PrintLightsReport": { "PrintLightsReport": {
"additionalProperties": true,
"description": "A print lights report.", "description": "A print lights report.",
"properties": { "properties": {
"mode": { "mode": {
"description": "The mode.", "allOf": [
"type": "string" {
"$ref": "#/components/schemas/LedMode"
}
],
"description": "The mode."
}, },
"node": { "node": {
"description": "The node.", "allOf": [
"type": "string" {
"$ref": "#/components/schemas/LedNode"
}
],
"description": "The node."
} }
}, },
"required": [ "required": [
@ -953,6 +1236,7 @@
"type": "object" "type": "object"
}, },
"PrintOnline": { "PrintOnline": {
"additionalProperties": true,
"description": "The print online.", "description": "The print online.",
"properties": { "properties": {
"ahb": { "ahb": {
@ -995,6 +1279,7 @@
"type": "object" "type": "object"
}, },
"PrintTray": { "PrintTray": {
"additionalProperties": true,
"description": "The print tray.", "description": "The print tray.",
"properties": { "properties": {
"bed_temp": { "bed_temp": {
@ -1106,6 +1391,7 @@
"type": "object" "type": "object"
}, },
"PrintUpgradeState": { "PrintUpgradeState": {
"additionalProperties": true,
"description": "A print upgrade state.", "description": "A print upgrade state.",
"properties": { "properties": {
"consistency_request": { "consistency_request": {
@ -1172,6 +1458,7 @@
"type": "object" "type": "object"
}, },
"PrintUpload": { "PrintUpload": {
"additionalProperties": true,
"description": "The print upload.", "description": "The print upload.",
"properties": { "properties": {
"message": { "message": {
@ -1195,6 +1482,57 @@
], ],
"type": "object" "type": "object"
}, },
"Reason": {
"description": "A reason for a message.",
"oneOf": [
{
"description": "Success.",
"enum": [
"SUCCESS"
],
"type": "string"
},
{
"description": "Fail.",
"enum": [
"FAIL"
],
"type": "string"
},
{
"additionalProperties": false,
"description": "Some unknown string.",
"properties": {
"UNKNOWN": {
"type": "string"
}
},
"required": [
"UNKNOWN"
],
"type": "object"
}
]
},
"Result": {
"description": "The result of a message.",
"oneOf": [
{
"description": "Success.",
"enum": [
"SUCCESS"
],
"type": "string"
},
{
"description": "Fail.",
"enum": [
"FAIL"
],
"type": "string"
}
]
},
"SequenceId": { "SequenceId": {
"anyOf": [ "anyOf": [
{ {
@ -1211,20 +1549,74 @@
"description": "The sequence id type." "description": "The sequence id type."
}, },
"System": { "System": {
"description": "A system command.",
"oneOf": [
{
"additionalProperties": true, "additionalProperties": true,
"description": "A system message.", "description": "Led control.",
"properties": { "properties": {
"command": { "command": {
"enum": [
"ledctrl"
],
"type": "string"
},
"interval_time": {
"description": "The interval time.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"led_mode": {
"allOf": [ "allOf": [
{ {
"$ref": "#/components/schemas/SystemCommand" "$ref": "#/components/schemas/LedMode"
} }
], ],
"description": "The system command." "description": "The LED mode."
},
"led_node": {
"allOf": [
{
"$ref": "#/components/schemas/LedNode"
}
],
"description": "The LED node."
},
"led_off_time": {
"description": "The LED off time.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"led_on_time": {
"description": "The LED on time.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"loop_times": {
"description": "The loop times.",
"format": "uint32",
"minimum": 0,
"type": "integer"
},
"reason": {
"allOf": [
{
"$ref": "#/components/schemas/Reason"
}
],
"description": "The reason for the message.",
"nullable": true
}, },
"result": { "result": {
"description": "The result of the system command.", "allOf": [
"type": "string" {
"$ref": "#/components/schemas/Result"
}
],
"description": "The result of the command."
}, },
"sequence_id": { "sequence_id": {
"allOf": [ "allOf": [
@ -1237,27 +1629,88 @@
}, },
"required": [ "required": [
"command", "command",
"interval_time",
"led_mode",
"led_node",
"led_off_time",
"led_on_time",
"loop_times",
"result", "result",
"sequence_id" "sequence_id"
], ],
"type": "object" "type": "object"
}, },
"SystemCommand": {
"description": "A system command.",
"oneOf": [
{
"description": "Led control.",
"enum": [
"ledctrl"
],
"type": "string"
},
{ {
"additionalProperties": true,
"description": "Get accessories.", "description": "Get accessories.",
"properties": {
"accessory_type": {
"allOf": [
{
"$ref": "#/components/schemas/AccessoryType"
}
],
"description": "The accessory type."
},
"aux_part_fan": {
"description": "The aux part fan.",
"type": "boolean"
},
"command": {
"enum": [ "enum": [
"get_accessories" "get_accessories"
], ],
"type": "string" "type": "string"
},
"nozzle_diameter": {
"description": "The nozzle diameter.",
"format": "double",
"type": "number"
},
"nozzle_type": {
"allOf": [
{
"$ref": "#/components/schemas/NozzleType"
}
],
"description": "The nozzle type."
},
"reason": {
"allOf": [
{
"$ref": "#/components/schemas/Reason"
}
],
"description": "The reason for the message.",
"nullable": true
},
"result": {
"allOf": [
{
"$ref": "#/components/schemas/Result"
}
],
"description": "The result of the command."
},
"sequence_id": {
"allOf": [
{
"$ref": "#/components/schemas/SequenceId"
}
],
"description": "The sequence id."
}
},
"required": [
"accessory_type",
"aux_part_fan",
"command",
"nozzle_diameter",
"nozzle_type",
"result",
"sequence_id"
],
"type": "object"
} }
] ]
} }