Skip to content

Commit f0f6aa9

Browse files
Update api spec (#340)
* YOYO NEW API SPEC! * Generated new lib * 2.0.42 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 4614a25 commit f0f6aa9

File tree

3 files changed

+182
-18
lines changed

3 files changed

+182
-18
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kittycad/lib",
3-
"version": "2.0.41",
3+
"version": "2.0.42",
44
"description": "Javascript library for KittyCAD API",
55
"type": "module",
66
"keywords": [

spec.json

Lines changed: 152 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21767,6 +21767,25 @@
2176721767
"description": "The response from the `Extrude` endpoint.",
2176821768
"type": "object"
2176921769
},
21770+
"ExtrudeMethod": {
21771+
"description": "Extrusion method determining if the extrusion will be part of the existing object or an entirely new object.",
21772+
"oneOf": [
21773+
{
21774+
"description": "Create a new object that is not connected to the object it is extruded from. This will result in two objects after the operation.",
21775+
"type": "string",
21776+
"enum": [
21777+
"new"
21778+
]
21779+
},
21780+
{
21781+
"description": "This extrusion will be part of object it is extruded from. This will result in one object after the operation.",
21782+
"type": "string",
21783+
"enum": [
21784+
"merge"
21785+
]
21786+
}
21787+
]
21788+
},
2177021789
"ExtrudedFaceInfo": {
2177121790
"description": "IDs for the extruded faces.",
2177221791
"type": "object",
@@ -24310,9 +24329,8 @@
2431024329
"annual_discount": {
2431124330
"nullable": true,
2431224331
"description": "Annual discount. The percentage off the monthly price if the user pays annually.",
24313-
"type": "integer",
24314-
"format": "uint",
24315-
"minimum": 0
24332+
"type": "number",
24333+
"format": "double"
2431624334
},
2431724335
"description": {
2431824336
"description": "A description of the tier.",
@@ -24574,6 +24592,15 @@
2457424592
}
2457524593
]
2457624594
},
24595+
"extrude_method": {
24596+
"description": "Should the extrusion create a new object or be part of the existing object. If a new object is created, the command id will be the id of the newly created object.",
24597+
"default": "merge",
24598+
"allOf": [
24599+
{
24600+
"$ref": "#/components/schemas/ExtrudeMethod"
24601+
}
24602+
]
24603+
},
2457724604
"faces": {
2457824605
"nullable": true,
2457924606
"description": "Which IDs should the new faces have? If this isn't given, the engine will generate IDs.",
@@ -26688,7 +26715,7 @@
2668826715
]
2668926716
},
2669026717
"uv": {
26691-
"description": "The 2D paramter-space u,v position to evaluate the surface at",
26718+
"description": "The 2D parameter-space u,v position to evaluate the surface at",
2669226719
"allOf": [
2669326720
{
2669426721
"$ref": "#/components/schemas/Point2d"
@@ -26739,7 +26766,7 @@
2673926766
]
2674026767
},
2674126768
"uv": {
26742-
"description": "The 2D paramter-space u,v position to evaluate the surface at",
26769+
"description": "The 2D parameter-space u,v position to evaluate the surface at",
2674326770
"allOf": [
2674426771
{
2674526772
"$ref": "#/components/schemas/Point2d"
@@ -26812,9 +26839,9 @@
2681226839
"properties": {
2681326840
"duration_seconds": {
2681426841
"description": "How many seconds the animation should take.",
26815-
"default": 0.4000000059604645,
26842+
"default": 0.4,
2681626843
"type": "number",
26817-
"format": "float"
26844+
"format": "double"
2681826845
},
2681926846
"entity_id": {
2682026847
"description": "Which entity is being changed.",
@@ -32537,6 +32564,122 @@
3253732564
"start_radius",
3253832565
"type"
3253932566
]
32567+
},
32568+
{
32569+
"description": "Adds an elliptical arc segment.",
32570+
"type": "object",
32571+
"properties": {
32572+
"center": {
32573+
"description": "The center point of the ellipse.",
32574+
"allOf": [
32575+
{
32576+
"$ref": "#/components/schemas/Point2d"
32577+
}
32578+
]
32579+
},
32580+
"end_angle": {
32581+
"description": "End of the path along the perimeter of the ellipse.",
32582+
"allOf": [
32583+
{
32584+
"$ref": "#/components/schemas/Angle"
32585+
}
32586+
]
32587+
},
32588+
"major_radius": {
32589+
"description": "Major radius of the ellipse (along the x axis).",
32590+
"allOf": [
32591+
{
32592+
"$ref": "#/components/schemas/LengthUnit"
32593+
}
32594+
]
32595+
},
32596+
"minor_radius": {
32597+
"description": "Minor radius of the ellipse (along the y axis).",
32598+
"allOf": [
32599+
{
32600+
"$ref": "#/components/schemas/LengthUnit"
32601+
}
32602+
]
32603+
},
32604+
"start_angle": {
32605+
"description": "Start of the path along the perimeter of the ellipse.",
32606+
"allOf": [
32607+
{
32608+
"$ref": "#/components/schemas/Angle"
32609+
}
32610+
]
32611+
},
32612+
"type": {
32613+
"type": "string",
32614+
"enum": [
32615+
"ellipse"
32616+
]
32617+
}
32618+
},
32619+
"required": [
32620+
"center",
32621+
"end_angle",
32622+
"major_radius",
32623+
"minor_radius",
32624+
"start_angle",
32625+
"type"
32626+
]
32627+
},
32628+
{
32629+
"description": "Adds a generic conic section specified by the end point, interior point and tangents at the start and end of the section.",
32630+
"type": "object",
32631+
"properties": {
32632+
"end": {
32633+
"description": "End point of the conic.",
32634+
"allOf": [
32635+
{
32636+
"$ref": "#/components/schemas/Point2d"
32637+
}
32638+
]
32639+
},
32640+
"end_tangent": {
32641+
"description": "Tangent at the end of the conic.",
32642+
"allOf": [
32643+
{
32644+
"$ref": "#/components/schemas/Point2d"
32645+
}
32646+
]
32647+
},
32648+
"interior": {
32649+
"description": "Interior point that lies on the conic.",
32650+
"allOf": [
32651+
{
32652+
"$ref": "#/components/schemas/Point2d"
32653+
}
32654+
]
32655+
},
32656+
"relative": {
32657+
"description": "Whether or not the interior and end points are relative to the previous path position.",
32658+
"type": "boolean"
32659+
},
32660+
"start_tangent": {
32661+
"description": "Tangent at the start of the conic.",
32662+
"allOf": [
32663+
{
32664+
"$ref": "#/components/schemas/Point2d"
32665+
}
32666+
]
32667+
},
32668+
"type": {
32669+
"type": "string",
32670+
"enum": [
32671+
"conic_to"
32672+
]
32673+
}
32674+
},
32675+
"required": [
32676+
"end",
32677+
"end_tangent",
32678+
"interior",
32679+
"relative",
32680+
"start_tangent",
32681+
"type"
32682+
]
3254032683
}
3254132684
]
3254232685
},
@@ -37464,9 +37607,8 @@
3746437607
"annual_discount": {
3746537608
"nullable": true,
3746637609
"description": "Annual discount. The percentage off the monthly price if the user pays annually.",
37467-
"type": "integer",
37468-
"format": "uint",
37469-
"minimum": 0
37610+
"type": "number",
37611+
"format": "double"
3747037612
},
3747137613
"description": {
3747237614
"description": "A description of the tier.",

src/models.ts

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,8 @@ export interface ExtendedUserResultsPage_type {
15111511

15121512
export interface Extrude_type {} /* Empty object */
15131513

1514+
export type ExtrudeMethod_type = 'new' | 'merge';
1515+
15141516
export interface ExtrudedFaceInfo_type {
15151517
/*{
15161518
"nullable": true,
@@ -2375,8 +2377,7 @@ export type ModelingAppShareLinks_type =
23752377
export interface ModelingAppSubscriptionTier_type {
23762378
/*{
23772379
"nullable": true,
2378-
"format": "uint",
2379-
"minimum": 0,
2380+
"format": "double",
23802381
"description": "Annual discount. The percentage off the monthly price if the user pays annually."
23812382
}*/
23822383
annual_discount?: number;
@@ -2443,6 +2444,11 @@ export type ModelingCmd_type =
24432444
| {
24442445
distance: LengthUnit_type /* How far off the plane to extrude */;
24452446
/*{
2447+
"default": "merge",
2448+
"description": "Should the extrusion create a new object or be part of the existing object. If a new object is created, the command id will be the id of the newly created object."
2449+
}*/
2450+
extrude_method: ExtrudeMethod_type;
2451+
/*{
24462452
"nullable": true,
24472453
"description": "Which IDs should the new faces have? If this isn't given, the engine will generate IDs."
24482454
}*/
@@ -2982,7 +2988,7 @@ export type ModelingCmd_type =
29822988
/* format:uuid, description:Which face is being queried. */
29832989
object_id: string;
29842990
type: 'face_get_position';
2985-
uv: Point2d_type /* The 2D paramter-space u,v position to evaluate the surface at */;
2991+
uv: Point2d_type /* The 2D parameter-space u,v position to evaluate the surface at */;
29862992
}
29872993
| {
29882994
/* format:uuid, description:Which face is being queried. */
@@ -2993,7 +2999,7 @@ export type ModelingCmd_type =
29932999
/* format:uuid, description:Which face is being queried. */
29943000
object_id: string;
29953001
type: 'face_get_gradient';
2996-
uv: Point2d_type /* The 2D paramter-space u,v position to evaluate the surface at */;
3002+
uv: Point2d_type /* The 2D parameter-space u,v position to evaluate the surface at */;
29973003
}
29983004
| {
29993005
front: boolean /* Bring to front = true, send to back = false. */;
@@ -3012,7 +3018,7 @@ export type ModelingCmd_type =
30123018
type: 'entity_set_opacity';
30133019
}
30143020
| {
3015-
/* default:0.4000000059604645, format:float, description:How many seconds the animation should take. */
3021+
/* default:0.4, format:double, description:How many seconds the animation should take. */
30163022
duration_seconds: number;
30173023
/* format:uuid, description:Which entity is being changed. */
30183024
entity_id: string;
@@ -4830,6 +4836,22 @@ export type PathSegment_type =
48304836
reverse: boolean /* If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. */;
48314837
start_radius: LengthUnit_type /* The involute is described between two circles, start_radius is the radius of the inner circle. */;
48324838
type: 'circular_involute';
4839+
}
4840+
| {
4841+
center: Point2d_type /* The center point of the ellipse. */;
4842+
end_angle: Angle_type /* End of the path along the perimeter of the ellipse. */;
4843+
major_radius: LengthUnit_type /* Major radius of the ellipse (along the x axis). */;
4844+
minor_radius: LengthUnit_type /* Minor radius of the ellipse (along the y axis). */;
4845+
start_angle: Angle_type /* Start of the path along the perimeter of the ellipse. */;
4846+
type: 'ellipse';
4847+
}
4848+
| {
4849+
end: Point2d_type /* End point of the conic. */;
4850+
end_tangent: Point2d_type /* Tangent at the end of the conic. */;
4851+
interior: Point2d_type /* Interior point that lies on the conic. */;
4852+
relative: boolean /* Whether or not the interior and end points are relative to the previous path position. */;
4853+
start_tangent: Point2d_type /* Tangent at the start of the conic. */;
4854+
type: 'conic_to';
48334855
};
48344856

48354857
export interface PathSegmentInfo_type {
@@ -6467,8 +6489,7 @@ export type WorldCoordinateSystem_type =
64676489
export type ZooProductSubscription_type = {
64686490
/*{
64696491
"nullable": true,
6470-
"format": "uint",
6471-
"minimum": 0,
6492+
"format": "double",
64726493
"description": "Annual discount. The percentage off the monthly price if the user pays annually."
64736494
}*/
64746495
annual_discount?: number;
@@ -6670,6 +6691,7 @@ export interface Models {
66706691
ExtendedUser_type: ExtendedUser_type;
66716692
ExtendedUserResultsPage_type: ExtendedUserResultsPage_type;
66726693
Extrude_type: Extrude_type;
6694+
ExtrudeMethod_type: ExtrudeMethod_type;
66736695
ExtrudedFaceInfo_type: ExtrudedFaceInfo_type;
66746696
ExtrusionFaceCapType_type: ExtrusionFaceCapType_type;
66756697
ExtrusionFaceInfo_type: ExtrusionFaceInfo_type;

0 commit comments

Comments
 (0)