diff --git a/Cargo.lock b/Cargo.lock index 2d5904b2..2f0e6a2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -955,7 +955,7 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.2.28" +version = "0.2.29" dependencies = [ "anyhow", "async-trait", diff --git a/VERSION.txt b/VERSION.txt index 8bc53d52..1b87bf5d 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -0.2.28 +0.2.29 diff --git a/kittycad.rs.patch.json b/kittycad.rs.patch.json index 4b4c0407..3cf30ec7 100644 --- a/kittycad.rs.patch.json +++ b/kittycad.rs.patch.json @@ -4,7 +4,7 @@ "path": "/info/x-rust", "value": { "client": "// Authenticate via an API token.\nlet client = kittycad::Client::new(\"$TOKEN\");\n\n// - OR -\n\n// Authenticate with your token and host parsed from the environment variables:\n// `KITTYCAD_API_TOKEN`.\nlet client = kittycad::Client::new_from_env();", - "install": "[dependencies]\nkittycad = \"0.2.28\"" + "install": "[dependencies]\nkittycad = \"0.2.29\"" } }, { diff --git a/kittycad/Cargo.toml b/kittycad/Cargo.toml index e319fd86..a22b2be0 100644 --- a/kittycad/Cargo.toml +++ b/kittycad/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "kittycad" description = "A fully generated & opinionated API client for the KittyCAD API." -version = "0.2.28" +version = "0.2.29" documentation = "https://docs.rs/kittycad" readme = "README.md" repository = "https://github.com/KittyCAD/kittycad.rs/tree/main/kittycad" diff --git a/kittycad/README.md b/kittycad/README.md index c82dcf14..1432e8ef 100644 --- a/kittycad/README.md +++ b/kittycad/README.md @@ -31,7 +31,7 @@ To install the library, add the following to your `Cargo.toml` file. ```toml [dependencies] -kittycad = "0.2.28" +kittycad = "0.2.29" ``` ## Basic example diff --git a/kittycad/src/lib.rs b/kittycad/src/lib.rs index e5117f69..8c5a615e 100644 --- a/kittycad/src/lib.rs +++ b/kittycad/src/lib.rs @@ -29,7 +29,7 @@ //! //! ```toml //! [dependencies] -//! kittycad = "0.2.28" +//! kittycad = "0.2.29" //! ``` //! //! ## Basic example diff --git a/kittycad/src/types.rs b/kittycad/src/types.rs index 6f1e9f04..26aa370c 100644 --- a/kittycad/src/types.rs +++ b/kittycad/src/types.rs @@ -1165,7 +1165,7 @@ pub struct ApiCallWithPrice { pub origin: Option, #[doc = "The price of the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub price: Option, + pub price: Option, #[doc = "The request body sent by the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub request_body: Option, @@ -3034,7 +3034,7 @@ pub struct Coupon { #[doc = "Amount (in the `currency` specified) that will be taken off the subtotal of any \ invoices for this customer."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_off: Option, + pub amount_off: Option, #[doc = "Always true for a deleted object."] #[serde(default, skip_serializing_if = "Option::is_none")] pub deleted: Option, @@ -3261,7 +3261,7 @@ pub struct Customer { have yet to be successfully applied to any invoice. This balance is only taken into \ account as invoices are finalized."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub balance: Option, + pub balance: Option, #[doc = "Time at which the object was created."] pub created_at: chrono::DateTime, #[doc = "Three-letter ISO code for the currency the customer can be charged in for recurring \ @@ -3380,7 +3380,7 @@ pub struct CustomerBalance { #[doc = "The monthy credits remaining in the balance. This gets re-upped every month, but if \ the credits are not used for a month they do not carry over to the next month. It is \ a stable amount granted to the user per month."] - pub monthly_credits_remaining: bigdecimal::BigDecimal, + pub monthly_credits_remaining: f64, #[doc = "The amount of pre-pay cash remaining in the balance. This number goes down as the \ user uses their pre-paid credits. The reason we track this amount is if a user ever \ wants to withdraw their pre-pay cash, we can use this amount to determine how much \ @@ -3390,15 +3390,15 @@ pub struct CustomerBalance { `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if \ they want to withdraw money after, they can only withdraw $50 since that is the \ amount of cash they have remaining."] - pub pre_pay_cash_remaining: bigdecimal::BigDecimal, + pub pre_pay_cash_remaining: f64, #[doc = "The amount of credits remaining in the balance. This is typically the amount of cash \ * some multiplier they get for pre-paying their account. This number lowers every \ time a bill is paid with the balance. This number increases every time a user adds \ funds to their balance. This may be through a subscription or a one off payment."] - pub pre_pay_credits_remaining: bigdecimal::BigDecimal, + pub pre_pay_credits_remaining: f64, #[doc = "This includes any outstanding, draft, or open invoices and any pending invoice \ items. This does not include any credits the user has on their account."] - pub total_due: bigdecimal::BigDecimal, + pub total_due: f64, #[doc = "The date and time the balance was last updated."] pub updated_at: chrono::DateTime, #[doc = "The user ID the balance belongs to."] @@ -5233,6 +5233,45 @@ impl tabled::Tabled for GetEntityType { } } +#[doc = "The plane for sketch mode."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct GetSketchModePlane { + #[doc = "The x axis."] + pub x_axis: Point3D, + #[doc = "The y axis."] + pub y_axis: Point3D, + #[doc = "The z axis (normal)."] + pub z_axis: Point3D, +} + +impl std::fmt::Display for GetSketchModePlane { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +#[cfg(feature = "tabled")] +impl tabled::Tabled for GetSketchModePlane { + const LENGTH: usize = 3; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.x_axis).into(), + format!("{:?}", self.y_axis).into(), + format!("{:?}", self.z_axis).into(), + ] + } + + fn headers() -> Vec> { + vec!["x_axis".into(), "y_axis".into(), "z_axis".into()] + } +} + #[doc = "Describes the presentation style of the glTF JSON."] #[derive( serde :: Serialize, @@ -5565,13 +5604,13 @@ pub struct Invoice { also take that into account. The charge that gets generated for the invoice will be \ for the amount specified in `amount_due`."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_due: Option, + pub amount_due: Option, #[doc = "The amount, in USD, that was paid."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_paid: Option, + pub amount_paid: Option, #[doc = "The amount remaining, in USD, that is due."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_remaining: Option, + pub amount_remaining: Option, #[doc = "Number of payment attempts made for this invoice, from the perspective of the \ payment retry schedule.\n\nAny payment attempt counts as the first attempt, and \ subsequently only automatic retries increment the attempt count. In other words, \ @@ -5641,14 +5680,14 @@ pub struct Invoice { #[doc = "Total of all subscriptions, invoice items, and prorations on the invoice before any \ invoice level discount or tax is applied.\n\nItem discounts are already incorporated."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub subtotal: Option, + pub subtotal: Option, #[doc = "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this \ invoice."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub tax: Option, + pub tax: Option, #[doc = "Total after discounts and taxes."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub total: Option, + pub total: Option, #[doc = "The URL for the hosted invoice page, which allows customers to view and pay an \ invoice."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -5832,7 +5871,7 @@ impl tabled::Tabled for Invoice { pub struct InvoiceLineItem { #[doc = "The amount, in USD."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount: Option, + pub amount: Option, #[doc = "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), \ in lowercase."] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -6893,6 +6932,9 @@ pub enum ModelingCmd { SketchModeEnable { #[doc = "Animate the transition to sketch mode."] animated: bool, + #[doc = "Disable the camera entirely for sketch mode and sketch on a plane (this would be \ + the normal of that plane)."] + disable_camera_with_plane: Option, #[doc = "Use an orthographic camera."] ortho: bool, #[doc = "Sketch on this plane."] @@ -7065,6 +7107,10 @@ pub enum ModelingCmd { #[doc = "Select the unit interpretation of distances in the scene."] source_unit: UnitLength, }, + #[doc = "Get the plane of the sketch mode. This is useful for getting the normal of the plane \ + after a user selects a plane."] + #[serde(rename = "get_sketch_mode_plane")] + GetSketchModePlane {}, } #[doc = "The response from the `MouseClick` command."] @@ -7463,6 +7509,12 @@ pub enum OkModelingCmdResponse { #[doc = "The center of mass response."] data: CenterOfMass, }, + #[doc = "The response from the `GetSketchModePlane` command."] + #[serde(rename = "get_sketch_mode_plane")] + GetSketchModePlane { + #[doc = "The plane for sketch mode."] + data: GetSketchModePlane, + }, } #[doc = "The websocket messages this server sends."] @@ -8725,7 +8777,8 @@ impl tabled::Tabled for Solid3DGetAllOppositeEdges { )] pub struct Solid3DGetNextAdjacentEdge { #[doc = "The UUID of the edge."] - pub edge: uuid::Uuid, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub edge: Option, } impl std::fmt::Display for Solid3DGetNextAdjacentEdge { @@ -8742,7 +8795,11 @@ impl std::fmt::Display for Solid3DGetNextAdjacentEdge { impl tabled::Tabled for Solid3DGetNextAdjacentEdge { const LENGTH: usize = 1; fn fields(&self) -> Vec> { - vec![format!("{:?}", self.edge).into()] + vec![if let Some(edge) = &self.edge { + format!("{:?}", edge).into() + } else { + String::new().into() + }] } fn headers() -> Vec> { @@ -8787,7 +8844,8 @@ impl tabled::Tabled for Solid3DGetOppositeEdge { )] pub struct Solid3DGetPrevAdjacentEdge { #[doc = "The UUID of the edge."] - pub edge: uuid::Uuid, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub edge: Option, } impl std::fmt::Display for Solid3DGetPrevAdjacentEdge { @@ -8804,7 +8862,11 @@ impl std::fmt::Display for Solid3DGetPrevAdjacentEdge { impl tabled::Tabled for Solid3DGetPrevAdjacentEdge { const LENGTH: usize = 1; fn fields(&self) -> Vec> { - vec![format!("{:?}", self.edge).into()] + vec![if let Some(edge) = &self.edge { + format!("{:?}", edge).into() + } else { + String::new().into() + }] } fn headers() -> Vec> { diff --git a/openapitor/tests/types/kittycad.rs.gen b/openapitor/tests/types/kittycad.rs.gen index 3160d92e..b384bbe8 100644 --- a/openapitor/tests/types/kittycad.rs.gen +++ b/openapitor/tests/types/kittycad.rs.gen @@ -1160,7 +1160,7 @@ pub struct ApiCallWithPrice { pub origin: Option, #[doc = "The price of the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub price: Option, + pub price: Option, #[doc = "The request body sent by the API call."] #[serde(default, skip_serializing_if = "Option::is_none")] pub request_body: Option, @@ -3009,7 +3009,7 @@ impl tabled::Tabled for Connection { pub struct Coupon { #[doc = "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_off: Option, + pub amount_off: Option, #[doc = "Always true for a deleted object."] #[serde(default, skip_serializing_if = "Option::is_none")] pub deleted: Option, @@ -3228,7 +3228,7 @@ pub struct Customer { pub address: Option, #[doc = "Current balance, if any, being stored on the customer in the payments service.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub balance: Option, + pub balance: Option, #[doc = "Time at which the object was created."] pub created_at: chrono::DateTime, #[doc = "Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes."] @@ -3340,13 +3340,13 @@ pub struct CustomerBalance { #[doc = "The unique identifier for the balance."] pub id: uuid::Uuid, #[doc = "The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the user per month."] - pub monthly_credits_remaining: bigdecimal::BigDecimal, + pub monthly_credits_remaining: f64, #[doc = "The amount of pre-pay cash remaining in the balance. This number goes down as the user uses their pre-paid credits. The reason we track this amount is if a user ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a user has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining."] - pub pre_pay_cash_remaining: bigdecimal::BigDecimal, + pub pre_pay_cash_remaining: f64, #[doc = "The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a user adds funds to their balance. This may be through a subscription or a one off payment."] - pub pre_pay_credits_remaining: bigdecimal::BigDecimal, + pub pre_pay_credits_remaining: f64, #[doc = "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the user has on their account."] - pub total_due: bigdecimal::BigDecimal, + pub total_due: f64, #[doc = "The date and time the balance was last updated."] pub updated_at: chrono::DateTime, #[doc = "The user ID the balance belongs to."] @@ -5160,6 +5160,45 @@ impl tabled::Tabled for GetEntityType { } } +#[doc = "The plane for sketch mode."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct GetSketchModePlane { + #[doc = "The x axis."] + pub x_axis: Point3D, + #[doc = "The y axis."] + pub y_axis: Point3D, + #[doc = "The z axis (normal)."] + pub z_axis: Point3D, +} + +impl std::fmt::Display for GetSketchModePlane { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +#[cfg(feature = "tabled")] +impl tabled::Tabled for GetSketchModePlane { + const LENGTH: usize = 3; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.x_axis).into(), + format!("{:?}", self.y_axis).into(), + format!("{:?}", self.z_axis).into(), + ] + } + + fn headers() -> Vec> { + vec!["x_axis".into(), "y_axis".into(), "z_axis".into()] + } +} + #[doc = "Describes the presentation style of the glTF JSON."] #[derive( serde :: Serialize, @@ -5477,13 +5516,13 @@ pub enum InputFormat { pub struct Invoice { #[doc = "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_due: Option, + pub amount_due: Option, #[doc = "The amount, in USD, that was paid."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_paid: Option, + pub amount_paid: Option, #[doc = "The amount remaining, in USD, that is due."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount_remaining: Option, + pub amount_remaining: Option, #[doc = "Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.\n\nAny payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule."] #[serde(default, skip_serializing_if = "Option::is_none")] pub attempt_count: Option, @@ -5539,13 +5578,13 @@ pub struct Invoice { pub status: Option, #[doc = "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub subtotal: Option, + pub subtotal: Option, #[doc = "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub tax: Option, + pub tax: Option, #[doc = "Total after discounts and taxes."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub total: Option, + pub total: Option, #[doc = "The URL for the hosted invoice page, which allows customers to view and pay an invoice."] #[serde(default, skip_serializing_if = "Option::is_none")] pub url: Option, @@ -5728,7 +5767,7 @@ impl tabled::Tabled for Invoice { pub struct InvoiceLineItem { #[doc = "The amount, in USD."] #[serde(default, skip_serializing_if = "Option::is_none")] - pub amount: Option, + pub amount: Option, #[doc = "Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase."] #[serde(default, skip_serializing_if = "Option::is_none")] pub currency: Option, @@ -6761,6 +6800,8 @@ pub enum ModelingCmd { SketchModeEnable { #[doc = "Animate the transition to sketch mode."] animated: bool, + #[doc = "Disable the camera entirely for sketch mode and sketch on a plane (this would be the normal of that plane)."] + disable_camera_with_plane: Option, #[doc = "Use an orthographic camera."] ortho: bool, #[doc = "Sketch on this plane."] @@ -6923,6 +6964,9 @@ pub enum ModelingCmd { #[doc = "Select the unit interpretation of distances in the scene."] source_unit: UnitLength, }, + #[doc = "Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane."] + #[serde(rename = "get_sketch_mode_plane")] + GetSketchModePlane {}, } #[doc = "The response from the `MouseClick` command."] @@ -7313,6 +7357,12 @@ pub enum OkModelingCmdResponse { #[doc = "The center of mass response."] data: CenterOfMass, }, + #[doc = "The response from the `GetSketchModePlane` command."] + #[serde(rename = "get_sketch_mode_plane")] + GetSketchModePlane { + #[doc = "The plane for sketch mode."] + data: GetSketchModePlane, + }, } #[doc = "The websocket messages this server sends."] @@ -8548,7 +8598,8 @@ impl tabled::Tabled for Solid3DGetAllOppositeEdges { )] pub struct Solid3DGetNextAdjacentEdge { #[doc = "The UUID of the edge."] - pub edge: uuid::Uuid, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub edge: Option, } impl std::fmt::Display for Solid3DGetNextAdjacentEdge { @@ -8565,7 +8616,11 @@ impl std::fmt::Display for Solid3DGetNextAdjacentEdge { impl tabled::Tabled for Solid3DGetNextAdjacentEdge { const LENGTH: usize = 1; fn fields(&self) -> Vec> { - vec![format!("{:?}", self.edge).into()] + vec![if let Some(edge) = &self.edge { + format!("{:?}", edge).into() + } else { + String::new().into() + }] } fn headers() -> Vec> { @@ -8610,7 +8665,8 @@ impl tabled::Tabled for Solid3DGetOppositeEdge { )] pub struct Solid3DGetPrevAdjacentEdge { #[doc = "The UUID of the edge."] - pub edge: uuid::Uuid, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub edge: Option, } impl std::fmt::Display for Solid3DGetPrevAdjacentEdge { @@ -8627,7 +8683,11 @@ impl std::fmt::Display for Solid3DGetPrevAdjacentEdge { impl tabled::Tabled for Solid3DGetPrevAdjacentEdge { const LENGTH: usize = 1; fn fields(&self) -> Vec> { - vec![format!("{:?}", self.edge).into()] + vec![if let Some(edge) = &self.edge { + format!("{:?}", edge).into() + } else { + String::new().into() + }] } fn headers() -> Vec> { diff --git a/spec.json b/spec.json index 0202c1a8..1ef4b8ce 100644 --- a/spec.json +++ b/spec.json @@ -569,9 +569,8 @@ "description": "The price of the API call.", "format": "money-usd", "nullable": true, - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "request_body": { "description": "The request body sent by the API call.", @@ -2244,9 +2243,8 @@ "description": "Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.", "format": "money-usd", "nullable": true, - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "deleted": { "default": false, @@ -2373,9 +2371,8 @@ "default": 0.0, "description": "Current balance, if any, being stored on the customer in the payments service.\n\nIf negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "created_at": { "description": "Time at which the object was created.", @@ -2450,30 +2447,26 @@ "monthly_credits_remaining": { "description": "The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the user per month.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "pre_pay_cash_remaining": { "description": "The amount of pre-pay cash remaining in the balance. This number goes down as the user uses their pre-paid credits. The reason we track this amount is if a user ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a user has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "pre_pay_credits_remaining": { "description": "The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a user adds funds to their balance. This may be through a subscription or a one off payment.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "total_due": { "description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the user has on their account.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "updated_at": { "description": "The date and time the balance was last updated.", @@ -3762,6 +3755,41 @@ ], "type": "object" }, + "GetSketchModePlane": { + "description": "The plane for sketch mode.", + "properties": { + "x_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "The x axis." + }, + "y_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "The y axis." + }, + "z_axis": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "The z axis (normal)." + } + }, + "required": [ + "x_axis", + "y_axis", + "z_axis" + ], + "type": "object" + }, "GltfPresentation": { "description": "Describes the presentation style of the glTF JSON.", "oneOf": [ @@ -4087,25 +4115,22 @@ "default": 0.0, "description": "Final amount due at this time for this invoice.\n\nIf the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "amount_paid": { "default": 0.0, "description": "The amount, in USD, that was paid.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "amount_remaining": { "default": 0.0, "description": "The amount remaining, in USD, that is due.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "attempt_count": { "default": 0, @@ -4212,25 +4237,22 @@ "default": 0.0, "description": "Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.\n\nItem discounts are already incorporated.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "tax": { "default": 0.0, "description": "The amount of tax on this invoice.\n\nThis is the sum of all the tax amounts on this invoice.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "total": { "default": 0.0, "description": "Total after discounts and taxes.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "url": { "description": "The URL for the hosted invoice page, which allows customers to view and pay an invoice.", @@ -4251,9 +4273,8 @@ "default": 0.0, "description": "The amount, in USD.", "format": "money-usd", - "pattern": "^-?[0-9]+(\\.[0-9]+)?$", - "title": "Decimal", - "type": "string" + "title": "double", + "type": "number" }, "currency": { "allOf": [ @@ -5985,6 +6006,15 @@ "description": "Animate the transition to sketch mode.", "type": "boolean" }, + "disable_camera_with_plane": { + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ], + "description": "Disable the camera entirely for sketch mode and sketch on a plane (this would be the normal of that plane).", + "nullable": true + }, "ortho": { "description": "Use an orthographic camera.", "type": "boolean" @@ -6619,6 +6649,21 @@ "type" ], "type": "object" + }, + { + "description": "Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane.", + "properties": { + "type": { + "enum": [ + "get_sketch_mode_plane" + ], + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" } ] }, @@ -7274,6 +7319,25 @@ "type" ], "type": "object" + }, + { + "description": "The response from the `GetSketchModePlane` command.", + "properties": { + "data": { + "$ref": "#/components/schemas/GetSketchModePlane" + }, + "type": { + "enum": [ + "get_sketch_mode_plane" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" } ] }, @@ -8425,12 +8489,10 @@ "edge": { "description": "The UUID of the edge.", "format": "uuid", + "nullable": true, "type": "string" } }, - "required": [ - "edge" - ], "type": "object" }, "Solid3dGetOppositeEdge": { @@ -8453,12 +8515,10 @@ "edge": { "description": "The UUID of the edge.", "format": "uuid", + "nullable": true, "type": "string" } }, - "required": [ - "edge" - ], "type": "object" }, "StlStorage": { @@ -12259,8 +12319,7 @@ "summary": "Get CAD file center of mass.", "tags": [ "file", - "beta", - "hidden" + "beta" ] } }, @@ -13057,8 +13116,7 @@ "summary": "Get CAD file surface area.", "tags": [ "file", - "beta", - "hidden" + "beta" ] } }, @@ -13204,8 +13262,7 @@ "summary": "Get CAD file volume.", "tags": [ "file", - "beta", - "hidden" + "beta" ] } }, @@ -17653,7 +17710,7 @@ "summary": "Open a websocket which accepts modeling commands.", "tags": [ "modeling", - "hidden" + "beta" ], "x-dropshot-websocket": {} }