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]
|
||||
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": {
|
||||
"description": "Configuration for a FDM-based printer.",
|
||||
"properties": {
|
||||
"filament_material": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/FilamentMaterial"
|
||||
}
|
||||
],
|
||||
"description": "type of material being extruded"
|
||||
"filaments": {
|
||||
"description": "The filaments the printer has access to.",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/Filament"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"nozzle_diameter": {
|
||||
"description": "Diameter of the extrusion nozzle, in mm.",
|
||||
@ -115,16 +114,45 @@
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"filament_material",
|
||||
"filaments",
|
||||
"nozzle_diameter"
|
||||
],
|
||||
"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": {
|
||||
"description": "The material that the filament is made of.",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "polylactic acid based plastics",
|
||||
"description": "Polylactic acid based plastics",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
@ -138,6 +166,21 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "Pla support",
|
||||
"properties": {
|
||||
"type": {
|
||||
"enum": [
|
||||
"pla_support"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"description": "acrylonitrile butadiene styrene based plastics",
|
||||
"properties": {
|
||||
@ -242,26 +285,6 @@
|
||||
"type"
|
||||
],
|
||||
"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!",
|
||||
"nullable": true
|
||||
},
|
||||
"progress": {
|
||||
"description": "Progress of the current print, if printing.",
|
||||
"format": "double",
|
||||
"nullable": true,
|
||||
"type": "number"
|
||||
},
|
||||
"state": {
|
||||
"allOf": [
|
||||
{
|
||||
@ -635,6 +664,15 @@
|
||||
},
|
||||
"SlicerConfiguration": {
|
||||
"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"
|
||||
},
|
||||
"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. */
|
||||
FdmHardwareConfiguration: {
|
||||
/** @description type of material being extruded */
|
||||
filament_material: components['schemas']['FilamentMaterial']
|
||||
/** @description The filaments the printer has access to. */
|
||||
filaments: components['schemas']['Filament'][]
|
||||
/**
|
||||
* Format: double
|
||||
* @description Diameter of the extrusion nozzle, in mm.
|
||||
*/
|
||||
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. */
|
||||
FilamentMaterial:
|
||||
| {
|
||||
/** @enum {string} */
|
||||
type: 'pla'
|
||||
}
|
||||
| {
|
||||
/** @enum {string} */
|
||||
type: 'pla_support'
|
||||
}
|
||||
| {
|
||||
/** @enum {string} */
|
||||
type: 'abs'
|
||||
@ -178,12 +191,6 @@ export interface components {
|
||||
/** @enum {string} */
|
||||
type: 'composite'
|
||||
}
|
||||
| {
|
||||
/** @description The name of the material. */
|
||||
name: string
|
||||
/** @enum {string} */
|
||||
type: 'other'
|
||||
}
|
||||
/** @description The hardware configuration of a machine. */
|
||||
HardwareConfiguration:
|
||||
| {
|
||||
@ -214,6 +221,11 @@ export interface components {
|
||||
*
|
||||
* What "close" means is up to you! */
|
||||
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. */
|
||||
state: components['schemas']['MachineState']
|
||||
}
|
||||
@ -284,7 +296,13 @@ export interface components {
|
||||
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. */
|
||||
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 */
|
||||
Stage:
|
||||
| 'nothing'
|
||||
|
Reference in New Issue
Block a user