diff --git a/Cargo.lock b/Cargo.lock index 33c4c2aa..2472982b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -29,13 +29,19 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -66,30 +72,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -105,9 +110,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -115,9 +120,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" dependencies = [ "backtrace", ] @@ -136,13 +141,13 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -164,9 +169,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -179,15 +184,15 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "bigdecimal" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aaf33151a6429fe9211d1b276eafdf70cdff28b071e76c0b0e1503221ea3744" +checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ "num-bigint", "num-integer", @@ -209,6 +214,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" + [[package]] name = "block-buffer" version = "0.10.4" @@ -220,9 +231,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "bytecount" @@ -247,9 +258,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -259,12 +273,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", "serde", "winapi", @@ -272,9 +286,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.21" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d" dependencies = [ "clap_builder", "clap_derive", @@ -283,9 +297,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.21" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6" dependencies = [ "anstream", "anstyle", @@ -299,31 +313,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] name = "clap_lex" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" - -[[package]] -name = "codespan-reporting" -version = "0.11.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" -dependencies = [ - "termcolor", - "unicode-width", -] +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" @@ -333,26 +337,26 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "2.0.0" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" dependencies = [ - "atty", + "is-terminal", "lazy_static", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "console" -version = "0.15.5" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", "unicode-width", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -363,9 +367,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.7" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" +checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" dependencies = [ "libc", ] @@ -382,9 +386,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -400,64 +404,16 @@ dependencies = [ ] [[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cxx" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" -dependencies = [ - "cc", - "cxxbridge-flags", - "cxxbridge-macro", - "link-cplusplus", -] - -[[package]] -name = "cxx-build" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" -dependencies = [ - "cc", - "codespan-reporting", - "once_cell", - "proc-macro2", - "quote", - "scratch", - "syn 2.0.15", -] - -[[package]] -name = "cxxbridge-flags" -version = "1.0.94" +name = "data-encoding" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" +checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] -name = "cxxbridge-macro" -version = "1.0.94" +name = "deranged" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.15", -] - -[[package]] -name = "data-encoding" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d8666cb01533c39dde32bcbab8e227b4ed6679b2c925eba05feabea39508fb" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" [[package]] name = "diff" @@ -519,15 +475,15 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encode_unicode" @@ -537,18 +493,24 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", @@ -578,12 +540,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "fnv" @@ -593,9 +552,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" dependencies = [ "percent-encoding", ] @@ -669,7 +628,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -714,9 +673,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -727,15 +686,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.2" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "h2" -version = "0.3.18" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -743,7 +702,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "slab", "tokio", "tokio-util", @@ -756,6 +715,12 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" + [[package]] name = "heck" version = "0.4.1" @@ -773,17 +738,17 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" +checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" [[package]] name = "home" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "747309b4b440c06d57b0b25f2aee03ee9b5e5397d288c60e21fc709bb98a7408" +checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" dependencies = [ - "winapi", + "windows-sys 0.48.0", ] [[package]] @@ -816,15 +781,15 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.26" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -837,7 +802,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -860,9 +825,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.56" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -874,19 +839,18 @@ dependencies = [ [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] name = "idna" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -899,10 +863,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] +[[package]] +name = "indexmap" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +dependencies = [ + "equivalent", + "hashbrown 0.14.0", +] + [[package]] name = "instant" version = "0.1.12" @@ -917,30 +891,29 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" +checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" dependencies = [ - "hermit-abi 0.3.1", + "hermit-abi 0.3.2", "libc", "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.2" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.1", - "io-lifetimes", - "rustix", + "hermit-abi 0.3.2", + "rustix 0.38.8", "windows-sys 0.48.0", ] @@ -955,15 +928,15 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -981,7 +954,7 @@ dependencies = [ [[package]] name = "kittycad" -version = "0.2.18" +version = "0.2.19" dependencies = [ "anyhow", "async-trait", @@ -1028,18 +1001,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" - -[[package]] -name = "link-cplusplus" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" -dependencies = [ - "cc", -] +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] name = "linked-hash-map" @@ -1049,15 +1013,21 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.3.1" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" + +[[package]] +name = "linux-raw-sys" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -1065,11 +1035,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" dependencies = [ - "cfg-if", "serde", ] @@ -1084,9 +1053,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "ed1202b2a6f884ae56f04cff409ab315c5ce26b5e58d7412e484f01fd52f52ef" [[package]] name = "memchr" @@ -1118,23 +1087,22 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -1158,9 +1126,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1179,9 +1147,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -1203,18 +1171,18 @@ checksum = "049950a25a8f69e9673ed52fc58749548cee71194f6c3a8a04b80863637ce722" [[package]] name = "object" -version = "0.30.3" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "oncemutex" @@ -1237,7 +1205,7 @@ dependencies = [ "futures", "futures-util", "http", - "indexmap", + "indexmap 1.9.3", "json-patch", "log", "numeral", @@ -1255,7 +1223,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "serde_yaml 0.9.21", + "serde_yaml 0.9.25", "slog", "slog-async", "slog-json", @@ -1274,7 +1242,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b1a9f106eb0a780abd17ba9fca8e0843e3461630bcbe2af0ad4d5d3ba4e9aa4" dependencies = [ - "indexmap", + "indexmap 1.9.3", "serde", "serde_json", ] @@ -1304,15 +1272,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" -[[package]] -name = "output_vt100" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628223faebab4e3e40667ee0b2336d34a5b960ff60ea743ddfdbcf7770bcfb66" -dependencies = [ - "winapi", -] - [[package]] name = "papergrid" version = "0.10.0" @@ -1353,9 +1312,9 @@ dependencies = [ [[package]] name = "parse-display" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddcac6cdc2aaa03a89780c6681ffb46ac5b4b7dbade8d2a20a6a501f6fd363a8" +checksum = "c6509d08722b53e8dafe97f2027b22ccbe3a5db83cb352931e9716b0aa44bc5c" dependencies = [ "once_cell", "parse-display-derive", @@ -1364,30 +1323,30 @@ dependencies = [ [[package]] name = "parse-display-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e503280f7d6dbf7566bc63d903c3b0f595fc11553a7e1f87f81adb8fcbca983" +checksum = "68517892c8daf78da08c0db777fcc17e07f2f63ef70041718f8a7630ad84f341" dependencies = [ "once_cell", "proc-macro2", "quote", "regex", - "regex-syntax", + "regex-syntax 0.7.4", "structmeta", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.5.7" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" +checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" dependencies = [ "thiserror", "ucd-trie", @@ -1415,29 +1374,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" [[package]] name = "pin-utils" @@ -1453,13 +1412,11 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25e9bcb20aa780fd0bb16b72403a9064d6b3f22f026946029acb941a50af755" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ctor", "diff", - "output_vt100", "yansi", ] @@ -1489,9 +1446,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1507,9 +1464,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1550,7 +1507,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1559,7 +1516,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1575,13 +1532,25 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.3" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-automata", + "regex-syntax 0.7.4", +] + +[[package]] +name = "regex-automata" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.7.4", ] [[package]] @@ -1593,7 +1562,7 @@ dependencies = [ "lru-cache", "oncemutex", "regex", - "regex-syntax", + "regex-syntax 0.6.29", ] [[package]] @@ -1602,11 +1571,17 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" + [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "base64", "bytes", @@ -1656,9 +1631,9 @@ dependencies = [ [[package]] name = "reqwest-middleware" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4531c89d50effe1fac90d095c8b133c20c5c714204feee0bfc3fd158e784209d" +checksum = "ff44108c7925d082f2861e683a88618b68235ad9cdc60d64d9d1188efc951cdb" dependencies = [ "anyhow", "async-trait", @@ -1694,9 +1669,9 @@ dependencies = [ [[package]] name = "reqwest-tracing" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "783e8130d2427ddd7897dd3f814d4a3aea31b05deb42a4fdf8c18258fe5aefd1" +checksum = "14b1e66540e0cac90acadaf7109bf99c90d95abcc94b4c096bfa16a2d7aa7a71" dependencies = [ "anyhow", "async-trait", @@ -1757,15 +1732,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.11" +version = "0.37.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", - "linux-raw-sys", + "linux-raw-sys 0.3.8", + "windows-sys 0.48.0", +] + +[[package]] +name = "rustix" +version = "0.38.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +dependencies = [ + "bitflags 2.4.0", + "errno", + "libc", + "linux-raw-sys 0.4.5", "windows-sys 0.48.0", ] @@ -1783,18 +1771,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64", ] [[package]] name = "rustls-webpki" -version = "0.101.3" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261e9e0888cba427c3316e6322805653c9425240b6fd96cee7cb671ab70ab8d0" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring", "untrusted", @@ -1802,15 +1790,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -1852,15 +1840,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "scratch" -version = "1.0.5" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -1892,22 +1874,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.160" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -1923,9 +1905,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.96" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa", "ryu", @@ -1950,7 +1932,7 @@ version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ - "indexmap", + "indexmap 1.9.3", "ryu", "serde", "yaml-rust", @@ -1958,11 +1940,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.21" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9d684e3ec7de3bf5466b32bd75303ac16f0736426e5a4e0d6e489559ce1249c" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap", + "indexmap 2.0.0", "itoa", "ryu", "serde", @@ -1997,9 +1979,9 @@ checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -2071,9 +2053,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" [[package]] name = "socket2" @@ -2085,6 +2067,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -2106,7 +2098,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -2117,7 +2109,7 @@ checksum = "a60bcaff7397072dca0017d1db428e30d5002e00b6847703e2e42005c95fbe00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -2133,9 +2125,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.15" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -2185,15 +2177,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.5.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix", - "windows-sys 0.45.0", + "rustix 0.38.8", + "windows-sys 0.48.0", ] [[package]] @@ -2207,22 +2199,13 @@ dependencies = [ "winapi", ] -[[package]] -name = "termcolor" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" -dependencies = [ - "winapi-util", -] - [[package]] name = "terminal_size" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" dependencies = [ - "rustix", + "rustix 0.37.23", "windows-sys 0.48.0", ] @@ -2249,22 +2232,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -2279,10 +2262,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" dependencies = [ + "deranged", "itoa", "libc", "num_threads", @@ -2293,15 +2277,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" dependencies = [ "time-core", ] @@ -2323,29 +2307,29 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", + "backtrace", "bytes", "libc", "mio", "pin-project-lite", - "socket2", + "socket2 0.5.3", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.15", + "syn 2.0.29", ] [[package]] @@ -2372,9 +2356,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -2426,20 +2410,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -2472,9 +2456,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "sharded-slab", "thread_local", @@ -2523,15 +2507,15 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ucd-trie" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -2544,9 +2528,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -2571,9 +2555,9 @@ checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "untrusted" @@ -2583,9 +2567,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" dependencies = [ "form_urlencoded", "idna", @@ -2607,9 +2591,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom", "serde", @@ -2661,11 +2645,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -2677,9 +2660,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2687,24 +2670,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -2714,9 +2697,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2724,22 +2707,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-timer" @@ -2758,32 +2741,19 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "webpki" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "webpki-roots" -version = "0.22.6" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] +checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "winapi" @@ -2822,22 +2792,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.5", ] [[package]] @@ -2855,7 +2810,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.5", ] [[package]] @@ -2875,17 +2830,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", ] [[package]] @@ -2896,9 +2851,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -2908,9 +2863,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -2920,9 +2875,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -2932,9 +2887,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -2944,9 +2899,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -2956,9 +2911,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -2968,17 +2923,18 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] diff --git a/kittycad.rs.patch.json b/kittycad.rs.patch.json index 2189a663..adaa885e 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.18\"" + "install": "[dependencies]\nkittycad = \"0.2.19\"" } }, { diff --git a/kittycad/Cargo.toml b/kittycad/Cargo.toml index 89b24976..928d1681 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.18" +version = "0.2.19" 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 92a4a121..dcd78ab7 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.18" +kittycad = "0.2.19" ``` ## Basic example diff --git a/kittycad/src/lib.rs b/kittycad/src/lib.rs index e20e9291..67fb5479 100644 --- a/kittycad/src/lib.rs +++ b/kittycad/src/lib.rs @@ -29,7 +29,7 @@ //! //! ```toml //! [dependencies] -//! kittycad = "0.2.18" +//! kittycad = "0.2.19" //! ``` //! //! ## Basic example diff --git a/kittycad/src/types.rs b/kittycad/src/types.rs index 04d0d9f2..ef649ca9 100644 --- a/kittycad/src/types.rs +++ b/kittycad/src/types.rs @@ -1361,6 +1361,42 @@ impl tabled::Tabled for ApiCallWithPriceResultsPage { } } +#[doc = "An error."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ApiError { + #[doc = "The error code."] + pub error_code: ErrorCode, + #[doc = "The error message."] + pub message: String, +} + +impl std::fmt::Display for ApiError { + 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 ApiError { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.error_code).into(), + self.message.clone().into(), + ] + } + + fn headers() -> Vec> { + vec!["error_code".into(), "message".into()] + } +} + #[doc = "An API token.\n\nThese are used to authenticate users with Bearer authentication."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -1496,6 +1532,73 @@ impl tabled::Tabled for ApiTokenResultsPage { } } +#[doc = "Websocket responses can either be successful or unsuccessful. Slightly different schemas \ + in either case."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ApiWebSocketResponse { + #[doc = "The errors that occurred. If `success` is true, this is empty. If `success` is \ + false, this should be non-empty."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub errors: Option>, + #[doc = "Which request this is a response to. If the request was a modeling command, this is \ + the modeling command ID. If no request ID was sent, this will be null."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub request_id: Option, + #[doc = "The data sent with a successful response. This will be flattened into a 'type' and \ + 'data' field. If `success` is true, this is non-empty. If `success` is false, this \ + is empty."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resp: Option, + #[doc = "Always false"] + pub success: bool, +} + +impl std::fmt::Display for ApiWebSocketResponse { + 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 ApiWebSocketResponse { + const LENGTH: usize = 4; + fn fields(&self) -> Vec> { + vec![ + if let Some(errors) = &self.errors { + format!("{:?}", errors).into() + } else { + String::new().into() + }, + if let Some(request_id) = &self.request_id { + format!("{:?}", request_id).into() + } else { + String::new().into() + }, + if let Some(resp) = &self.resp { + format!("{:?}", resp).into() + } else { + String::new().into() + }, + format!("{:?}", self.success).into(), + ] + } + + fn headers() -> Vec> { + vec![ + "errors".into(), + "request_id".into(), + "resp".into(), + "success".into(), + ] + } +} + #[doc = "Information about a third party app client."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -4490,6 +4593,68 @@ pub enum Currency { Zmw, } +#[doc = "The response from the `CurveGetControlPoints` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct CurveGetControlPoints { + #[doc = "Control points in the curve."] + pub control_points: Vec, +} + +impl std::fmt::Display for CurveGetControlPoints { + 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 CurveGetControlPoints { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.control_points).into()] + } + + fn headers() -> Vec> { + vec!["control_points".into()] + } +} + +#[doc = "The response from the `CurveGetType` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct CurveGetType { + #[doc = "Curve type"] + pub curve_type: CurveType, +} + +impl std::fmt::Display for CurveGetType { + 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 CurveGetType { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.curve_type).into()] + } + + fn headers() -> Vec> { + vec!["curve_type".into()] + } +} + #[doc = "The type of Curve (embedded within path)"] #[derive( serde :: Serialize, @@ -5542,42 +5707,6 @@ impl tabled::Tabled for EmailAuthenticationForm { } } -#[doc = "An error."] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -pub struct EngineError { - #[doc = "The error code."] - pub error_code: ErrorCode, - #[doc = "The error message."] - pub message: String, -} - -impl std::fmt::Display for EngineError { - 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 EngineError { - const LENGTH: usize = 2; - fn fields(&self) -> Vec> { - vec![ - format!("{:?}", self.error_code).into(), - self.message.clone().into(), - ] - } - - fn headers() -> Vec> { - vec!["error_code".into(), "message".into()] - } -} - #[doc = "Metadata about our currently running server.\n\nThis is mostly used for internal purposes \ and debugging."] #[derive( @@ -5634,6 +5763,130 @@ impl tabled::Tabled for EngineMetadata { } } +#[doc = "The response from the `EntityGetAllChildUuids` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetAllChildUuids { + #[doc = "The UUIDs of the child entities."] + pub entity_ids: Vec, +} + +impl std::fmt::Display for EntityGetAllChildUuids { + 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 EntityGetAllChildUuids { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_ids).into()] + } + + fn headers() -> Vec> { + vec!["entity_ids".into()] + } +} + +#[doc = "The response from the `EntityGetChildUuid` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetChildUuid { + #[doc = "The UUID of the child entity."] + pub entity_id: uuid::Uuid, +} + +impl std::fmt::Display for EntityGetChildUuid { + 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 EntityGetChildUuid { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_id).into()] + } + + fn headers() -> Vec> { + vec!["entity_id".into()] + } +} + +#[doc = "The response from the `EntityGetNumChildren` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetNumChildren { + #[doc = "The number of children the entity has."] + pub num: u32, +} + +impl std::fmt::Display for EntityGetNumChildren { + 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 EntityGetNumChildren { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.num).into()] + } + + fn headers() -> Vec> { + vec!["num".into()] + } +} + +#[doc = "The response from the `EntityGetParentId` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetParentId { + #[doc = "The UUID of the parent entity."] + pub entity_id: uuid::Uuid, +} + +impl std::fmt::Display for EntityGetParentId { + 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 EntityGetParentId { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_id).into()] + } + + fn headers() -> Vec> { + vec!["entity_id".into()] + } +} + #[doc = "The type of entity"] #[derive( serde :: Serialize, @@ -5749,7 +6002,7 @@ impl tabled::Tabled for Error { } } -#[doc = "The type of errorcode."] +#[doc = "The type of error sent by the KittyCAD API."] #[derive( serde :: Serialize, serde :: Deserialize, @@ -5764,49 +6017,41 @@ impl tabled::Tabled for Error { #[cfg_attr(feature = "clap", derive(clap::ValueEnum))] #[cfg_attr(feature = "tabled", derive(tabled::Tabled))] pub enum ErrorCode { - #[doc = "User requested something impossible or invalid"] - #[serde(rename = "bad_request")] - #[display("bad_request")] - BadRequest, - #[doc = "Engine failed to complete request, consider retrying"] + #[doc = "Graphics engine failed to complete request, consider retrying"] #[serde(rename = "internal_engine")] #[display("internal_engine")] InternalEngine, + #[doc = "API failed to complete request, consider retrying"] + #[serde(rename = "internal_api")] + #[display("internal_api")] + InternalApi, + #[doc = "User requested something geometrically or graphically impossible. Don't retry this \ + request, as it's inherently impossible. Instead, read the error message and change \ + your request."] + #[serde(rename = "bad_request")] + #[display("bad_request")] + BadRequest, + #[doc = "Client sent invalid JSON."] + #[serde(rename = "invalid_json")] + #[display("invalid_json")] + InvalidJson, + #[doc = "Problem sending data between client and KittyCAD API."] + #[serde(rename = "connection_problem")] + #[display("connection_problem")] + ConnectionProblem, + #[doc = "Client sent a Websocket message type which the KittyCAD API does not handle."] + #[serde(rename = "message_type_not_accepted")] + #[display("message_type_not_accepted")] + MessageTypeNotAccepted, + #[doc = "Client sent a Websocket message intended for WebRTC but it was configured as a \ + WebRTC connection."] + #[serde(rename = "message_type_not_accepted_for_web_r_t_c")] + #[display("message_type_not_accepted_for_web_r_t_c")] + MessageTypeNotAcceptedForWebRTC, } -#[doc = "The error response."] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -pub struct ErrorResponse { - #[doc = "A list of errors."] - pub errors: Vec, -} - -impl std::fmt::Display for ErrorResponse { - 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 ErrorResponse { - const LENGTH: usize = 1; - fn fields(&self) -> Vec> { - vec![format!("{:?}", self.errors).into()] - } - - fn headers() -> Vec> { - vec!["errors".into()] - } -} - -#[doc = "Metadata about our currently running server.\n\nThis is mostly used for internal purposes \ - and debugging."] +#[doc = "Metadata about our currently running server.\n\nThis is mostly used for internal purposes \ + and debugging."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] @@ -5849,6 +6094,37 @@ impl tabled::Tabled for ExecutorMetadata { } } +#[doc = "The response from the `Export` endpoint."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Export { + #[doc = "The files that were exported."] + pub files: Vec, +} + +impl std::fmt::Display for Export { + 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 Export { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.files).into()] + } + + fn headers() -> Vec> { + vec!["files".into()] + } +} + #[doc = "A file to be exported to the client."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -6965,6 +7241,83 @@ impl tabled::Tabled for Gateway { } } +#[doc = "The response from the `GetEntityType` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct GetEntityType { + #[doc = "The type of the entity."] + pub entity_type: EntityType, +} + +impl std::fmt::Display for GetEntityType { + 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 GetEntityType { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_type).into()] + } + + fn headers() -> Vec> { + vec!["entity_type".into()] + } +} + +#[doc = "The response from the `HighlightSetEntity` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct HighlightSetEntity { + #[doc = "The UUID of the entity that was highlighted."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub entity_id: Option, + #[doc = "If the client sent a sequence ID with its request, the backend sends it back."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sequence: Option, +} + +impl std::fmt::Display for HighlightSetEntity { + 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 HighlightSetEntity { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + if let Some(entity_id) = &self.entity_id { + format!("{:?}", entity_id).into() + } else { + String::new().into() + }, + if let Some(sequence) = &self.sequence { + format!("{:?}", sequence).into() + } else { + String::new().into() + }, + ] + } + + fn headers() -> Vec> { + vec!["entity_id".into(), "sequence".into()] + } +} + #[doc = "Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on "] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -8446,6 +8799,42 @@ impl tabled::Tabled for ModelingOutcomes { } } +#[doc = "The response from the `MouseClick` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct MouseClick { + #[doc = "Entities that are modified."] + pub entities_modified: Vec, + #[doc = "Entities that are selected."] + pub entities_selected: Vec, +} + +impl std::fmt::Display for MouseClick { + 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 MouseClick { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.entities_modified).into(), + format!("{:?}", self.entities_selected).into(), + ] + } + + fn headers() -> Vec> { + vec!["entities_modified".into(), "entities_selected".into()] + } +} + #[doc = "The struct that is used to create a new record. This is automatically generated and has \ all the same fields as the main struct only it is missing the `id`."] #[derive( @@ -8634,47 +9023,62 @@ pub enum OkModelingCmdResponse { #[serde(rename = "empty")] Empty {}, #[serde(rename = "export")] - Export { files: Vec }, + Export { data: Export }, #[serde(rename = "select_with_point")] - SelectWithPoint { entity_id: Option }, + SelectWithPoint { data: SelectWithPoint }, #[serde(rename = "highlight_set_entity")] - HighlightSetEntity { - entity_id: Option, - sequence: Option, - }, + HighlightSetEntity { data: HighlightSetEntity }, #[serde(rename = "entity_get_child_uuid")] - EntityGetChildUuid { entity_id: uuid::Uuid }, + EntityGetChildUuid { data: EntityGetChildUuid }, #[serde(rename = "entity_get_num_children")] - EntityGetNumChildren { num: u32 }, + EntityGetNumChildren { data: EntityGetNumChildren }, #[serde(rename = "entity_get_parent_id")] - EntityGetParentId { entity_id: uuid::Uuid }, + EntityGetParentId { data: EntityGetParentId }, #[serde(rename = "entity_get_all_child_uuids")] - EntityGetAllChildUuids { entity_ids: Vec }, + EntityGetAllChildUuids { data: EntityGetAllChildUuids }, #[serde(rename = "select_get")] - SelectGet { entity_ids: Vec }, + SelectGet { data: SelectGet }, #[serde(rename = "get_entity_type")] - GetEntityType { entity_type: EntityType }, + GetEntityType { data: GetEntityType }, #[serde(rename = "solid3d_get_all_edge_faces")] - Solid3DGetAllEdgeFaces { faces: Vec }, + Solid3DGetAllEdgeFaces { data: Solid3DGetAllEdgeFaces }, #[serde(rename = "solid3d_get_all_opposite_edges")] - Solid3DGetAllOppositeEdges { edges: Vec }, + Solid3DGetAllOppositeEdges { data: Solid3DGetAllOppositeEdges }, #[serde(rename = "solid3d_get_opposite_edge")] - Solid3DGetOppositeEdge { edge: uuid::Uuid }, + Solid3DGetOppositeEdge { data: Solid3DGetOppositeEdge }, #[serde(rename = "solid3d_get_prev_adjacent_edge")] - Solid3DGetPrevAdjacentEdge { edge: uuid::Uuid }, + Solid3DGetPrevAdjacentEdge { data: Solid3DGetPrevAdjacentEdge }, #[serde(rename = "solid3d_get_next_adjacent_edge")] - Solid3DGetNextAdjacentEdge { edge: uuid::Uuid }, + Solid3DGetNextAdjacentEdge { data: Solid3DGetNextAdjacentEdge }, #[serde(rename = "mouse_click")] - MouseClick { - entities_modified: Vec, - entities_selected: Vec, - }, + MouseClick { data: MouseClick }, #[serde(rename = "curve_get_type")] - CurveGetType { curve_type: CurveType }, + CurveGetType { data: CurveGetType }, #[serde(rename = "curve_get_control_points")] - CurveGetControlPoints { control_points: Vec }, + CurveGetControlPoints { data: CurveGetControlPoints }, #[serde(rename = "take_snapshot")] - TakeSnapshot { contents: Vec }, + TakeSnapshot { data: TakeSnapshot }, +} + +#[doc = "The websocket messages this server sends."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] +#[serde(tag = "type", content = "data")] +pub enum OkWebSocketResponseData { + #[serde(rename = "ice_server_info")] + IceServerInfo { ice_servers: Vec }, + #[serde(rename = "trickle_ice")] + TrickleIce { candidate: RtcIceCandidateInit }, + #[serde(rename = "sdp_answer")] + SdpAnswer { answer: RtcSessionDescription }, + #[serde(rename = "modeling")] + Modeling { + modeling_response: OkModelingCmdResponse, + }, + #[serde(rename = "export")] + Export { files: Vec }, } #[doc = "Onboarding details"] @@ -9380,81 +9784,6 @@ impl tabled::Tabled for RegistryServiceConfig { } } -#[doc = "ICECandidate represents a ice candidate"] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -pub struct RtcIceCandidate { - #[doc = "The address of the candidate."] - pub address: String, - #[doc = "The component of the candidate."] - pub component: u16, - #[doc = "The foundation for the address."] - pub foundation: String, - #[doc = "The port used for the candidate."] - pub port: u16, - #[doc = "The priority of the candidate."] - pub priority: u32, - #[doc = "The protocol used for the candidate."] - pub protocol: RtcIceProtocol, - #[doc = "The related address of the candidate."] - pub related_address: String, - #[doc = "The related port of the candidate."] - pub related_port: u16, - #[doc = "The stats ID."] - pub stats_id: String, - #[doc = "The TCP type of the candidate."] - pub tcp_type: String, - #[doc = "The type of the candidate."] - pub typ: RtcIceCandidateType, -} - -impl std::fmt::Display for RtcIceCandidate { - 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 RtcIceCandidate { - const LENGTH: usize = 11; - fn fields(&self) -> Vec> { - vec![ - self.address.clone().into(), - format!("{:?}", self.component).into(), - self.foundation.clone().into(), - format!("{:?}", self.port).into(), - format!("{:?}", self.priority).into(), - format!("{:?}", self.protocol).into(), - self.related_address.clone().into(), - format!("{:?}", self.related_port).into(), - self.stats_id.clone().into(), - self.tcp_type.clone().into(), - format!("{:?}", self.typ).into(), - ] - } - - fn headers() -> Vec> { - vec![ - "address".into(), - "component".into(), - "foundation".into(), - "port".into(), - "priority".into(), - "protocol".into(), - "related_address".into(), - "related_port".into(), - "stats_id".into(), - "tcp_type".into(), - "typ".into(), - ] - } -} - #[doc = "ICECandidateInit is used to serialize ice candidates"] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -9526,74 +9855,6 @@ impl tabled::Tabled for RtcIceCandidateInit { } } -#[doc = "ICECandidateType represents the type of the ICE candidate used."] -#[derive( - serde :: Serialize, - serde :: Deserialize, - PartialEq, - Hash, - Debug, - Clone, - schemars :: JsonSchema, - parse_display :: FromStr, - parse_display :: Display, -)] -#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] -#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] -pub enum RtcIceCandidateType { - #[doc = "Unspecified indicates that the candidate type is unspecified."] - #[serde(rename = "unspecified")] - #[display("unspecified")] - Unspecified, - #[doc = "ICECandidateTypeHost indicates that the candidate is of Host type as described in . A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs."] - #[serde(rename = "host")] - #[display("host")] - Host, - #[doc = "ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described . A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server."] - #[serde(rename = "srflx")] - #[display("srflx")] - Srflx, - #[doc = "ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A \ - candidate type whose IP address and port are a binding allocated by a NAT for an ICE \ - agent after it sends a packet through the NAT to its peer."] - #[serde(rename = "prflx")] - #[display("prflx")] - Prflx, - #[doc = "ICECandidateTypeRelay indicates the the candidate is of Relay type as described in . A candidate type obtained from a relay server, such as a TURN server."] - #[serde(rename = "relay")] - #[display("relay")] - Relay, -} - -#[doc = "ICEProtocol indicates the transport protocol type that is used in the ice.URL structure."] -#[derive( - serde :: Serialize, - serde :: Deserialize, - PartialEq, - Hash, - Debug, - Clone, - schemars :: JsonSchema, - parse_display :: FromStr, - parse_display :: Display, -)] -#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] -#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] -pub enum RtcIceProtocol { - #[doc = "Unspecified indicates that the protocol is unspecified."] - #[serde(rename = "unspecified")] - #[display("unspecified")] - Unspecified, - #[doc = "UDP indicates the URL uses a UDP transport."] - #[serde(rename = "udp")] - #[display("udp")] - Udp, - #[doc = "TCP indicates the URL uses a TCP transport."] - #[serde(rename = "tcp")] - #[display("tcp")] - Tcp, -} - #[doc = "SDPType describes the type of an SessionDescription."] #[derive( serde :: Serialize, @@ -9786,6 +10047,73 @@ pub enum SceneToolType { SketchCurveMod, } +#[doc = "The response from the `SelectGet` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct SelectGet { + #[doc = "The UUIDs of the selected entities."] + pub entity_ids: Vec, +} + +impl std::fmt::Display for SelectGet { + 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 SelectGet { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_ids).into()] + } + + fn headers() -> Vec> { + vec!["entity_ids".into()] + } +} + +#[doc = "The response from the `SelectWithPoint` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct SelectWithPoint { + #[doc = "The UUID of the entity that was selected."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub entity_id: Option, +} + +impl std::fmt::Display for SelectWithPoint { + 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 SelectWithPoint { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![if let Some(entity_id) = &self.entity_id { + format!("{:?}", entity_id).into() + } else { + String::new().into() + }] + } + + fn headers() -> Vec> { + vec!["entity_id".into()] + } +} + #[doc = "An authentication session.\n\nFor our UIs, these are automatically created by Next.js."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -9851,16 +10179,159 @@ impl tabled::Tabled for Session { } } -#[doc = "Serde serializes Result into JSON as \"Ok\" and \"Err\", but we want \"ok\" and \"err\". \ - So, create a new enum that serializes as lowercase."] +#[doc = "The response from the `Solid3dGetAllEdgeFaces` command."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] -pub enum SnakeCaseResult { - Err { - #[doc = "A list of errors."] - errors: Vec, - }, +pub struct Solid3DGetAllEdgeFaces { + #[doc = "The UUIDs of the faces."] + pub faces: Vec, +} + +impl std::fmt::Display for Solid3DGetAllEdgeFaces { + 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 Solid3DGetAllEdgeFaces { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.faces).into()] + } + + fn headers() -> Vec> { + vec!["faces".into()] + } +} + +#[doc = "The response from the `Solid3dGetAllOppositeEdges` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetAllOppositeEdges { + #[doc = "The UUIDs of the edges."] + pub edges: Vec, +} + +impl std::fmt::Display for Solid3DGetAllOppositeEdges { + 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 Solid3DGetAllOppositeEdges { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edges).into()] + } + + fn headers() -> Vec> { + vec!["edges".into()] + } +} + +#[doc = "The response from the `Solid3dGetNextAdjacentEdge` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetNextAdjacentEdge { + #[doc = "The UUID of the edge."] + pub edge: uuid::Uuid, +} + +impl std::fmt::Display for Solid3DGetNextAdjacentEdge { + 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 Solid3DGetNextAdjacentEdge { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edge).into()] + } + + fn headers() -> Vec> { + vec!["edge".into()] + } +} + +#[doc = "The response from the `Solid3dGetOppositeEdge` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetOppositeEdge { + #[doc = "The UUID of the edge."] + pub edge: uuid::Uuid, +} + +impl std::fmt::Display for Solid3DGetOppositeEdge { + 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 Solid3DGetOppositeEdge { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edge).into()] + } + + fn headers() -> Vec> { + vec!["edge".into()] + } +} + +#[doc = "The response from the `Solid3dGetPrevAdjacentEdge` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetPrevAdjacentEdge { + #[doc = "The UUID of the edge."] + pub edge: uuid::Uuid, +} + +impl std::fmt::Display for Solid3DGetPrevAdjacentEdge { + 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 Solid3DGetPrevAdjacentEdge { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edge).into()] + } + + fn headers() -> Vec> { + vec!["edge".into()] + } } #[doc = "Describes the storage format of a glTF 2.0 scene."] @@ -10057,6 +10528,37 @@ pub enum SystemInfoIsolationEnum { Process, } +#[doc = "The response from the `TakeSnapshot` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct TakeSnapshot { + #[doc = "Contents of the image."] + pub contents: Vec, +} + +impl std::fmt::Display for TakeSnapshot { + 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 TakeSnapshot { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.contents).into()] + } + + fn headers() -> Vec> { + vec!["contents".into()] + } +} + #[doc = "The valid types of angle formats."] #[derive( serde :: Serialize, @@ -12373,26 +12875,6 @@ pub enum WebSocketMessages { cmd: ModelingCmd, cmd_id: uuid::Uuid, }, -} - -#[doc = "The websocket messages this server sends."] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] -#[serde(tag = "type")] -pub enum WebSocketResponses { - #[serde(rename = "trickle_ice")] - TrickleIce { candidate: RtcIceCandidate }, - #[serde(rename = "sdp_answer")] - SdpAnswer { answer: RtcSessionDescription }, - #[serde(rename = "ice_server_info")] - IceServerInfo { ice_servers: Vec }, - #[serde(rename = "modeling")] - Modeling { - cmd_id: uuid::Uuid, - result: SnakeCaseResult, - }, - #[serde(rename = "export")] - Export { files: Vec }, + #[serde(rename = "ping")] + Ping {}, } diff --git a/openapitor/src/types/mod.rs b/openapitor/src/types/mod.rs index 0d2fc0b1..a3051856 100644 --- a/openapitor/src/types/mod.rs +++ b/openapitor/src/types/mod.rs @@ -817,16 +817,6 @@ impl TypeSpace { compare_inner_schema = item_schema.clone(); } } - if prop == "emails" { - println!( - "RENDERED {:?}\nINNER SCHEMA {:?}", - rendered, compare_inner_schema - ); - println!( - "RENDERED KIND {:?}\nINNER SCHEMA KIND {:?}", - rendered.schema_kind, compare_inner_schema.schema_kind - ); - } if *rendered != *compare_inner_schema { // The name is already taken, so we need to make a new name. t = proper_name(&format!("{} {}", struct_name, prop)); @@ -1172,6 +1162,7 @@ impl TypeSpace { let n = format_ident!("{}", p); if let Some(content) = &tag_result.content { + let content_type_name = proper_name(&format!("{}_{}", tag_name, content)); // Get the value of the content. let content_schema = match o.properties.get(content) { Some(v) => v, @@ -1184,10 +1175,18 @@ impl TypeSpace { } }; + let mut enum_object_internal = None; + // Get the single value from the enum. let content_name = if let openapiv3::ReferenceOr::Item(i) = content_schema { let s = &**i; - get_type_name_for_schema(&name, s, &self.spec, true)? + if let openapiv3::SchemaKind::Type(openapiv3::Type::Object(o)) = + &s.schema_kind + { + enum_object_internal = + Some(render_enum_object_internal(&p, o, &self.spec, tag)?); + } + get_type_name_for_schema(&content_type_name, s, &self.spec, true)? } else { get_type_name_from_reference( &content_schema.reference()?, @@ -1199,20 +1198,37 @@ impl TypeSpace { // Get the type name for this value. values.insert(p.to_string(), one_of.clone()); - if p != tag_name { - // Rename serde to the correct tag name. - rendered_value = quote!( - #rendered_value + if let Some(enum_object_internal) = enum_object_internal { + if p != tag_name { + rendered_value = quote!( + #rendered_value - #[serde(rename = #tag_name)] - #n(#content_name), - ); + #[serde(rename = #tag_name)] + #enum_object_internal, + ); + } else { + rendered_value = quote!( + #rendered_value + + #enum_object_internal, + ); + } } else { - rendered_value = quote!( - #rendered_value + if p != tag_name { + // Rename serde to the correct tag name. + rendered_value = quote!( + #rendered_value - #n(#content_name), - ); + #[serde(rename = #tag_name)] + #n(#content_name), + ); + } else { + rendered_value = quote!( + #rendered_value + + #n(#content_name), + ); + } } } else { // Render this object. diff --git a/openapitor/tests/types/kittycad.rs.gen b/openapitor/tests/types/kittycad.rs.gen index c0c84084..3ef6492a 100644 --- a/openapitor/tests/types/kittycad.rs.gen +++ b/openapitor/tests/types/kittycad.rs.gen @@ -1355,6 +1355,42 @@ impl tabled::Tabled for ApiCallWithPriceResultsPage { } } +#[doc = "An error."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ApiError { + #[doc = "The error code."] + pub error_code: ErrorCode, + #[doc = "The error message."] + pub message: String, +} + +impl std::fmt::Display for ApiError { + 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 ApiError { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.error_code).into(), + self.message.clone().into(), + ] + } + + fn headers() -> Vec> { + vec!["error_code".into(), "message".into()] + } +} + #[doc = "An API token.\n\nThese are used to authenticate users with Bearer authentication."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -1489,6 +1525,68 @@ impl tabled::Tabled for ApiTokenResultsPage { } } +#[doc = "Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct ApiWebSocketResponse { + #[doc = "The errors that occurred. If `success` is true, this is empty. If `success` is false, this should be non-empty."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub errors: Option>, + #[doc = "Which request this is a response to. If the request was a modeling command, this is the modeling command ID. If no request ID was sent, this will be null."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub request_id: Option, + #[doc = "The data sent with a successful response. This will be flattened into a 'type' and 'data' field. If `success` is true, this is non-empty. If `success` is false, this is empty."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub resp: Option, + #[doc = "Always false"] + pub success: bool, +} + +impl std::fmt::Display for ApiWebSocketResponse { + 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 ApiWebSocketResponse { + const LENGTH: usize = 4; + fn fields(&self) -> Vec> { + vec![ + if let Some(errors) = &self.errors { + format!("{:?}", errors).into() + } else { + String::new().into() + }, + if let Some(request_id) = &self.request_id { + format!("{:?}", request_id).into() + } else { + String::new().into() + }, + if let Some(resp) = &self.resp { + format!("{:?}", resp).into() + } else { + String::new().into() + }, + format!("{:?}", self.success).into(), + ] + } + + fn headers() -> Vec> { + vec![ + "errors".into(), + "request_id".into(), + "resp".into(), + "success".into(), + ] + } +} + #[doc = "Information about a third party app client."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -4476,6 +4574,68 @@ pub enum Currency { Zmw, } +#[doc = "The response from the `CurveGetControlPoints` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct CurveGetControlPoints { + #[doc = "Control points in the curve."] + pub control_points: Vec, +} + +impl std::fmt::Display for CurveGetControlPoints { + 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 CurveGetControlPoints { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.control_points).into()] + } + + fn headers() -> Vec> { + vec!["control_points".into()] + } +} + +#[doc = "The response from the `CurveGetType` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct CurveGetType { + #[doc = "Curve type"] + pub curve_type: CurveType, +} + +impl std::fmt::Display for CurveGetType { + 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 CurveGetType { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.curve_type).into()] + } + + fn headers() -> Vec> { + vec!["curve_type".into()] + } +} + #[doc = "The type of Curve (embedded within path)"] #[derive( serde :: Serialize, @@ -5454,42 +5614,6 @@ impl tabled::Tabled for EmailAuthenticationForm { } } -#[doc = "An error."] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -pub struct EngineError { - #[doc = "The error code."] - pub error_code: ErrorCode, - #[doc = "The error message."] - pub message: String, -} - -impl std::fmt::Display for EngineError { - 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 EngineError { - const LENGTH: usize = 2; - fn fields(&self) -> Vec> { - vec![ - format!("{:?}", self.error_code).into(), - self.message.clone().into(), - ] - } - - fn headers() -> Vec> { - vec!["error_code".into(), "message".into()] - } -} - #[doc = "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -5545,6 +5669,130 @@ impl tabled::Tabled for EngineMetadata { } } +#[doc = "The response from the `EntityGetAllChildUuids` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetAllChildUuids { + #[doc = "The UUIDs of the child entities."] + pub entity_ids: Vec, +} + +impl std::fmt::Display for EntityGetAllChildUuids { + 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 EntityGetAllChildUuids { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_ids).into()] + } + + fn headers() -> Vec> { + vec!["entity_ids".into()] + } +} + +#[doc = "The response from the `EntityGetChildUuid` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetChildUuid { + #[doc = "The UUID of the child entity."] + pub entity_id: uuid::Uuid, +} + +impl std::fmt::Display for EntityGetChildUuid { + 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 EntityGetChildUuid { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_id).into()] + } + + fn headers() -> Vec> { + vec!["entity_id".into()] + } +} + +#[doc = "The response from the `EntityGetNumChildren` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetNumChildren { + #[doc = "The number of children the entity has."] + pub num: u32, +} + +impl std::fmt::Display for EntityGetNumChildren { + 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 EntityGetNumChildren { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.num).into()] + } + + fn headers() -> Vec> { + vec!["num".into()] + } +} + +#[doc = "The response from the `EntityGetParentId` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetParentId { + #[doc = "The UUID of the parent entity."] + pub entity_id: uuid::Uuid, +} + +impl std::fmt::Display for EntityGetParentId { + 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 EntityGetParentId { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_id).into()] + } + + fn headers() -> Vec> { + vec!["entity_id".into()] + } +} + #[doc = "The type of entity"] #[derive( serde :: Serialize, @@ -5659,7 +5907,7 @@ impl tabled::Tabled for Error { } } -#[doc = "The type of errorcode."] +#[doc = "The type of error sent by the KittyCAD API."] #[derive( serde :: Serialize, serde :: Deserialize, @@ -5674,48 +5922,37 @@ impl tabled::Tabled for Error { #[cfg_attr(feature = "clap", derive(clap::ValueEnum))] #[cfg_attr(feature = "tabled", derive(tabled::Tabled))] pub enum ErrorCode { - #[doc = "User requested something impossible or invalid"] - #[serde(rename = "bad_request")] - #[display("bad_request")] - BadRequest, - #[doc = "Engine failed to complete request, consider retrying"] + #[doc = "Graphics engine failed to complete request, consider retrying"] #[serde(rename = "internal_engine")] #[display("internal_engine")] InternalEngine, + #[doc = "API failed to complete request, consider retrying"] + #[serde(rename = "internal_api")] + #[display("internal_api")] + InternalApi, + #[doc = "User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request."] + #[serde(rename = "bad_request")] + #[display("bad_request")] + BadRequest, + #[doc = "Client sent invalid JSON."] + #[serde(rename = "invalid_json")] + #[display("invalid_json")] + InvalidJson, + #[doc = "Problem sending data between client and KittyCAD API."] + #[serde(rename = "connection_problem")] + #[display("connection_problem")] + ConnectionProblem, + #[doc = "Client sent a Websocket message type which the KittyCAD API does not handle."] + #[serde(rename = "message_type_not_accepted")] + #[display("message_type_not_accepted")] + MessageTypeNotAccepted, + #[doc = "Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection."] + #[serde(rename = "message_type_not_accepted_for_web_r_t_c")] + #[display("message_type_not_accepted_for_web_r_t_c")] + MessageTypeNotAcceptedForWebRTC, } -#[doc = "The error response."] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -pub struct ErrorResponse { - #[doc = "A list of errors."] - pub errors: Vec, -} - -impl std::fmt::Display for ErrorResponse { - 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 ErrorResponse { - const LENGTH: usize = 1; - fn fields(&self) -> Vec> { - vec![format!("{:?}", self.errors).into()] - } - - fn headers() -> Vec> { - vec!["errors".into()] - } -} - -#[doc = "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging."] +#[doc = "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] @@ -5758,6 +5995,37 @@ impl tabled::Tabled for ExecutorMetadata { } } +#[doc = "The response from the `Export` endpoint."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Export { + #[doc = "The files that were exported."] + pub files: Vec, +} + +impl std::fmt::Display for Export { + 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 Export { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.files).into()] + } + + fn headers() -> Vec> { + vec!["files".into()] + } +} + #[doc = "A file to be exported to the client."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -6858,6 +7126,83 @@ impl tabled::Tabled for Gateway { } } +#[doc = "The response from the `GetEntityType` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct GetEntityType { + #[doc = "The type of the entity."] + pub entity_type: EntityType, +} + +impl std::fmt::Display for GetEntityType { + 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 GetEntityType { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_type).into()] + } + + fn headers() -> Vec> { + vec!["entity_type".into()] + } +} + +#[doc = "The response from the `HighlightSetEntity` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct HighlightSetEntity { + #[doc = "The UUID of the entity that was highlighted."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub entity_id: Option, + #[doc = "If the client sent a sequence ID with its request, the backend sends it back."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub sequence: Option, +} + +impl std::fmt::Display for HighlightSetEntity { + 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 HighlightSetEntity { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + if let Some(entity_id) = &self.entity_id { + format!("{:?}", entity_id).into() + } else { + String::new().into() + }, + if let Some(sequence) = &self.sequence { + format!("{:?}", sequence).into() + } else { + String::new().into() + }, + ] + } + + fn headers() -> Vec> { + vec!["entity_id".into(), "sequence".into()] + } +} + #[doc = "Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on "] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -8310,6 +8655,42 @@ impl tabled::Tabled for ModelingOutcomes { } } +#[doc = "The response from the `MouseClick` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct MouseClick { + #[doc = "Entities that are modified."] + pub entities_modified: Vec, + #[doc = "Entities that are selected."] + pub entities_selected: Vec, +} + +impl std::fmt::Display for MouseClick { + 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 MouseClick { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.entities_modified).into(), + format!("{:?}", self.entities_selected).into(), + ] + } + + fn headers() -> Vec> { + vec!["entities_modified".into(), "entities_selected".into()] + } +} + #[doc = "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -8494,47 +8875,62 @@ pub enum OkModelingCmdResponse { #[serde(rename = "empty")] Empty {}, #[serde(rename = "export")] - Export { files: Vec }, + Export { data: Export }, #[serde(rename = "select_with_point")] - SelectWithPoint { entity_id: Option }, + SelectWithPoint { data: SelectWithPoint }, #[serde(rename = "highlight_set_entity")] - HighlightSetEntity { - entity_id: Option, - sequence: Option, - }, + HighlightSetEntity { data: HighlightSetEntity }, #[serde(rename = "entity_get_child_uuid")] - EntityGetChildUuid { entity_id: uuid::Uuid }, + EntityGetChildUuid { data: EntityGetChildUuid }, #[serde(rename = "entity_get_num_children")] - EntityGetNumChildren { num: u32 }, + EntityGetNumChildren { data: EntityGetNumChildren }, #[serde(rename = "entity_get_parent_id")] - EntityGetParentId { entity_id: uuid::Uuid }, + EntityGetParentId { data: EntityGetParentId }, #[serde(rename = "entity_get_all_child_uuids")] - EntityGetAllChildUuids { entity_ids: Vec }, + EntityGetAllChildUuids { data: EntityGetAllChildUuids }, #[serde(rename = "select_get")] - SelectGet { entity_ids: Vec }, + SelectGet { data: SelectGet }, #[serde(rename = "get_entity_type")] - GetEntityType { entity_type: EntityType }, + GetEntityType { data: GetEntityType }, #[serde(rename = "solid3d_get_all_edge_faces")] - Solid3DGetAllEdgeFaces { faces: Vec }, + Solid3DGetAllEdgeFaces { data: Solid3DGetAllEdgeFaces }, #[serde(rename = "solid3d_get_all_opposite_edges")] - Solid3DGetAllOppositeEdges { edges: Vec }, + Solid3DGetAllOppositeEdges { data: Solid3DGetAllOppositeEdges }, #[serde(rename = "solid3d_get_opposite_edge")] - Solid3DGetOppositeEdge { edge: uuid::Uuid }, + Solid3DGetOppositeEdge { data: Solid3DGetOppositeEdge }, #[serde(rename = "solid3d_get_prev_adjacent_edge")] - Solid3DGetPrevAdjacentEdge { edge: uuid::Uuid }, + Solid3DGetPrevAdjacentEdge { data: Solid3DGetPrevAdjacentEdge }, #[serde(rename = "solid3d_get_next_adjacent_edge")] - Solid3DGetNextAdjacentEdge { edge: uuid::Uuid }, + Solid3DGetNextAdjacentEdge { data: Solid3DGetNextAdjacentEdge }, #[serde(rename = "mouse_click")] - MouseClick { - entities_modified: Vec, - entities_selected: Vec, - }, + MouseClick { data: MouseClick }, #[serde(rename = "curve_get_type")] - CurveGetType { curve_type: CurveType }, + CurveGetType { data: CurveGetType }, #[serde(rename = "curve_get_control_points")] - CurveGetControlPoints { control_points: Vec }, + CurveGetControlPoints { data: CurveGetControlPoints }, #[serde(rename = "take_snapshot")] - TakeSnapshot { contents: Vec }, + TakeSnapshot { data: TakeSnapshot }, +} + +#[doc = "The websocket messages this server sends."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] +#[serde(tag = "type", content = "data")] +pub enum OkWebSocketResponseData { + #[serde(rename = "ice_server_info")] + IceServerInfo { ice_servers: Vec }, + #[serde(rename = "trickle_ice")] + TrickleIce { candidate: RtcIceCandidateInit }, + #[serde(rename = "sdp_answer")] + SdpAnswer { answer: RtcSessionDescription }, + #[serde(rename = "modeling")] + Modeling { + modeling_response: OkModelingCmdResponse, + }, + #[serde(rename = "export")] + Export { files: Vec }, } #[doc = "Onboarding details"] @@ -9219,81 +9615,6 @@ impl tabled::Tabled for RegistryServiceConfig { } } -#[doc = "ICECandidate represents a ice candidate"] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -pub struct RtcIceCandidate { - #[doc = "The address of the candidate."] - pub address: String, - #[doc = "The component of the candidate."] - pub component: u16, - #[doc = "The foundation for the address."] - pub foundation: String, - #[doc = "The port used for the candidate."] - pub port: u16, - #[doc = "The priority of the candidate."] - pub priority: u32, - #[doc = "The protocol used for the candidate."] - pub protocol: RtcIceProtocol, - #[doc = "The related address of the candidate."] - pub related_address: String, - #[doc = "The related port of the candidate."] - pub related_port: u16, - #[doc = "The stats ID."] - pub stats_id: String, - #[doc = "The TCP type of the candidate."] - pub tcp_type: String, - #[doc = "The type of the candidate."] - pub typ: RtcIceCandidateType, -} - -impl std::fmt::Display for RtcIceCandidate { - 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 RtcIceCandidate { - const LENGTH: usize = 11; - fn fields(&self) -> Vec> { - vec![ - self.address.clone().into(), - format!("{:?}", self.component).into(), - self.foundation.clone().into(), - format!("{:?}", self.port).into(), - format!("{:?}", self.priority).into(), - format!("{:?}", self.protocol).into(), - self.related_address.clone().into(), - format!("{:?}", self.related_port).into(), - self.stats_id.clone().into(), - self.tcp_type.clone().into(), - format!("{:?}", self.typ).into(), - ] - } - - fn headers() -> Vec> { - vec![ - "address".into(), - "component".into(), - "foundation".into(), - "port".into(), - "priority".into(), - "protocol".into(), - "related_address".into(), - "related_port".into(), - "stats_id".into(), - "tcp_type".into(), - "typ".into(), - ] - } -} - #[doc = "ICECandidateInit is used to serialize ice candidates"] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -9364,72 +9685,6 @@ impl tabled::Tabled for RtcIceCandidateInit { } } -#[doc = "ICECandidateType represents the type of the ICE candidate used."] -#[derive( - serde :: Serialize, - serde :: Deserialize, - PartialEq, - Hash, - Debug, - Clone, - schemars :: JsonSchema, - parse_display :: FromStr, - parse_display :: Display, -)] -#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] -#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] -pub enum RtcIceCandidateType { - #[doc = "Unspecified indicates that the candidate type is unspecified."] - #[serde(rename = "unspecified")] - #[display("unspecified")] - Unspecified, - #[doc = "ICECandidateTypeHost indicates that the candidate is of Host type as described in . A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs."] - #[serde(rename = "host")] - #[display("host")] - Host, - #[doc = "ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described . A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server."] - #[serde(rename = "srflx")] - #[display("srflx")] - Srflx, - #[doc = "ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to its peer."] - #[serde(rename = "prflx")] - #[display("prflx")] - Prflx, - #[doc = "ICECandidateTypeRelay indicates the the candidate is of Relay type as described in . A candidate type obtained from a relay server, such as a TURN server."] - #[serde(rename = "relay")] - #[display("relay")] - Relay, -} - -#[doc = "ICEProtocol indicates the transport protocol type that is used in the ice.URL structure."] -#[derive( - serde :: Serialize, - serde :: Deserialize, - PartialEq, - Hash, - Debug, - Clone, - schemars :: JsonSchema, - parse_display :: FromStr, - parse_display :: Display, -)] -#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] -#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] -pub enum RtcIceProtocol { - #[doc = "Unspecified indicates that the protocol is unspecified."] - #[serde(rename = "unspecified")] - #[display("unspecified")] - Unspecified, - #[doc = "UDP indicates the URL uses a UDP transport."] - #[serde(rename = "udp")] - #[display("udp")] - Udp, - #[doc = "TCP indicates the URL uses a TCP transport."] - #[serde(rename = "tcp")] - #[display("tcp")] - Tcp, -} - #[doc = "SDPType describes the type of an SessionDescription."] #[derive( serde :: Serialize, @@ -9611,6 +9866,73 @@ pub enum SceneToolType { SketchCurveMod, } +#[doc = "The response from the `SelectGet` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct SelectGet { + #[doc = "The UUIDs of the selected entities."] + pub entity_ids: Vec, +} + +impl std::fmt::Display for SelectGet { + 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 SelectGet { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_ids).into()] + } + + fn headers() -> Vec> { + vec!["entity_ids".into()] + } +} + +#[doc = "The response from the `SelectWithPoint` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct SelectWithPoint { + #[doc = "The UUID of the entity that was selected."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub entity_id: Option, +} + +impl std::fmt::Display for SelectWithPoint { + 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 SelectWithPoint { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![if let Some(entity_id) = &self.entity_id { + format!("{:?}", entity_id).into() + } else { + String::new().into() + }] + } + + fn headers() -> Vec> { + vec!["entity_id".into()] + } +} + #[doc = "An authentication session.\n\nFor our UIs, these are automatically created by Next.js."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -9676,15 +9998,159 @@ impl tabled::Tabled for Session { } } -#[doc = "Serde serializes Result into JSON as \"Ok\" and \"Err\", but we want \"ok\" and \"err\". So, create a new enum that serializes as lowercase."] +#[doc = "The response from the `Solid3dGetAllEdgeFaces` command."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] -pub enum SnakeCaseResult { - Err { - #[doc = "A list of errors."] - errors: Vec, - }, +pub struct Solid3DGetAllEdgeFaces { + #[doc = "The UUIDs of the faces."] + pub faces: Vec, +} + +impl std::fmt::Display for Solid3DGetAllEdgeFaces { + 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 Solid3DGetAllEdgeFaces { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.faces).into()] + } + + fn headers() -> Vec> { + vec!["faces".into()] + } +} + +#[doc = "The response from the `Solid3dGetAllOppositeEdges` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetAllOppositeEdges { + #[doc = "The UUIDs of the edges."] + pub edges: Vec, +} + +impl std::fmt::Display for Solid3DGetAllOppositeEdges { + 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 Solid3DGetAllOppositeEdges { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edges).into()] + } + + fn headers() -> Vec> { + vec!["edges".into()] + } +} + +#[doc = "The response from the `Solid3dGetNextAdjacentEdge` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetNextAdjacentEdge { + #[doc = "The UUID of the edge."] + pub edge: uuid::Uuid, +} + +impl std::fmt::Display for Solid3DGetNextAdjacentEdge { + 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 Solid3DGetNextAdjacentEdge { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edge).into()] + } + + fn headers() -> Vec> { + vec!["edge".into()] + } +} + +#[doc = "The response from the `Solid3dGetOppositeEdge` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetOppositeEdge { + #[doc = "The UUID of the edge."] + pub edge: uuid::Uuid, +} + +impl std::fmt::Display for Solid3DGetOppositeEdge { + 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 Solid3DGetOppositeEdge { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edge).into()] + } + + fn headers() -> Vec> { + vec!["edge".into()] + } +} + +#[doc = "The response from the `Solid3dGetPrevAdjacentEdge` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct Solid3DGetPrevAdjacentEdge { + #[doc = "The UUID of the edge."] + pub edge: uuid::Uuid, +} + +impl std::fmt::Display for Solid3DGetPrevAdjacentEdge { + 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 Solid3DGetPrevAdjacentEdge { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.edge).into()] + } + + fn headers() -> Vec> { + vec!["edge".into()] + } } #[doc = "Describes the storage format of a glTF 2.0 scene."] @@ -9878,6 +10344,37 @@ pub enum SystemInfoIsolationEnum { Process, } +#[doc = "The response from the `TakeSnapshot` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct TakeSnapshot { + #[doc = "Contents of the image."] + pub contents: Vec, +} + +impl std::fmt::Display for TakeSnapshot { + 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 TakeSnapshot { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.contents).into()] + } + + fn headers() -> Vec> { + vec!["contents".into()] + } +} + #[doc = "The valid types of angle formats."] #[derive( serde :: Serialize, @@ -12189,26 +12686,6 @@ pub enum WebSocketMessages { cmd: ModelingCmd, cmd_id: uuid::Uuid, }, -} - -#[doc = "The websocket messages this server sends."] -#[derive( - serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, -)] -#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] -#[serde(tag = "type")] -pub enum WebSocketResponses { - #[serde(rename = "trickle_ice")] - TrickleIce { candidate: RtcIceCandidate }, - #[serde(rename = "sdp_answer")] - SdpAnswer { answer: RtcSessionDescription }, - #[serde(rename = "ice_server_info")] - IceServerInfo { ice_servers: Vec }, - #[serde(rename = "modeling")] - Modeling { - cmd_id: uuid::Uuid, - result: SnakeCaseResult, - }, - #[serde(rename = "export")] - Export { files: Vec }, + #[serde(rename = "ping")] + Ping {}, } diff --git a/spec.json b/spec.json index 76bcd12c..ef8ff087 100644 --- a/spec.json +++ b/spec.json @@ -635,6 +635,28 @@ ], "type": "object" }, + "ApiError": { + "description": "An error.", + "properties": { + "error_code": { + "allOf": [ + { + "$ref": "#/components/schemas/ErrorCode" + } + ], + "description": "The error code." + }, + "message": { + "description": "The error message.", + "type": "string" + } + }, + "required": [ + "error_code", + "message" + ], + "type": "object" + }, "ApiToken": { "description": "An API token.\n\nThese are used to authenticate users with Bearer authentication.", "properties": { @@ -700,6 +722,41 @@ ], "type": "object" }, + "ApiWebSocketResponse": { + "description": "Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.", + "properties": { + "errors": { + "description": "The errors that occurred. If `success` is true, this is empty. If `success` is false, this should be non-empty.", + "items": { + "$ref": "#/components/schemas/ApiError" + }, + "type": "array" + }, + "request_id": { + "description": "Which request this is a response to. If the request was a modeling command, this is the modeling command ID. If no request ID was sent, this will be null.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "resp": { + "allOf": [ + { + "$ref": "#/components/schemas/OkWebSocketResponseData" + } + ], + "description": "The data sent with a successful response. This will be flattened into a 'type' and 'data' field. If `success` is true, this is non-empty. If `success` is false, this is empty.", + "nullable": true + }, + "success": { + "description": "Always false", + "type": "boolean" + } + }, + "required": [ + "success" + ], + "type": "object" + }, "AppClientInfo": { "description": "Information about a third party app client.", "properties": { @@ -4890,6 +4947,39 @@ } ] }, + "CurveGetControlPoints": { + "description": "The response from the `CurveGetControlPoints` command.", + "properties": { + "control_points": { + "description": "Control points in the curve.", + "items": { + "$ref": "#/components/schemas/Point3d" + }, + "type": "array" + } + }, + "required": [ + "control_points" + ], + "type": "object" + }, + "CurveGetType": { + "description": "The response from the `CurveGetType` command.", + "properties": { + "curve_type": { + "allOf": [ + { + "$ref": "#/components/schemas/CurveType" + } + ], + "description": "Curve type" + } + }, + "required": [ + "curve_type" + ], + "type": "object" + }, "CurveType": { "description": "The type of Curve (embedded within path)", "enum": [ @@ -5501,28 +5591,6 @@ ], "type": "object" }, - "EngineError": { - "description": "An error.", - "properties": { - "error_code": { - "allOf": [ - { - "$ref": "#/components/schemas/ErrorCode" - } - ], - "description": "The error code." - }, - "message": { - "description": "The error message.", - "type": "string" - } - }, - "required": [ - "error_code", - "message" - ], - "type": "object" - }, "EngineMetadata": { "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", "properties": { @@ -5577,6 +5645,66 @@ ], "type": "object" }, + "EntityGetAllChildUuids": { + "description": "The response from the `EntityGetAllChildUuids` command.", + "properties": { + "entity_ids": { + "description": "The UUIDs of the child entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "entity_ids" + ], + "type": "object" + }, + "EntityGetChildUuid": { + "description": "The response from the `EntityGetChildUuid` command.", + "properties": { + "entity_id": { + "description": "The UUID of the child entity.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "entity_id" + ], + "type": "object" + }, + "EntityGetNumChildren": { + "description": "The response from the `EntityGetNumChildren` command.", + "properties": { + "num": { + "description": "The number of children the entity has.", + "format": "uint32", + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "num" + ], + "type": "object" + }, + "EntityGetParentId": { + "description": "The response from the `EntityGetParentId` command.", + "properties": { + "entity_id": { + "description": "The UUID of the parent entity.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "entity_id" + ], + "type": "object" + }, "EntityType": { "description": "The type of entity", "enum": [ @@ -5638,40 +5766,59 @@ "type": "object" }, "ErrorCode": { - "description": "The type of errorcode.", + "description": "The type of error sent by the KittyCAD API.", "oneOf": [ { - "description": "User requested something impossible or invalid", + "description": "Graphics engine failed to complete request, consider retrying", + "enum": [ + "internal_engine" + ], + "type": "string" + }, + { + "description": "API failed to complete request, consider retrying", + "enum": [ + "internal_api" + ], + "type": "string" + }, + { + "description": "User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request.", "enum": [ "bad_request" ], "type": "string" }, { - "description": "Engine failed to complete request, consider retrying", + "description": "Client sent invalid JSON.", "enum": [ - "internal_engine" + "invalid_json" + ], + "type": "string" + }, + { + "description": "Problem sending data between client and KittyCAD API.", + "enum": [ + "connection_problem" + ], + "type": "string" + }, + { + "description": "Client sent a Websocket message type which the KittyCAD API does not handle.", + "enum": [ + "message_type_not_accepted" + ], + "type": "string" + }, + { + "description": "Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection.", + "enum": [ + "message_type_not_accepted_for_web_r_t_c" ], "type": "string" } ] }, - "ErrorResponse": { - "description": "The error response.", - "properties": { - "errors": { - "description": "A list of errors.", - "items": { - "$ref": "#/components/schemas/EngineError" - }, - "type": "array" - } - }, - "required": [ - "errors" - ], - "type": "object" - }, "ExecutorMetadata": { "description": "Metadata about our currently running server.\n\nThis is mostly used for internal purposes and debugging.", "properties": { @@ -5703,6 +5850,22 @@ ], "type": "object" }, + "Export": { + "description": "The response from the `Export` endpoint.", + "properties": { + "files": { + "description": "The files that were exported.", + "items": { + "$ref": "#/components/schemas/ExportFile" + }, + "type": "array" + } + }, + "required": [ + "files" + ], + "type": "object" + }, "ExportFile": { "description": "A file to be exported to the client.", "properties": { @@ -6553,6 +6716,42 @@ }, "type": "object" }, + "GetEntityType": { + "description": "The response from the `GetEntityType` command.", + "properties": { + "entity_type": { + "allOf": [ + { + "$ref": "#/components/schemas/EntityType" + } + ], + "description": "The type of the entity." + } + }, + "required": [ + "entity_type" + ], + "type": "object" + }, + "HighlightSetEntity": { + "description": "The response from the `HighlightSetEntity` command.", + "properties": { + "entity_id": { + "description": "The UUID of the entity that was highlighted.", + "format": "uuid", + "nullable": true, + "type": "string" + }, + "sequence": { + "description": "If the client sent a sequence ID with its request, the backend sends it back.", + "format": "uint32", + "minimum": 0, + "nullable": true, + "type": "integer" + } + }, + "type": "object" + }, "IceServer": { "description": "Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on ", "properties": { @@ -8893,6 +9092,32 @@ ], "type": "object" }, + "MouseClick": { + "description": "The response from the `MouseClick` command.", + "properties": { + "entities_modified": { + "description": "Entities that are modified.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + }, + "entities_selected": { + "description": "Entities that are selected.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "entities_modified", + "entities_selected" + ], + "type": "object" + }, "NewAddress": { "description": "The struct that is used to create a new record. This is automatically generated and has all the same fields as the main struct only it is missing the `id`.", "properties": { @@ -8986,12 +9211,8 @@ { "description": "The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`.", "properties": { - "files": { - "description": "The files that were exported.", - "items": { - "$ref": "#/components/schemas/ExportFile" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/Export" }, "type": { "enum": [ @@ -9001,7 +9222,7 @@ } }, "required": [ - "files", + "data", "type" ], "type": "object" @@ -9009,11 +9230,8 @@ { "description": "The response from the `SelectWithPoint` command.", "properties": { - "entity_id": { - "description": "The UUID of the entity that was selected.", - "format": "uuid", - "nullable": true, - "type": "string" + "data": { + "$ref": "#/components/schemas/SelectWithPoint" }, "type": { "enum": [ @@ -9023,6 +9241,7 @@ } }, "required": [ + "data", "type" ], "type": "object" @@ -9030,18 +9249,8 @@ { "description": "The response from the `HighlightSetEntity` command.", "properties": { - "entity_id": { - "description": "The UUID of the entity that was highlighted.", - "format": "uuid", - "nullable": true, - "type": "string" - }, - "sequence": { - "description": "If the client sent a sequence ID with its request, the backend sends it back.", - "format": "uint32", - "minimum": 0, - "nullable": true, - "type": "integer" + "data": { + "$ref": "#/components/schemas/HighlightSetEntity" }, "type": { "enum": [ @@ -9051,6 +9260,7 @@ } }, "required": [ + "data", "type" ], "type": "object" @@ -9058,10 +9268,8 @@ { "description": "The response from the `EntityGetChildUuid` command.", "properties": { - "entity_id": { - "description": "The UUID of the child entity.", - "format": "uuid", - "type": "string" + "data": { + "$ref": "#/components/schemas/EntityGetChildUuid" }, "type": { "enum": [ @@ -9071,7 +9279,7 @@ } }, "required": [ - "entity_id", + "data", "type" ], "type": "object" @@ -9079,11 +9287,8 @@ { "description": "The response from the `EntityGetNumChildren` command.", "properties": { - "num": { - "description": "The number of children the entity has.", - "format": "uint32", - "minimum": 0, - "type": "integer" + "data": { + "$ref": "#/components/schemas/EntityGetNumChildren" }, "type": { "enum": [ @@ -9093,7 +9298,7 @@ } }, "required": [ - "num", + "data", "type" ], "type": "object" @@ -9101,10 +9306,8 @@ { "description": "The response from the `EntityGetParentId` command.", "properties": { - "entity_id": { - "description": "The UUID of the parent entity.", - "format": "uuid", - "type": "string" + "data": { + "$ref": "#/components/schemas/EntityGetParentId" }, "type": { "enum": [ @@ -9114,7 +9317,7 @@ } }, "required": [ - "entity_id", + "data", "type" ], "type": "object" @@ -9122,13 +9325,8 @@ { "description": "The response from the `EntityGetAllChildUuids` command.", "properties": { - "entity_ids": { - "description": "The UUIDs of the child entities.", - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/EntityGetAllChildUuids" }, "type": { "enum": [ @@ -9138,7 +9336,7 @@ } }, "required": [ - "entity_ids", + "data", "type" ], "type": "object" @@ -9146,13 +9344,8 @@ { "description": "The response from the `SelectGet` command.", "properties": { - "entity_ids": { - "description": "The UUIDs of the selected entities.", - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/SelectGet" }, "type": { "enum": [ @@ -9162,7 +9355,7 @@ } }, "required": [ - "entity_ids", + "data", "type" ], "type": "object" @@ -9170,13 +9363,8 @@ { "description": "The response from the `GetEntityType` command.", "properties": { - "entity_type": { - "allOf": [ - { - "$ref": "#/components/schemas/EntityType" - } - ], - "description": "The type of the entity." + "data": { + "$ref": "#/components/schemas/GetEntityType" }, "type": { "enum": [ @@ -9186,7 +9374,7 @@ } }, "required": [ - "entity_type", + "data", "type" ], "type": "object" @@ -9194,13 +9382,8 @@ { "description": "The response from the `Solid3dGetAllEdgeFaces` command.", "properties": { - "faces": { - "description": "The UUIDs of the faces.", - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/Solid3dGetAllEdgeFaces" }, "type": { "enum": [ @@ -9210,7 +9393,7 @@ } }, "required": [ - "faces", + "data", "type" ], "type": "object" @@ -9218,13 +9401,8 @@ { "description": "The response from the `Solid3dGetAllOppositeEdges` command.", "properties": { - "edges": { - "description": "The UUIDs of the edges.", - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/Solid3dGetAllOppositeEdges" }, "type": { "enum": [ @@ -9234,7 +9412,7 @@ } }, "required": [ - "edges", + "data", "type" ], "type": "object" @@ -9242,10 +9420,8 @@ { "description": "The response from the `Solid3dGetOppositeEdge` command.", "properties": { - "edge": { - "description": "The UUID of the edge.", - "format": "uuid", - "type": "string" + "data": { + "$ref": "#/components/schemas/Solid3dGetOppositeEdge" }, "type": { "enum": [ @@ -9255,7 +9431,7 @@ } }, "required": [ - "edge", + "data", "type" ], "type": "object" @@ -9263,10 +9439,8 @@ { "description": "The response from the `Solid3dGetPrevAdjacentEdge` command.", "properties": { - "edge": { - "description": "The UUID of the edge.", - "format": "uuid", - "type": "string" + "data": { + "$ref": "#/components/schemas/Solid3dGetPrevAdjacentEdge" }, "type": { "enum": [ @@ -9276,7 +9450,7 @@ } }, "required": [ - "edge", + "data", "type" ], "type": "object" @@ -9284,10 +9458,8 @@ { "description": "The response from the `Solid3dGetNextAdjacentEdge` command.", "properties": { - "edge": { - "description": "The UUID of the edge.", - "format": "uuid", - "type": "string" + "data": { + "$ref": "#/components/schemas/Solid3dGetNextAdjacentEdge" }, "type": { "enum": [ @@ -9297,7 +9469,7 @@ } }, "required": [ - "edge", + "data", "type" ], "type": "object" @@ -9305,21 +9477,8 @@ { "description": "The response from the `MouseClick` command.", "properties": { - "entities_modified": { - "description": "Entities that are modified.", - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" - }, - "entities_selected": { - "description": "Entities that are selected.", - "items": { - "format": "uuid", - "type": "string" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/MouseClick" }, "type": { "enum": [ @@ -9329,8 +9488,7 @@ } }, "required": [ - "entities_modified", - "entities_selected", + "data", "type" ], "type": "object" @@ -9338,13 +9496,8 @@ { "description": "The response from the `CurveGetType` command.", "properties": { - "curve_type": { - "allOf": [ - { - "$ref": "#/components/schemas/CurveType" - } - ], - "description": "Curve type" + "data": { + "$ref": "#/components/schemas/CurveGetType" }, "type": { "enum": [ @@ -9354,7 +9507,7 @@ } }, "required": [ - "curve_type", + "data", "type" ], "type": "object" @@ -9362,12 +9515,8 @@ { "description": "The response from the `CurveGetControlPoints` command.", "properties": { - "control_points": { - "description": "Control points in the curve.", - "items": { - "$ref": "#/components/schemas/Point3d" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/CurveGetControlPoints" }, "type": { "enum": [ @@ -9377,7 +9526,7 @@ } }, "required": [ - "control_points", + "data", "type" ], "type": "object" @@ -9385,14 +9534,8 @@ { "description": "The response from the `Take Snapshot` command.", "properties": { - "contents": { - "description": "Contents of the image.", - "items": { - "format": "uint8", - "minimum": 0, - "type": "integer" - }, - "type": "array" + "data": { + "$ref": "#/components/schemas/TakeSnapshot" }, "type": { "enum": [ @@ -9402,7 +9545,170 @@ } }, "required": [ - "contents", + "data", + "type" + ], + "type": "object" + } + ] + }, + "OkWebSocketResponseData": { + "description": "The websocket messages this server sends.", + "oneOf": [ + { + "description": "Information about the ICE servers.", + "properties": { + "data": { + "properties": { + "ice_servers": { + "description": "Information about the ICE servers.", + "items": { + "$ref": "#/components/schemas/IceServer" + }, + "type": "array" + } + }, + "required": [ + "ice_servers" + ], + "type": "object" + }, + "type": { + "enum": [ + "ice_server_info" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The trickle ICE candidate response.", + "properties": { + "data": { + "properties": { + "candidate": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcIceCandidateInit" + } + ], + "description": "Information about the ICE candidate." + } + }, + "required": [ + "candidate" + ], + "type": "object" + }, + "type": { + "enum": [ + "trickle_ice" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The SDP answer response.", + "properties": { + "data": { + "properties": { + "answer": { + "allOf": [ + { + "$ref": "#/components/schemas/RtcSessionDescription" + } + ], + "description": "The session description." + } + }, + "required": [ + "answer" + ], + "type": "object" + }, + "type": { + "enum": [ + "sdp_answer" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The modeling command response.", + "properties": { + "data": { + "properties": { + "modeling_response": { + "allOf": [ + { + "$ref": "#/components/schemas/OkModelingCmdResponse" + } + ], + "description": "The result of the command." + } + }, + "required": [ + "modeling_response" + ], + "type": "object" + }, + "type": { + "enum": [ + "modeling" + ], + "type": "string" + } + }, + "required": [ + "data", + "type" + ], + "type": "object" + }, + { + "description": "The exported files.", + "properties": { + "data": { + "properties": { + "files": { + "description": "The exported files", + "items": { + "$ref": "#/components/schemas/RawFile" + }, + "type": "array" + } + }, + "required": [ + "files" + ], + "type": "object" + }, + "type": { + "enum": [ + "export" + ], + "type": "string" + } + }, + "required": [ + "data", "type" ], "type": "object" @@ -9987,85 +10293,6 @@ }, "type": "object" }, - "RtcIceCandidate": { - "description": "ICECandidate represents a ice candidate", - "properties": { - "address": { - "description": "The address of the candidate.", - "type": "string" - }, - "component": { - "description": "The component of the candidate.", - "format": "uint16", - "minimum": 0, - "type": "integer" - }, - "foundation": { - "description": "The foundation for the address.", - "type": "string" - }, - "port": { - "description": "The port used for the candidate.", - "format": "uint16", - "minimum": 0, - "type": "integer" - }, - "priority": { - "description": "The priority of the candidate.", - "format": "uint32", - "minimum": 0, - "type": "integer" - }, - "protocol": { - "allOf": [ - { - "$ref": "#/components/schemas/RtcIceProtocol" - } - ], - "description": "The protocol used for the candidate." - }, - "related_address": { - "description": "The related address of the candidate.", - "type": "string" - }, - "related_port": { - "description": "The related port of the candidate.", - "format": "uint16", - "minimum": 0, - "type": "integer" - }, - "stats_id": { - "description": "The stats ID.", - "type": "string" - }, - "tcp_type": { - "description": "The TCP type of the candidate.", - "type": "string" - }, - "typ": { - "allOf": [ - { - "$ref": "#/components/schemas/RtcIceCandidateType" - } - ], - "description": "The type of the candidate." - } - }, - "required": [ - "address", - "component", - "foundation", - "port", - "priority", - "protocol", - "related_address", - "related_port", - "stats_id", - "tcp_type", - "typ" - ], - "type": "object" - }, "RtcIceCandidateInit": { "description": "ICECandidateInit is used to serialize ice candidates", "properties": { @@ -10096,72 +10323,6 @@ ], "type": "object" }, - "RtcIceCandidateType": { - "description": "ICECandidateType represents the type of the ICE candidate used.", - "oneOf": [ - { - "description": "Unspecified indicates that the candidate type is unspecified.", - "enum": [ - "unspecified" - ], - "type": "string" - }, - { - "description": "ICECandidateTypeHost indicates that the candidate is of Host type as described in . A candidate obtained by binding to a specific port from an IP address on the host. This includes IP addresses on physical interfaces and logical ones, such as ones obtained through VPNs.", - "enum": [ - "host" - ], - "type": "string" - }, - { - "description": "ICECandidateTypeSrflx indicates the the candidate is of Server Reflexive type as described . A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to a server, such as a STUN server.", - "enum": [ - "srflx" - ], - "type": "string" - }, - { - "description": "ICECandidateTypePrflx indicates that the candidate is of Peer Reflexive type. A candidate type whose IP address and port are a binding allocated by a NAT for an ICE agent after it sends a packet through the NAT to its peer.", - "enum": [ - "prflx" - ], - "type": "string" - }, - { - "description": "ICECandidateTypeRelay indicates the the candidate is of Relay type as described in . A candidate type obtained from a relay server, such as a TURN server.", - "enum": [ - "relay" - ], - "type": "string" - } - ] - }, - "RtcIceProtocol": { - "description": "ICEProtocol indicates the transport protocol type that is used in the ice.URL structure.", - "oneOf": [ - { - "description": "Unspecified indicates that the protocol is unspecified.", - "enum": [ - "unspecified" - ], - "type": "string" - }, - { - "description": "UDP indicates the URL uses a UDP transport.", - "enum": [ - "udp" - ], - "type": "string" - }, - { - "description": "TCP indicates the URL uses a TCP transport.", - "enum": [ - "tcp" - ], - "type": "string" - } - ] - }, "RtcSdpType": { "description": "SDPType describes the type of an SessionDescription.", "oneOf": [ @@ -10280,6 +10441,35 @@ ], "type": "string" }, + "SelectGet": { + "description": "The response from the `SelectGet` command.", + "properties": { + "entity_ids": { + "description": "The UUIDs of the selected entities.", + "items": { + "format": "uuid", + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "entity_ids" + ], + "type": "object" + }, + "SelectWithPoint": { + "description": "The response from the `SelectWithPoint` command.", + "properties": { + "entity_id": { + "description": "The UUID of the entity that was selected.", + "format": "uuid", + "nullable": true, + "type": "string" + } + }, + "type": "object" + }, "Session": { "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", "properties": { @@ -10326,36 +10516,81 @@ ], "type": "object" }, - "SnakeCaseResult": { - "description": "Serde serializes Result into JSON as \"Ok\" and \"Err\", but we want \"ok\" and \"err\". So, create a new enum that serializes as lowercase.", - "oneOf": [ - { - "additionalProperties": false, - "description": "The result is Ok.", - "properties": { - "ok": { - "$ref": "#/components/schemas/OkModelingCmdResponse" - } + "Solid3dGetAllEdgeFaces": { + "description": "The response from the `Solid3dGetAllEdgeFaces` command.", + "properties": { + "faces": { + "description": "The UUIDs of the faces.", + "items": { + "format": "uuid", + "type": "string" }, - "required": [ - "ok" - ], - "type": "object" - }, - { - "additionalProperties": false, - "description": "The result is Err.", - "properties": { - "err": { - "$ref": "#/components/schemas/ErrorResponse" - } + "type": "array" + } + }, + "required": [ + "faces" + ], + "type": "object" + }, + "Solid3dGetAllOppositeEdges": { + "description": "The response from the `Solid3dGetAllOppositeEdges` command.", + "properties": { + "edges": { + "description": "The UUIDs of the edges.", + "items": { + "format": "uuid", + "type": "string" }, - "required": [ - "err" - ], - "type": "object" + "type": "array" } - ] + }, + "required": [ + "edges" + ], + "type": "object" + }, + "Solid3dGetNextAdjacentEdge": { + "description": "The response from the `Solid3dGetNextAdjacentEdge` command.", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "edge" + ], + "type": "object" + }, + "Solid3dGetOppositeEdge": { + "description": "The response from the `Solid3dGetOppositeEdge` command.", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "edge" + ], + "type": "object" + }, + "Solid3dGetPrevAdjacentEdge": { + "description": "The response from the `Solid3dGetPrevAdjacentEdge` command.", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "format": "uuid", + "type": "string" + } + }, + "required": [ + "edge" + ], + "type": "object" }, "Storage": { "description": "Describes the storage format of a glTF 2.0 scene.", @@ -10451,6 +10686,24 @@ ], "type": "string" }, + "TakeSnapshot": { + "description": "The response from the `TakeSnapshot` command.", + "properties": { + "contents": { + "description": "Contents of the image.", + "items": { + "format": "uint8", + "minimum": 0, + "type": "integer" + }, + "type": "array" + } + }, + "required": [ + "contents" + ], + "type": "object" + }, "UnitAngle": { "description": "The valid types of angle formats.", "oneOf": [ @@ -12510,135 +12763,18 @@ "type" ], "type": "object" - } - ] - }, - "WebSocketResponses": { - "description": "The websocket messages this server sends.", - "oneOf": [ - { - "description": "The trickle ICE candidate response.", - "properties": { - "candidate": { - "allOf": [ - { - "$ref": "#/components/schemas/RtcIceCandidate" - } - ], - "description": "Information about the ICE candidate." - }, - "type": { - "enum": [ - "trickle_ice" - ], - "type": "string" - } - }, - "required": [ - "candidate", - "type" - ], - "type": "object" - }, - { - "description": "The SDP answer response.", - "properties": { - "answer": { - "allOf": [ - { - "$ref": "#/components/schemas/RtcSessionDescription" - } - ], - "description": "The session description." - }, - "type": { - "enum": [ - "sdp_answer" - ], - "type": "string" - } - }, - "required": [ - "answer", - "type" - ], - "type": "object" - }, - { - "description": "The ICE server info response.", - "properties": { - "ice_servers": { - "description": "Information about the ICE servers.", - "items": { - "$ref": "#/components/schemas/IceServer" - }, - "type": "array" - }, - "type": { - "enum": [ - "ice_server_info" - ], - "type": "string" - } - }, - "required": [ - "ice_servers", - "type" - ], - "type": "object" - }, - { - "description": "The modeling command response.", - "properties": { - "cmd_id": { - "allOf": [ - { - "$ref": "#/components/schemas/ModelingCmdId" - } - ], - "description": "The ID of the command." - }, - "result": { - "allOf": [ - { - "$ref": "#/components/schemas/SnakeCaseResult" - } - ], - "description": "The result of the command." - }, - "type": { - "enum": [ - "modeling" - ], - "type": "string" - } - }, - "required": [ - "cmd_id", - "result", - "type" - ], - "type": "object" }, { - "description": "The export command response, this is sent as binary.", + "description": "The client-to-server Ping to ensure the WebSocket stays alive.", "properties": { - "files": { - "description": "The exported files.", - "items": { - "$ref": "#/components/schemas/RawFile" - }, - "type": "array" - }, "type": { "enum": [ - "export" + "ping" ], "type": "string" } }, "required": [ - "files", "type" ], "type": "object" @@ -15155,7 +15291,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WebSocketResponses" + "$ref": "#/components/schemas/ApiWebSocketResponse" } } },