Update machine-api spec (#4205)
* YOYO NEW API SPEC! * New machine-api types * empty * Update .codespellrc * Update .codespellrc --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
0706624381
commit
a14bbaa237
@ -1,3 +1,3 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast,ue,afterall
|
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,absolutey,atleast,ue,afterall
|
||||||
skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json
|
skip: **/target,node_modules,build,**/Cargo.lock,./docs/kcl/*.md,.yarn.lock,**/yarn.lock,./openapi/*.json,./src/lib/machine-api.d.ts
|
||||||
|
@ -100,13 +100,12 @@
|
|||||||
"FdmHardwareConfiguration": {
|
"FdmHardwareConfiguration": {
|
||||||
"description": "Configuration for a FDM-based printer.",
|
"description": "Configuration for a FDM-based printer.",
|
||||||
"properties": {
|
"properties": {
|
||||||
"filament_material": {
|
"filaments": {
|
||||||
"allOf": [
|
"description": "The filaments the printer has access to.",
|
||||||
{
|
"items": {
|
||||||
"$ref": "#/components/schemas/FilamentMaterial"
|
"$ref": "#/components/schemas/Filament"
|
||||||
}
|
},
|
||||||
],
|
"type": "array"
|
||||||
"description": "type of material being extruded"
|
|
||||||
},
|
},
|
||||||
"nozzle_diameter": {
|
"nozzle_diameter": {
|
||||||
"description": "Diameter of the extrusion nozzle, in mm.",
|
"description": "Diameter of the extrusion nozzle, in mm.",
|
||||||
@ -115,16 +114,45 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"filament_material",
|
"filaments",
|
||||||
"nozzle_diameter"
|
"nozzle_diameter"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"Filament": {
|
||||||
|
"description": "Information about the filament being used in a FDM printer.",
|
||||||
|
"properties": {
|
||||||
|
"color": {
|
||||||
|
"description": "The color (as hex without the `#`) of the filament, this is likely specific to the manufacturer.",
|
||||||
|
"maxLength": 6,
|
||||||
|
"minLength": 6,
|
||||||
|
"nullable": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"material": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/FilamentMaterial"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "The material that the filament is made of."
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "The name of the filament, this is likely specfic to the manufacturer.",
|
||||||
|
"nullable": true,
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"material"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"FilamentMaterial": {
|
"FilamentMaterial": {
|
||||||
"description": "The material that the filament is made of.",
|
"description": "The material that the filament is made of.",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"description": "polylactic acid based plastics",
|
"description": "Polylactic acid based plastics",
|
||||||
"properties": {
|
"properties": {
|
||||||
"type": {
|
"type": {
|
||||||
"enum": [
|
"enum": [
|
||||||
@ -138,6 +166,21 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"description": "Pla support",
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"enum": [
|
||||||
|
"pla_support"
|
||||||
|
],
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"type"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"description": "acrylonitrile butadiene styrene based plastics",
|
"description": "acrylonitrile butadiene styrene based plastics",
|
||||||
"properties": {
|
"properties": {
|
||||||
@ -242,26 +285,6 @@
|
|||||||
"type"
|
"type"
|
||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "None of the above, likely a custom material that we get directly from the printer.",
|
|
||||||
"properties": {
|
|
||||||
"name": {
|
|
||||||
"description": "The name of the material.",
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"type": {
|
|
||||||
"enum": [
|
|
||||||
"other"
|
|
||||||
],
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"required": [
|
|
||||||
"name",
|
|
||||||
"type"
|
|
||||||
],
|
|
||||||
"type": "object"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -358,6 +381,12 @@
|
|||||||
"description": "Maximum part size that can be manufactured by this device. This may be some sort of theoretical upper bound, getting close to this limit seems like maybe a bad idea.\n\nThis may be `None` if the maximum size is not knowable by the Machine API.\n\nWhat \"close\" means is up to you!",
|
"description": "Maximum part size that can be manufactured by this device. This may be some sort of theoretical upper bound, getting close to this limit seems like maybe a bad idea.\n\nThis may be `None` if the maximum size is not knowable by the Machine API.\n\nWhat \"close\" means is up to you!",
|
||||||
"nullable": true
|
"nullable": true
|
||||||
},
|
},
|
||||||
|
"progress": {
|
||||||
|
"description": "Progress of the current print, if printing.",
|
||||||
|
"format": "double",
|
||||||
|
"nullable": true,
|
||||||
|
"type": "number"
|
||||||
|
},
|
||||||
"state": {
|
"state": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
@ -635,6 +664,15 @@
|
|||||||
},
|
},
|
||||||
"SlicerConfiguration": {
|
"SlicerConfiguration": {
|
||||||
"description": "The slicer configuration is a set of parameters that are passed to the slicer to control how the gcode is generated.",
|
"description": "The slicer configuration is a set of parameters that are passed to the slicer to control how the gcode is generated.",
|
||||||
|
"properties": {
|
||||||
|
"filament_idx": {
|
||||||
|
"description": "The filament to use for the print.",
|
||||||
|
"format": "uint",
|
||||||
|
"minimum": 0,
|
||||||
|
"nullable": true,
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"Stage": {
|
"Stage": {
|
||||||
|
36
src/lib/machine-api.d.ts
vendored
36
src/lib/machine-api.d.ts
vendored
@ -136,20 +136,33 @@ export interface components {
|
|||||||
}
|
}
|
||||||
/** @description Configuration for a FDM-based printer. */
|
/** @description Configuration for a FDM-based printer. */
|
||||||
FdmHardwareConfiguration: {
|
FdmHardwareConfiguration: {
|
||||||
/** @description type of material being extruded */
|
/** @description The filaments the printer has access to. */
|
||||||
filament_material: components['schemas']['FilamentMaterial']
|
filaments: components['schemas']['Filament'][]
|
||||||
/**
|
/**
|
||||||
* Format: double
|
* Format: double
|
||||||
* @description Diameter of the extrusion nozzle, in mm.
|
* @description Diameter of the extrusion nozzle, in mm.
|
||||||
*/
|
*/
|
||||||
nozzle_diameter: number
|
nozzle_diameter: number
|
||||||
}
|
}
|
||||||
|
/** @description Information about the filament being used in a FDM printer. */
|
||||||
|
Filament: {
|
||||||
|
/** @description The color (as hex without the `#`) of the filament, this is likely specific to the manufacturer. */
|
||||||
|
color?: string | null
|
||||||
|
/** @description The material that the filament is made of. */
|
||||||
|
material: components['schemas']['FilamentMaterial']
|
||||||
|
/** @description The name of the filament, this is likely specfic to the manufacturer. */
|
||||||
|
name?: string | null
|
||||||
|
}
|
||||||
/** @description The material that the filament is made of. */
|
/** @description The material that the filament is made of. */
|
||||||
FilamentMaterial:
|
FilamentMaterial:
|
||||||
| {
|
| {
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'pla'
|
type: 'pla'
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
/** @enum {string} */
|
||||||
|
type: 'pla_support'
|
||||||
|
}
|
||||||
| {
|
| {
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'abs'
|
type: 'abs'
|
||||||
@ -178,12 +191,6 @@ export interface components {
|
|||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
type: 'composite'
|
type: 'composite'
|
||||||
}
|
}
|
||||||
| {
|
|
||||||
/** @description The name of the material. */
|
|
||||||
name: string
|
|
||||||
/** @enum {string} */
|
|
||||||
type: 'other'
|
|
||||||
}
|
|
||||||
/** @description The hardware configuration of a machine. */
|
/** @description The hardware configuration of a machine. */
|
||||||
HardwareConfiguration:
|
HardwareConfiguration:
|
||||||
| {
|
| {
|
||||||
@ -214,6 +221,11 @@ export interface components {
|
|||||||
*
|
*
|
||||||
* What "close" means is up to you! */
|
* What "close" means is up to you! */
|
||||||
max_part_volume?: components['schemas']['Volume'] | null
|
max_part_volume?: components['schemas']['Volume'] | null
|
||||||
|
/**
|
||||||
|
* Format: double
|
||||||
|
* @description Progress of the current print, if printing.
|
||||||
|
*/
|
||||||
|
progress?: number | null
|
||||||
/** @description Status of the printer -- be it printing, idle, or unreachable. This may dictate if a machine is capable of taking a new job. */
|
/** @description Status of the printer -- be it printing, idle, or unreachable. This may dictate if a machine is capable of taking a new job. */
|
||||||
state: components['schemas']['MachineState']
|
state: components['schemas']['MachineState']
|
||||||
}
|
}
|
||||||
@ -284,7 +296,13 @@ export interface components {
|
|||||||
slicer_configuration?: components['schemas']['SlicerConfiguration'] | null
|
slicer_configuration?: components['schemas']['SlicerConfiguration'] | null
|
||||||
}
|
}
|
||||||
/** @description The slicer configuration is a set of parameters that are passed to the slicer to control how the gcode is generated. */
|
/** @description The slicer configuration is a set of parameters that are passed to the slicer to control how the gcode is generated. */
|
||||||
SlicerConfiguration: Record<string, never>
|
SlicerConfiguration: {
|
||||||
|
/**
|
||||||
|
* Format: uint
|
||||||
|
* @description The filament to use for the print.
|
||||||
|
*/
|
||||||
|
filament_idx?: number | null
|
||||||
|
}
|
||||||
/** @description The print stage. These come from: https://github.com/SoftFever/OrcaSlicer/blob/431978baf17961df90f0d01871b0ad1d839d7f5d/src/slic3r/GUI/DeviceManager.cpp#L78 */
|
/** @description The print stage. These come from: https://github.com/SoftFever/OrcaSlicer/blob/431978baf17961df90f0d01871b0ad1d839d7f5d/src/slic3r/GUI/DeviceManager.cpp#L78 */
|
||||||
Stage:
|
Stage:
|
||||||
| 'nothing'
|
| 'nothing'
|
||||||
|
Reference in New Issue
Block a user