diff --git a/Cargo.lock b/Cargo.lock index 97d357b4..cde1a8ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -944,15 +944,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" -dependencies = [ - "either", -] - [[package]] name = "itoa" version = "1.0.9" @@ -993,7 +984,7 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.3.2" +version = "0.3.3" dependencies = [ "anyhow", "async-trait", @@ -1009,7 +1000,7 @@ dependencies = [ "futures", "futures-util", "http 0.2.9", - "itertools 0.13.0", + "itertools", "log", "mime_guess", "parse-display", @@ -1384,7 +1375,7 @@ dependencies = [ "bincode", "either", "fnv", - "itertools 0.12.1", + "itertools", "lazy_static", "nom", "quick-xml", diff --git a/kittycad.rs.patch.json b/kittycad.rs.patch.json index 65ca005d..c623685d 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.3.2\"" + "install": "[dependencies]\nkittycad = \"0.3.3\"" } }, { diff --git a/kittycad/Cargo.toml b/kittycad/Cargo.toml index 631bc950..ca016741 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.3.2" +version = "0.3.3" documentation = "https://docs.rs/kittycad" readme = "README.md" repository = "https://github.com/KittyCAD/kittycad.rs/tree/main/kittycad" @@ -21,7 +21,7 @@ dirs = { version = "^5.0.1", optional = true } format_serde_error = { version = "^0.3.0", optional = true } futures = { version = "0.3.26", optional = true } http = { version = "^0.2.8", optional = true } -itertools = "0.13.0" +itertools = "0.12.1" log = { version = "^0.4", features = ["serde"], optional = true } mime_guess = "2.0.4" parse-display = "0.9.0" @@ -32,7 +32,7 @@ reqwest-conditional-middleware = { version = "0.2.1", optional = true } reqwest-middleware = { version = "0.2.2", optional = true } reqwest-retry = { version = "0.2.2", optional = true } reqwest-tracing = { version = "0.4.4", features = ["opentelemetry_0_17"], optional = true } -schemars = { version = "0.8.20", features = ["bigdecimal04", "bytes", "chrono", "url", "uuid1"] } +schemars = { version = "0.8.16", features = ["bigdecimal04", "bytes", "chrono", "url", "uuid1"] } serde = { version = "1", features = ["derive"] } serde_bytes = "0.11" serde_json = "1" diff --git a/kittycad/README.md b/kittycad/README.md index 29c4680c..5c122474 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.3.2" +kittycad = "0.3.3" ``` ## Basic example diff --git a/kittycad/src/lib.rs b/kittycad/src/lib.rs index 4e9db611..325a3d53 100644 --- a/kittycad/src/lib.rs +++ b/kittycad/src/lib.rs @@ -29,7 +29,7 @@ //! //! ```toml //! [dependencies] -//! kittycad = "0.3.2" +//! kittycad = "0.3.3" //! ``` //! //! ## Basic example diff --git a/kittycad/src/types.rs b/kittycad/src/types.rs index 5014eb28..f97fca7b 100644 --- a/kittycad/src/types.rs +++ b/kittycad/src/types.rs @@ -9491,6 +9491,18 @@ pub enum OkModelingCmdResponse { #[doc = "The response from the `DefaultCameraZoom` command."] data: DefaultCameraZoom, }, + #[doc = "The response to the 'ZoomToFit' endpoint"] + #[serde(rename = "zoom_to_fit")] + ZoomToFit { + #[doc = "The response from the `ZoomToFit` command."] + data: ZoomToFit, + }, + #[doc = "The response to the 'ViewIsometric' endpoint"] + #[serde(rename = "view_isometric")] + ViewIsometric { + #[doc = "The response from the `ViewIsometric` command."] + data: ViewIsometric, + }, #[doc = "The response to the 'GetNumObjects' endpoint"] #[serde(rename = "get_num_objects")] GetNumObjects { @@ -15274,6 +15286,37 @@ impl tabled::Tabled for VerificationTokenResponse { } } +#[doc = "The response from the `ViewIsometric` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ViewIsometric { + #[doc = "Camera settings"] + pub settings: CameraSettings, +} + +impl std::fmt::Display for ViewIsometric { + 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 ViewIsometric { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.settings).into()] + } + + fn headers() -> Vec> { + vec!["settings".into()] + } +} + #[doc = "The volume response."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -15651,3 +15694,34 @@ pub enum ZooTool { #[display("diff_chrome_extension")] DiffChromeExtension, } + +#[doc = "The response from the `ZoomToFit` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ZoomToFit { + #[doc = "Camera settings"] + pub settings: CameraSettings, +} + +impl std::fmt::Display for ZoomToFit { + 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 ZoomToFit { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.settings).into()] + } + + fn headers() -> Vec> { + vec!["settings".into()] + } +} diff --git a/openapitor/tests/types/kittycad.rs.gen b/openapitor/tests/types/kittycad.rs.gen index adaea95c..f0553b18 100644 --- a/openapitor/tests/types/kittycad.rs.gen +++ b/openapitor/tests/types/kittycad.rs.gen @@ -9305,6 +9305,18 @@ pub enum OkModelingCmdResponse { #[doc = "The response from the `DefaultCameraZoom` command."] data: DefaultCameraZoom, }, + #[doc = "The response to the 'ZoomToFit' endpoint"] + #[serde(rename = "zoom_to_fit")] + ZoomToFit { + #[doc = "The response from the `ZoomToFit` command."] + data: ZoomToFit, + }, + #[doc = "The response to the 'ViewIsometric' endpoint"] + #[serde(rename = "view_isometric")] + ViewIsometric { + #[doc = "The response from the `ViewIsometric` command."] + data: ViewIsometric, + }, #[doc = "The response to the 'GetNumObjects' endpoint"] #[serde(rename = "get_num_objects")] GetNumObjects { @@ -15020,6 +15032,37 @@ impl tabled::Tabled for VerificationTokenResponse { } } +#[doc = "The response from the `ViewIsometric` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ViewIsometric { + #[doc = "Camera settings"] + pub settings: CameraSettings, +} + +impl std::fmt::Display for ViewIsometric { + 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 ViewIsometric { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.settings).into()] + } + + fn headers() -> Vec> { + vec!["settings".into()] + } +} + #[doc = "The volume response."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -15387,3 +15430,34 @@ pub enum ZooTool { #[display("diff_chrome_extension")] DiffChromeExtension, } + +#[doc = "The response from the `ZoomToFit` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ZoomToFit { + #[doc = "Camera settings"] + pub settings: CameraSettings, +} + +impl std::fmt::Display for ZoomToFit { + 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 ZoomToFit { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.settings).into()] + } + + fn headers() -> Vec> { + vec!["settings".into()] + } +} diff --git a/spec.json b/spec.json index ac3daba5..e66ba256 100644 --- a/spec.json +++ b/spec.json @@ -21787,6 +21787,44 @@ "type" ] }, + { + "description": "The response to the 'ZoomToFit' endpoint", + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ZoomToFit" + }, + "type": { + "type": "string", + "enum": [ + "zoom_to_fit" + ] + } + }, + "required": [ + "data", + "type" + ] + }, + { + "description": "The response to the 'ViewIsometric' endpoint", + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/ViewIsometric" + }, + "type": { + "type": "string", + "enum": [ + "view_isometric" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "description": "The response to the 'GetNumObjects' endpoint", "type": "object", @@ -27201,6 +27239,23 @@ "updated_at" ] }, + "ViewIsometric": { + "description": "The response from the `ViewIsometric` command.", + "type": "object", + "properties": { + "settings": { + "description": "Camera settings", + "allOf": [ + { + "$ref": "#/components/schemas/CameraSettings" + } + ] + } + }, + "required": [ + "settings" + ] + }, "Volume": { "description": "The volume response.", "type": "object", @@ -27588,6 +27643,23 @@ ] } ] + }, + "ZoomToFit": { + "description": "The response from the `ZoomToFit` command.", + "type": "object", + "properties": { + "settings": { + "description": "Camera settings", + "allOf": [ + { + "$ref": "#/components/schemas/CameraSettings" + } + ] + } + }, + "required": [ + "settings" + ] } }, "responses": {