From 8dc0501f1d50d0518dcb90fd17019e7276be65c7 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 21 Feb 2024 11:00:58 -0800 Subject: [PATCH] updates Signed-off-by: Jess Frazelle --- Cargo.lock | 747 ++- Cargo.toml | 2 +- cli-macro-impl/src/lib.rs | 6 +- cli-macro-impl/tests/gen/users.rs.gen | 5 + spec.json | 8495 ++++++++++++++++++++----- src/cmd_kcl.rs | 28 +- src/cmd_user.rs | 1 + src/context.rs | 6 +- 8 files changed, 7588 insertions(+), 1702 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 633a1ee0..d51e98dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -29,9 +29,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.6" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" +checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d" dependencies = [ "cfg-if", "getrandom", @@ -109,9 +109,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "6e2e1ebcb11de5c03c67de28a7df593d32191b44939c482e97702baaaa6ab6a5" dependencies = [ "anstyle", "anstyle-parse", @@ -157,13 +157,22 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" dependencies = [ "backtrace", ] +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + [[package]] name = "arc-swap" version = "1.6.0" @@ -189,13 +198,13 @@ dependencies = [ [[package]] name = "async-channel" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", - "event-listener 3.1.0", - "event-listener-strategy", + "event-listener 5.1.0", + "event-listener-strategy 0.5.0", "futures-core", "pin-project-lite", ] @@ -218,30 +227,30 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" +checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" dependencies = [ - "async-lock 2.8.0", + "async-lock 3.3.0", "async-task", "concurrent-queue", "fastrand 2.0.1", - "futures-lite 1.13.0", + "futures-lite 2.2.0", "slab", ] [[package]] name = "async-global-executor" -version = "2.3.1" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b6f5d7df27bd294849f8eec66ecfc63d11814df7a4f5d74168a2394467b776" +checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" dependencies = [ - "async-channel 1.9.0", + "async-channel 2.2.0", "async-executor", - "async-io", - "async-lock 2.8.0", + "async-io 2.3.1", + "async-lock 3.3.0", "blocking", - "futures-lite 1.13.0", + "futures-lite 2.2.0", "once_cell", ] @@ -258,13 +267,32 @@ dependencies = [ "futures-lite 1.13.0", "log", "parking", - "polling", + "polling 2.8.0", "rustix 0.37.27", "slab", "socket2 0.4.10", "waker-fn", ] +[[package]] +name = "async-io" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +dependencies = [ + "async-lock 3.3.0", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.2.0", + "parking", + "polling 3.4.0", + "rustix 0.38.21", + "slab", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-lock" version = "2.8.0" @@ -276,12 +304,12 @@ dependencies = [ [[package]] name = "async-lock" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "deb2ab2aa8a746e221ab826c73f48bc6ba41be6763f0855cb249eb6d154cf1d7" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ - "event-listener 3.1.0", - "event-listener-strategy", + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", "pin-project-lite", ] @@ -304,7 +332,7 @@ checksum = "62565bb4402e926b29953c785397c6dc0391b7b446e45008b0049eb43cec6f5d" dependencies = [ "async-channel 1.9.0", "async-global-executor", - "async-io", + "async-io 1.13.0", "async-lock 2.8.0", "crossbeam-utils", "futures-channel", @@ -324,9 +352,9 @@ dependencies = [ [[package]] name = "async-task" -version = "4.5.0" +version = "4.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" @@ -475,28 +503,28 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" dependencies = [ - "async-channel 2.1.0", - "async-lock 3.1.0", + "async-channel 2.2.0", + "async-lock 3.3.0", "async-task", "fastrand 2.0.1", "futures-io", - "futures-lite 2.0.1", + "futures-lite 2.2.0", "piper", "tracing", ] [[package]] name = "bson" -version = "2.7.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58da0ae1e701ea752cc46c1bb9f39d5ecefc7395c3ecd526261a566d4f16e0c2" +checksum = "ce21468c1c9c154a85696bb25c20582511438edb6ad67f846ba1378ffdd80222" dependencies = [ "ahash", "base64 0.13.1", "bitvec", "chrono", "hex", - "indexmap 1.9.3", + "indexmap 2.2.2", "js-sys", "once_cell", "rand", @@ -578,9 +606,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.14" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e92c5c1a78c62968ec57dbc2440366a2d6e5a23faf829970ff1585dc6b18e2" +checksum = "80c21025abd42669a92efc996ef13cfb2c5c627858421ea58d5c3b331a6c134f" dependencies = [ "clap_builder", "clap_derive", @@ -588,9 +616,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.14" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4323769dc8a61e2c39ad7dc26f6f2800524691a44d74fe3d1071a5c24db6370" +checksum = "458bf1f341769dfcf849846f65dffdf9146daa56bcd2a47cb4e1de9915567c99" dependencies = [ "anstream", "anstyle", @@ -612,9 +640,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -624,9 +652,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" [[package]] name = "cli-macro" @@ -689,9 +717,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" dependencies = [ "crossbeam-utils", ] @@ -736,9 +764,9 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpufeatures" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +checksum = "3fbc60abd742b35f2492f808e1abbb83d45f72db402e14c55057edc9c7b1e9e4" dependencies = [ "libc", ] @@ -930,13 +958,15 @@ dependencies = [ [[package]] name = "derive-docs" -version = "0.1.4" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c357dec14992ba88803535217ed83d6f6cd80efcb8fa8e3f8a30a9b84fadc1c7" +checksum = "834580a8bd697658876ed8c9f7727e49f01d34f5b859ca921ac5b99ffc6adf77" dependencies = [ "convert_case", + "once_cell", "proc-macro2", "quote", + "regex", "serde", "serde_tokenstream", "syn 2.0.49", @@ -1015,9 +1045,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.16" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545b22097d44f8a9581187cdf93de7a71e4722bf51200cfaba810865b49a495d" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "either" @@ -1048,9 +1078,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ "libc", "windows-sys 0.48.0", @@ -1064,9 +1094,20 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "3.1.0" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7ad6fd685ce13acd6d9541a30f6db6567a7a24c9ffd4ba2955d29e3f22c8b27" dependencies = [ "concurrent-queue", "parking", @@ -1075,11 +1116,21 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ - "event-listener 3.1.0", + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +dependencies = [ + "event-listener 5.1.0", "pin-project-lite", ] @@ -1127,9 +1178,9 @@ checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64d6dafc854908ff5da46ff3f8f473c6984119a2876a383a860246dd7841a868" +checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" dependencies = [ "simd-adler32", ] @@ -1252,11 +1303,14 @@ dependencies = [ [[package]] name = "futures-lite" -version = "2.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +checksum = "445ba825b27408685aaecefd65178908c36c6e96aaf6d8599419d46e624192ba" dependencies = [ + "fastrand 2.0.1", "futures-core", + "futures-io", + "parking", "pin-project-lite", ] @@ -1322,9 +1376,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -1367,19 +1421,43 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gltf-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "438ffe1a5540d75403feaf23636b164e816e93f6f03131674722b3886ce32a57" +dependencies = [ + "inflections", + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "gltf-json" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "655951ba557f2bc69ea4b0799446bae281fa78efae6319968bdd2c3e9a06d8e1" +dependencies = [ + "gltf-derive", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "h2" -version = "0.3.22" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.1.0", + "http 0.2.9", + "indexmap 2.2.2", "slab", "tokio", "tokio-util", @@ -1454,9 +1532,20 @@ dependencies = [ [[package]] name = "http" -version = "0.2.11" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "b32afd38673a8016f7c9ae69e5af41a58f81b1d31689040f2f1959594ce194ea" dependencies = [ "bytes", "fnv", @@ -1470,7 +1559,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", "pin-project-lite", ] @@ -1497,7 +1586,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.9", "http-body", "httparse", "httpdate", @@ -1512,23 +1601,23 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.24.2" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" dependencies = [ "futures-util", - "http", + "http 0.2.9", "hyper", - "rustls", + "rustls 0.21.8", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", ] [[package]] name = "iana-time-zone" -version = "0.1.58" +version = "0.1.59" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1559,9 +1648,9 @@ dependencies = [ [[package]] name = "image" -version = "0.24.7" +version = "0.24.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" +checksum = "034bbe799d1909622a74d1193aa50147769440040ff36cb2baa947609b0a4e23" dependencies = [ "bytemuck", "byteorder", @@ -1569,7 +1658,6 @@ dependencies = [ "exr", "gif", "jpeg-decoder", - "num-rational", "num-traits", "png", "qoi", @@ -1588,15 +1676,21 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.1.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", "hashbrown 0.14.2", "serde", ] +[[package]] +name = "inflections" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" + [[package]] name = "instant" version = "0.1.12" @@ -1637,13 +1731,13 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.10" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.3", - "rustix 0.38.24", - "windows-sys 0.52.0", + "rustix 0.38.21", + "windows-sys 0.48.0", ] [[package]] @@ -1691,9 +1785,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ "wasm-bindgen", ] @@ -1711,11 +1805,12 @@ dependencies = [ [[package]] name = "kcl-lib" -version = "0.1.40" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624f787e812d906b79dbda49eb1eaa0c02f0d50a82e545445b79547f198bf1e0" +checksum = "15b50e02e83444b6eb967b2354c343abd5e24222be86bdfd3c63edf27c9eb77a" dependencies = [ "anyhow", + "approx", "async-recursion", "async-trait", "bson", @@ -1723,11 +1818,15 @@ dependencies = [ "databake", "derive-docs", "futures", + "gltf-json", "js-sys", "kittycad", + "kittycad-execution-plan-macros", + "kittycad-execution-plan-traits", "lazy_static", - "parse-display", + "parse-display 0.9.0", "reqwest", + "ropey", "schemars", "serde", "serde_json", @@ -1735,19 +1834,19 @@ dependencies = [ "tokio", "tokio-tungstenite", "tower-lsp", - "ts-rs-json-value", + "ts-rs", "uuid", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winnow 0.5.19", + "winnow 0.5.40", ] [[package]] name = "kittycad" -version = "0.2.44" +version = "0.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff968a1b90af9a16f162c7bb57d7725ee8d4eeae939a998c82b48129802a2804" +checksum = "13958174d876353f429ea8230dc92fe86f164819cea2e51bbf22e01a4c2a496e" dependencies = [ "anyhow", "async-trait", @@ -1759,10 +1858,10 @@ dependencies = [ "data-encoding", "format_serde_error", "futures", - "http", + "http 0.2.9", "itertools 0.10.5", "log", - "parse-display", + "parse-display 0.8.2", "phonenumber", "rand", "reqwest", @@ -1782,6 +1881,28 @@ dependencies = [ "uuid", ] +[[package]] +name = "kittycad-execution-plan-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71d31b689c944d00aadda2ef83d8422a6efff97e1be5654a61f9d95496f0c19e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] +name = "kittycad-execution-plan-traits" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ec8efd57b59697eb140b63c0ffe7db44fdfe5a55f14e45513411eba2280ba5" +dependencies = [ + "serde", + "thiserror", + "uuid", +] + [[package]] name = "kv-log-macro" version = "1.0.7" @@ -1805,9 +1926,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libm" @@ -1815,17 +1936,6 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.1", - "libc", - "redox_syscall 0.4.1", -] - [[package]] name = "linked-hash-map" version = "0.5.6" @@ -1840,9 +1950,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" @@ -2022,17 +2132,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.18" @@ -2052,6 +2151,15 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + [[package]] name = "numeral" version = "1.0.0" @@ -2067,7 +2175,7 @@ dependencies = [ "base64 0.13.1", "chrono", "getrandom", - "http", + "http 0.2.9", "rand", "reqwest", "serde", @@ -2089,9 +2197,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oncemutex" @@ -2122,8 +2230,8 @@ dependencies = [ "data-encoding", "format_serde_error", "futures-util", - "http", - "indexmap 2.1.0", + "http 0.2.9", + "indexmap 2.2.2", "json-patch", "log", "numeral", @@ -2140,7 +2248,7 @@ dependencies = [ "schemars", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.25", "slog", "slog-async", "slog-json", @@ -2158,7 +2266,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75e56d5c441965b6425165b7e3223cc933ca469834f4a8b4786817a1f9dc4f13" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.2", "serde", "serde_json", ] @@ -2268,8 +2376,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6509d08722b53e8dafe97f2027b22ccbe3a5db83cb352931e9716b0aa44bc5c" dependencies = [ "once_cell", - "parse-display-derive", + "parse-display-derive 0.8.2", + "regex", +] + +[[package]] +name = "parse-display" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06af5f9333eb47bd9ba8462d612e37a8328a5cb80b13f0af4de4c3b89f52dee5" +dependencies = [ + "parse-display-derive 0.9.0", "regex", + "regex-syntax 0.8.2", ] [[package]] @@ -2283,7 +2402,21 @@ dependencies = [ "quote", "regex", "regex-syntax 0.7.5", - "structmeta", + "structmeta 0.2.0", + "syn 2.0.49", +] + +[[package]] +name = "parse-display-derive" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc9252f259500ee570c75adcc4e317fa6f57a1e47747d622e0bf838002a7b790" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "regex-syntax 0.8.2", + "structmeta 0.3.0", "syn 2.0.49", ] @@ -2392,6 +2525,20 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "polling" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.21", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "powerfmt" version = "0.2.0" @@ -2449,11 +2596,11 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.1", "getopts", "memchr", "unicase", @@ -2461,9 +2608,9 @@ dependencies = [ [[package]] name = "pulldown-cmark-to-cmark" -version = "11.0.2" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a883e495f8fc4f209521b03a89dde6f6f211ed7cf92e85693c82508e8b722710" +checksum = "6dd464f32d7631035e849fcd969a603e9bb17ceaebe8467352a7728147f34e42" dependencies = [ "pulldown-cmark", ] @@ -2560,6 +2707,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_syscall" version = "0.4.1" @@ -2571,12 +2727,12 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "libredox", + "redox_syscall 0.2.16", "thiserror", ] @@ -2645,7 +2801,7 @@ dependencies = [ "futures-core", "futures-util", "h2", - "http", + "http 0.2.9", "http-body", "hyper", "hyper-rustls", @@ -2657,19 +2813,21 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", + "rustls 0.21.8", + "rustls-pemfile 1.0.3", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "system-configuration", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", + "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", + "wasm-streams", "web-sys", "webpki-roots", "winreg", @@ -2695,7 +2853,7 @@ checksum = "88a3e86aa6053e59030e7ce2d2a3b258dd08fc2d337d52f73f6cb480f5858690" dependencies = [ "anyhow", "async-trait", - "http", + "http 0.2.9", "reqwest", "serde", "task-local-extensions", @@ -2713,7 +2871,7 @@ dependencies = [ "chrono", "futures", "getrandom", - "http", + "http 0.2.9", "hyper", "parking_lot 0.11.2", "reqwest", @@ -2783,6 +2941,16 @@ name = "roff" version = "0.1.0" source = "git+https://github.com/sondr3/roff-rs?branch=updates#54018979aed7ce313d8d6f7b2abdd95950df5b9d" +[[package]] +name = "ropey" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93411e420bcd1a75ddd1dc3caf18c23155eda2c090631a85af21ba19e97093b5" +dependencies = [ + "smallvec", + "str_indices", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2818,50 +2986,81 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.24" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ad981d6c340a49cdc40a1028d9c6084ec7e9fa33fcb839cab656a267071e234" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.11", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "446e14c5cda4f3f30fe71863c34ec70f5ac79d6087097ad0bb433e1be5edf04c" dependencies = [ "log", "ring", - "rustls-webpki", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e87c9956bd9807afa1f77e0f7594af32566e830e088a5576d27c5b6f30f49d41" +dependencies = [ + "log", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.2", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" -version = "0.6.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 2.0.0", + "rustls-pki-types", "schannel", "security-framework", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.5", ] +[[package]] +name = "rustls-pemfile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35e4980fa29e4c4b212ffb3db068a564cbf560e51d3944b7c88bd8bf5bec64f4" +dependencies = [ + "base64 0.21.5", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a716eb65e3158e90e17cd93d855216e27bde02745ab842f2cab4a39dba1bacf" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2872,6 +3071,17 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustls-webpki" +version = "0.102.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faaa0a62740bedb9b2ef5afa303da42764c012f743917351dc9a237ea1663610" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -3018,11 +3228,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.109" +version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" +checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.2", "itoa", "ryu", "serde", @@ -3030,9 +3240,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" dependencies = [ "itoa", "serde", @@ -3040,9 +3250,9 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.17" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", @@ -3096,11 +3306,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.27" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7a1570e38322cfe4154732e5110f887ea57e22b76f4bfd32b5bdd3368666c" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.2", "itoa", "ryu", "serde", @@ -3292,11 +3502,11 @@ dependencies = [ [[package]] name = "slog-term" -version = "2.9.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e022d0b998abfe5c3782c1f03551a596269450ccd677ea51c56f8b214610e8" +checksum = "87d29185c55b7b258b4f120eab00f48557d4d9bc814f41713f449d35b0f8977c" dependencies = [ - "is-terminal", + "atty", "slog", "term", "thread_local", @@ -3305,9 +3515,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.11.2" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3338,11 +3548,17 @@ dependencies = [ "lock_api", ] +[[package]] +name = "str_indices" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9557cb6521e8d009c51a8666f09356f4b817ba9ba0981a305bd86aee47bd35c" + [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" [[package]] name = "structmeta" @@ -3352,7 +3568,19 @@ checksum = "78ad9e09554f0456d67a69c1584c9798ba733a5b50349a6c0d0948710523922d" dependencies = [ "proc-macro2", "quote", - "structmeta-derive", + "structmeta-derive 0.2.0", + "syn 2.0.49", +] + +[[package]] +name = "structmeta" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e1575d8d40908d70f6fd05537266b90ae71b15dbbe7a8b7dffa2b759306d329" +dependencies = [ + "proc-macro2", + "quote", + "structmeta-derive 0.3.0", "syn 2.0.49", ] @@ -3367,6 +3595,17 @@ dependencies = [ "syn 2.0.49", ] +[[package]] +name = "structmeta-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + [[package]] name = "strum" version = "0.24.1" @@ -3389,6 +3628,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + [[package]] name = "syn" version = "1.0.109" @@ -3508,14 +3753,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.8.1" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", "fastrand 2.0.1", - "redox_syscall 0.4.1", - "rustix 0.38.24", + "redox_syscall 0.3.5", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -3545,9 +3790,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -3611,7 +3856,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.38.24", + "rustix 0.38.21", "windows-sys 0.48.0", ] @@ -3638,18 +3883,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", @@ -3685,6 +3930,8 @@ checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "libc", + "num_threads", "powerfmt", "serde", "time-core", @@ -3757,30 +4004,42 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.8", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" +dependencies = [ + "rustls 0.22.2", + "rustls-pki-types", "tokio", ] [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.22.2", "rustls-native-certs", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.25.0", "tungstenite", ] [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -3813,13 +4072,13 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.2", "toml_datetime", - "winnow 0.5.19", + "winnow 0.5.40", ] [[package]] @@ -3828,7 +4087,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" dependencies = [ - "indexmap 2.1.0", + "indexmap 2.2.2", "serde", "serde_spanned", "toml_datetime", @@ -3993,23 +4252,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] -name = "ts-rs-json-value" -version = "7.0.3" +name = "ts-rs" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6180ea4491378ce11e69129ace586476c591378af23bbbc5cd9f84991927a0" +checksum = "fc2cae1fc5d05d47aa24b64f9a4f7cba24cdc9187a2084dd97ac57bef5eccae6" dependencies = [ - "schemars", - "serde_json", "thiserror", - "ts-rs-macros-serde-json", + "ts-rs-macros", "uuid", ] [[package]] -name = "ts-rs-macros-serde-json" -version = "7.0.1" +name = "ts-rs-macros" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ccddb90eaf7e7c5d8b62c74626beb8cbc714a77d0f77f456204cc8f93aada9" +checksum = "73f7f9b821696963053a89a7bd8b292dc34420aea8294d7b225274d488f3ec92" dependencies = [ "Inflector", "proc-macro2", @@ -4020,18 +4277,19 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.0.0", "httparse", "log", "rand", - "rustls", + "rustls 0.22.2", + "rustls-pki-types", "sha1", "thiserror", "url", @@ -4148,9 +4406,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.4.2" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a72e1902dde2bd6441347de2b70b7f5d59bf157c6c62f0c44572607a1d55bbe" +checksum = "126e423afe2dd9ac52142e7e9d5ce4135d7e13776c529d27fd6bc49f19e3280b" [[package]] name = "version-compare" @@ -4234,9 +4492,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4244,9 +4502,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" dependencies = [ "bumpalo", "log", @@ -4259,9 +4517,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" dependencies = [ "cfg-if", "js-sys", @@ -4271,9 +4529,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4281,9 +4539,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", @@ -4294,9 +4552,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" + +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] [[package]] name = "wasm-timer" @@ -4315,9 +4586,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" dependencies = [ "js-sys", "wasm-bindgen", @@ -4368,11 +4639,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.51.1" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.48.5", + "windows-targets 0.52.0", ] [[package]] @@ -4575,9 +4846,9 @@ checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" dependencies = [ "memchr", ] @@ -4653,7 +4924,7 @@ checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" [[package]] name = "zoo" -version = "0.2.20" +version = "0.2.21" dependencies = [ "ansi_term", "anyhow", @@ -4673,7 +4944,7 @@ dependencies = [ "futures", "git_rev", "heck 0.4.1", - "http", + "http 0.2.9", "itertools 0.12.1", "kcl-lib", "kittycad", @@ -4681,7 +4952,7 @@ dependencies = [ "num-traits", "oauth2", "open", - "parse-display", + "parse-display 0.8.2", "pretty_assertions", "pulldown-cmark", "pulldown-cmark-to-cmark", @@ -4691,7 +4962,7 @@ dependencies = [ "roff", "serde", "serde_json", - "serde_yaml 0.9.27", + "serde_yaml 0.9.25", "serial_test", "shlex", "slog", @@ -4709,7 +4980,7 @@ dependencies = [ "thiserror", "tokio", "toml", - "toml_edit 0.21.0", + "toml_edit 0.21.1", "unicode-segmentation", "url", "uuid", diff --git a/Cargo.toml b/Cargo.toml index ff3028ca..08b16198 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zoo" -version = "0.2.20" +version = "0.2.21" edition = "2021" build = "build.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/cli-macro-impl/src/lib.rs b/cli-macro-impl/src/lib.rs index 3d2b3f56..f0e149c9 100644 --- a/cli-macro-impl/src/lib.rs +++ b/cli-macro-impl/src/lib.rs @@ -390,7 +390,11 @@ impl Operation { //if v.required { req_body_rendered.push(quote!(#p_og: "".to_string())); } else if v.required { - req_body_rendered.push(quote!(#p_og: #p_short.clone())); + if self.method == "PUT" { + req_body_rendered.push(quote!(#p_og: self.#p_short.clone())); + } else { + req_body_rendered.push(quote!(#p_og: #p_short.clone())); + } } else { // We can use self here since we aren't chaing the value from // a prompt. diff --git a/cli-macro-impl/tests/gen/users.rs.gen b/cli-macro-impl/tests/gen/users.rs.gen index 09d34fc0..90b11ac6 100644 --- a/cli-macro-impl/tests/gen/users.rs.gen +++ b/cli-macro-impl/tests/gen/users.rs.gen @@ -52,6 +52,9 @@ pub struct CmdUserEdit { #[doc = "The user's GitHub handle."] #[clap(long = "github", short = 'g', required = false)] pub new_github: Option, + #[doc = "The image URL for the user. NOTE: If the user uses an OAuth2 provider, this will be overwritten by the provider's image URL when the user logs in next."] + #[clap(long = "image", short = 'i', required = true)] + pub new_image: String, #[doc = "The user's last name."] #[clap(long = "last-name", short = 'l', required = false)] pub new_last_name: Option, @@ -67,6 +70,7 @@ impl crate::cmd::Command for CmdUserEdit { && self.new_discord.is_none() && self.new_first_name.is_none() && self.new_github.is_none() + && self.new_image.is_empty() && self.new_last_name.is_none() && self.new_phone.is_none() { @@ -81,6 +85,7 @@ impl crate::cmd::Command for CmdUserEdit { discord: self.new_discord.clone(), first_name: self.new_first_name.clone(), github: self.new_github.clone(), + image: self.new_image.clone(), last_name: self.new_last_name.clone(), phone: self.new_phone.clone(), }) diff --git a/spec.json b/spec.json index 6ce67fc8..9934ea5b 100644 --- a/spec.json +++ b/spec.json @@ -132,6 +132,68 @@ } } }, + "/_meta/ipinfo": { + "get": { + "tags": [ + "meta", + "hidden" + ], + "summary": "Get ip address information.", + "operationId": "get_ipinfo", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IpAddrInfo" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, "/ai-prompts": { "get": { "tags": [ @@ -302,14 +364,138 @@ } } }, - "/ai/text-to-cad/{output_format}": { + "/ai/kcl/completions": { "post": { "tags": [ "ai", "beta" ], + "summary": "Generate code completions for KCL.", + "operationId": "create_kcl_code_completions", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KclCodeCompletionRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KclCodeCompletionResponse" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_kcl_code_completions", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/ai/text-to-cad/{output_format}": { + "post": { + "tags": [ + "ai" + ], "summary": "Generate a CAD model from text.", - "description": "Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.\nThis operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\nOne thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.\nThis is an alpha endpoint. It will change in the future. The current output is honestly pretty bad. So if you find this endpoint, you get what you pay for, which currently is nothing. But in the future will be made a lot better.", + "description": "Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated models. Any other formats you request here will also be returned when you list your generated models.\nThis operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\nOne thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.", "operationId": "create_text_to_cad", "parameters": [ { @@ -391,7 +577,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_text_to_cad", + "operationId": "options_text_to_cad", "parameters": [ { "in": "path", @@ -1178,7 +1364,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/VerificationToken" + "$ref": "#/components/schemas/VerificationTokenResponse" } } } @@ -1338,47 +1524,38 @@ } } }, - "/file/center-of-mass": { - "post": { + "/auth/saml/provider/{provider_id}/login": { + "get": { "tags": [ - "file" + "hidden" ], - "summary": "Get CAD file center of mass.", - "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cartesian coordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", - "operationId": "create_file_center_of_mass", + "summary": "Get a redirect straight to the SAML IdP.", + "description": "The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.", + "operationId": "get_auth_saml", "parameters": [ { - "in": "query", - "name": "output_unit", - "description": "The output unit for the center of mass.", + "in": "path", + "name": "provider_id", + "description": "The ID of the identity provider.", + "required": true, "schema": { - "$ref": "#/components/schemas/UnitLength" + "$ref": "#/components/schemas/Uuid" } }, { "in": "query", - "name": "src_format", - "description": "The format of the file.", - "required": true, + "name": "callback_url", + "description": "The URL to redirect back to after we have authenticated.", "schema": { - "$ref": "#/components/schemas/FileImportFormat" + "nullable": true, + "type": "string", + "format": "uri" } } ], - "requestBody": { - "content": { - "application/octet-stream": { - "schema": { - "type": "string", - "format": "binary" - } - } - }, - "required": true - }, "responses": { - "201": { - "description": "successful creation", + "302": { + "description": "Temporary Redirect", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1412,13 +1589,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileCenterOfMass" - } - } } }, "4XX": { @@ -1429,16 +1599,37 @@ } } }, - "options": { + "post": { "tags": [ "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_center_of_mass", + "summary": "Authenticate a user via SAML", + "operationId": "post_auth_saml", + "parameters": [ + { + "in": "path", + "name": "provider_id", + "description": "The ID of the identity provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Uuid" + } + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "successful operation, no content", + "302": { + "description": "Temporary Redirect", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -1471,12 +1662,229 @@ "schema": { "type": "string" } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_auth_saml", + "parameters": [ + { + "in": "path", + "name": "provider_id", + "description": "The ID of the identity provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Uuid" + } + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/file/center-of-mass": { + "post": { + "tags": [ + "file" + ], + "summary": "Get CAD file center of mass.", + "description": "We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\nThis endpoint returns the cartesian coordinate in world space measure units.\nIn the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\nGet the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\nIf the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.", + "operationId": "create_file_center_of_mass", + "parameters": [ + { + "in": "query", + "name": "output_unit", + "description": "The output unit for the center of mass.", + "schema": { + "$ref": "#/components/schemas/UnitLength" + } + }, + { + "in": "query", + "name": "src_format", + "description": "The format of the file.", + "required": true, + "schema": { + "$ref": "#/components/schemas/FileImportFormat" + } + } + ], + "requestBody": { + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FileCenterOfMass" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_file_center_of_mass", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, "5XX": { "$ref": "#/components/responses/Error" } @@ -1581,7 +1989,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_conversion", + "operationId": "options_file_conversion", "parameters": [ { "in": "path", @@ -1764,7 +2172,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_density", + "operationId": "options_file_density", "responses": { "204": { "description": "successful operation, no content", @@ -1910,7 +2318,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_execution", + "operationId": "options_file_execution", "parameters": [ { "in": "path", @@ -2084,7 +2492,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_mass", + "operationId": "options_file_mass", "responses": { "204": { "description": "successful operation, no content", @@ -2229,7 +2637,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_surface_area", + "operationId": "options_file_surface_area", "responses": { "204": { "description": "successful operation, no content", @@ -2374,7 +2782,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_file_volume", + "operationId": "options_file_volume", "responses": { "204": { "description": "successful operation, no content", @@ -3063,6 +3471,15 @@ "type": "string" } }, + { + "in": "query", + "name": "id_token", + "description": "For Apple only, a JSON web token containing the user’s identity information.", + "schema": { + "nullable": true, + "type": "string" + } + }, { "in": "query", "name": "state", @@ -3070,6 +3487,15 @@ "schema": { "type": "string" } + }, + { + "in": "query", + "name": "user", + "description": "For Apple only, a JSON string containing the data requested in the scope property. The returned data is in the following format: `{ \"name\": { \"firstName\": string, \"lastName\": string }, \"email\": string }`", + "schema": { + "nullable": true, + "type": "string" + } } ], "responses": { @@ -3125,16 +3551,15 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/oauth2/provider/{provider}/consent": { - "get": { + }, + "post": { "tags": [ "oauth2", "hidden" ], - "summary": "Get the consent URL and other information for the OAuth 2.0 provider.", - "operationId": "oauth2_provider_consent", + "summary": "Listen for callbacks for the OAuth 2.0 provider.", + "description": "This specific endpoint listens for posts of form data.", + "operationId": "oauth2_provider_callback_post", "parameters": [ { "in": "path", @@ -3144,23 +3569,24 @@ "schema": { "$ref": "#/components/schemas/AccountProvider" } - }, - { - "in": "query", - "name": "callback_url", - "description": "The URL to redirect back to after we have authenticated.", - "schema": { - "nullable": true, - "type": "string" - } } ], - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", + "requestBody": { + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/AuthCallback" + } + } + }, + "required": true + }, + "responses": { + "302": { + "description": "Temporary Redirect", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", "style": "simple", "required": true, "schema": { @@ -3190,12 +3616,13 @@ "schema": { "type": "string" } - } - }, - "content": { - "application/json": { + }, + "Set-Cookie": { + "description": "Set-Cookie header.", + "style": "simple", + "required": true, "schema": { - "$ref": "#/components/schemas/OAuth2ClientInfo" + "type": "string" } } } @@ -3207,18 +3634,28 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/ping": { - "get": { + }, + "options": { "tags": [ - "meta" + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_oauth2_provider_callback", + "parameters": [ + { + "in": "path", + "name": "provider", + "description": "The provider.", + "required": true, + "schema": { + "$ref": "#/components/schemas/AccountProvider" + } + } ], - "summary": "Return pong.", - "operationId": "ping", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3252,13 +3689,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Pong" - } - } } }, "4XX": { @@ -3270,41 +3700,31 @@ } } }, - "/unit/conversion/angle/{input_unit}/{output_unit}": { + "/oauth2/provider/{provider}/consent": { "get": { "tags": [ - "unit" + "oauth2", + "hidden" ], - "summary": "Convert angle units.", - "description": "Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_angle_unit_conversion", + "summary": "Get the consent URL and other information for the OAuth 2.0 provider.", + "operationId": "oauth2_provider_consent", "parameters": [ { "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitAngle" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", + "name": "provider", + "description": "The provider.", "required": true, "schema": { - "$ref": "#/components/schemas/UnitAngle" + "$ref": "#/components/schemas/AccountProvider" } }, { "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, + "name": "callback_url", + "description": "The URL to redirect back to after we have authenticated.", "schema": { - "type": "number", - "format": "double" + "nullable": true, + "type": "string" } } ], @@ -3348,7 +3768,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitAngleConversion" + "$ref": "#/components/schemas/OAuth2ClientInfo" } } } @@ -3362,44 +3782,14 @@ } } }, - "/unit/conversion/area/{input_unit}/{output_unit}": { + "/org": { "get": { "tags": [ - "unit" - ], - "summary": "Convert area units.", - "description": "Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_area_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitArea" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitArea" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } + "orgs" ], + "summary": "Get an org.", + "description": "This endpoint requires authentication by an org admin. It gets the authenticated user's org.", + "operationId": "get_org", "responses": { "200": { "description": "successful operation", @@ -3440,7 +3830,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitAreaConversion" + "$ref": "#/components/schemas/Org" } } } @@ -3452,46 +3842,24 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/unit/conversion/current/{input_unit}/{output_unit}": { - "get": { + }, + "put": { "tags": [ - "unit" + "orgs" ], - "summary": "Convert current units.", - "description": "Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_current_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitCurrent" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitCurrent" + "summary": "Update an org.", + "description": "This endpoint requires authentication by an org admin. It updates the authenticated user's org.", + "operationId": "update_org", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgDetails" + } } }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } - ], + "required": true + }, "responses": { "200": { "description": "successful operation", @@ -3532,7 +3900,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitCurrentConversion" + "$ref": "#/components/schemas/Org" } } } @@ -3544,49 +3912,27 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/unit/conversion/energy/{input_unit}/{output_unit}": { - "get": { + }, + "post": { "tags": [ - "unit" + "orgs" ], - "summary": "Convert energy units.", - "description": "Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_energy_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitEnergy" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitEnergy" + "summary": "Create an org.", + "description": "This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.", + "operationId": "create_org", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgDetails" + } } }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } - ], + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3624,7 +3970,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitEnergyConversion" + "$ref": "#/components/schemas/Org" } } } @@ -3636,49 +3982,18 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/unit/conversion/force/{input_unit}/{output_unit}": { - "get": { + }, + "delete": { "tags": [ - "unit" - ], - "summary": "Convert force units.", - "description": "Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_force_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitForce" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitForce" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } + "orgs", + "hidden" ], + "summary": "Delete an org.", + "description": "In order to delete an org, you must first delete all of its members, except yourself.\nYou must also have no outstanding invoices or unpaid balances.\nThis endpoint requires authentication by an org admin. It deletes the authenticated user's org.", + "operationId": "delete_org", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3712,13 +4027,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitForceConversion" - } - } } }, "4XX": { @@ -3728,49 +4036,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/unit/conversion/frequency/{input_unit}/{output_unit}": { - "get": { + }, + "options": { "tags": [ - "unit" - ], - "summary": "Convert frequency units.", - "description": "Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_frequency_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitFrequency" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitFrequency" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } + "hidden" ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_org", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -3804,13 +4080,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitFrequencyConversion" - } - } } }, "4XX": { @@ -3822,41 +4091,40 @@ } } }, - "/unit/conversion/length/{input_unit}/{output_unit}": { + "/org/api-calls": { "get": { "tags": [ - "unit" + "api-calls" ], - "summary": "Convert length units.", - "description": "Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_length_unit_conversion", + "summary": "List API calls for your org.", + "description": "This includes all API calls that were made by users in the org.\nThis endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "org_list_api_calls", "parameters": [ { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", "schema": { - "$ref": "#/components/schemas/UnitLength" + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 } }, { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", "schema": { - "$ref": "#/components/schemas/UnitLength" + "nullable": true, + "type": "string" } }, { "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, + "name": "sort_by", "schema": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/CreatedAtSortMode" } } ], @@ -3900,7 +4168,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitLengthConversion" + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" } } } @@ -3911,44 +4179,29 @@ "5XX": { "$ref": "#/components/responses/Error" } + }, + "x-dropshot-pagination": { + "required": [] } } }, - "/unit/conversion/mass/{input_unit}/{output_unit}": { + "/org/api-calls/{id}": { "get": { "tags": [ - "unit" + "api-calls" ], - "summary": "Convert mass units.", - "description": "Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_mass_unit_conversion", + "summary": "Get an API call for an org.", + "description": "This endpoint requires authentication by an org admin. It returns details of the requested API call for the user's org.", + "operationId": "get_api_call_for_org", "parameters": [ { "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMass" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitMass" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", + "name": "id", + "description": "The ID of the API call.", "required": true, "schema": { - "type": "number", - "format": "double" + "type": "string", + "format": "uuid" } } ], @@ -3992,7 +4245,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitMassConversion" + "$ref": "#/components/schemas/ApiCallWithPrice" } } } @@ -4006,41 +4259,48 @@ } } }, - "/unit/conversion/power/{input_unit}/{output_unit}": { + "/org/members": { "get": { "tags": [ - "unit" + "orgs" ], - "summary": "Convert power units.", - "description": "Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_power_unit_conversion", + "summary": "List members of your org.", + "description": "This endpoint requires authentication by an org admin. It lists the members of the authenticated user's org.", + "operationId": "list_org_members", "parameters": [ { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", "schema": { - "$ref": "#/components/schemas/UnitPower" + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 } }, { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", "schema": { - "$ref": "#/components/schemas/UnitPower" + "nullable": true, + "type": "string" } }, { "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, + "name": "sort_by", "schema": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/CreatedAtSortMode" + } + }, + { + "in": "query", + "name": "role", + "description": "The organization role to filter by.", + "schema": { + "$ref": "#/components/schemas/OrgRole" } } ], @@ -4084,7 +4344,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitPowerConversion" + "$ref": "#/components/schemas/OrgMemberResultsPage" } } } @@ -4095,50 +4355,31 @@ "5XX": { "$ref": "#/components/responses/Error" } + }, + "x-dropshot-pagination": { + "required": [] } - } - }, - "/unit/conversion/pressure/{input_unit}/{output_unit}": { - "get": { + }, + "post": { "tags": [ - "unit" + "orgs" ], - "summary": "Convert pressure units.", - "description": "Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_pressure_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitPressure" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitPressure" + "summary": "Add a member to your org.", + "description": "If the user exists, this will add them to your org. If they do not exist, this will create a new user and add them to your org.\nIn both cases the user gets an email that they have been added to the org.\nIf the user is already in your org, this will return a 400 and a message.\nIf the user is already in a different org, this will return a 400 and a message.\nThis endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.", + "operationId": "create_org_member", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AddOrgMember" + } } }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } - ], + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4176,7 +4417,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitPressureConversion" + "$ref": "#/components/schemas/OrgMember" } } } @@ -4188,49 +4429,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/unit/conversion/temperature/{input_unit}/{output_unit}": { - "get": { + }, + "options": { "tags": [ - "unit" - ], - "summary": "Convert temperature units.", - "description": "Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_temperature_unit_conversion", - "parameters": [ - { - "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTemperature" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTemperature" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", - "required": true, - "schema": { - "type": "number", - "format": "double" - } - } + "hidden" ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_org_member", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4264,13 +4473,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnitTemperatureConversion" - } - } } }, "4XX": { @@ -4282,41 +4484,22 @@ } } }, - "/unit/conversion/torque/{input_unit}/{output_unit}": { + "/org/members/{user_id}": { "get": { "tags": [ - "unit" + "orgs" ], - "summary": "Convert torque units.", - "description": "Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_torque_unit_conversion", + "summary": "Get a member of your org.", + "description": "This endpoint requires authentication by an org admin. It gets the specified member of the authenticated user's org.", + "operationId": "get_org_member", "parameters": [ { "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTorque" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitTorque" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", + "name": "user_id", + "description": "The user id of the org member.", "required": true, "schema": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/Uuid" } } ], @@ -4360,7 +4543,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitTorqueConversion" + "$ref": "#/components/schemas/OrgMember" } } } @@ -4372,46 +4555,35 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/unit/conversion/volume/{input_unit}/{output_unit}": { - "get": { + }, + "put": { "tags": [ - "unit" + "orgs" ], - "summary": "Convert volume units.", - "description": "Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.", - "operationId": "get_volume_unit_conversion", + "summary": "Update a member of your org.", + "description": "This endpoint requires authentication by an org admin. It updates the specified member of the authenticated user's org.", + "operationId": "update_org_member", "parameters": [ { "in": "path", - "name": "input_unit", - "description": "The source format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVolume" - } - }, - { - "in": "path", - "name": "output_unit", - "description": "The output format of the unit.", - "required": true, - "schema": { - "$ref": "#/components/schemas/UnitVolume" - } - }, - { - "in": "query", - "name": "value", - "description": "The initial value.", + "name": "user_id", + "description": "The user id of the org member.", "required": true, "schema": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/Uuid" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMemberToOrgBody" + } + } + }, + "required": true + }, "responses": { "200": { "description": "successful operation", @@ -4452,7 +4624,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UnitVolumeConversion" + "$ref": "#/components/schemas/OrgMember" } } } @@ -4464,19 +4636,28 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user": { - "get": { + }, + "delete": { "tags": [ - "users" + "orgs" + ], + "summary": "Remove a member from your org.", + "description": "This endpoint requires authentication by an org admin. It removes the specified member from the authenticated user's org.", + "operationId": "delete_org_member", + "parameters": [ + { + "in": "path", + "name": "user_id", + "description": "The user id of the org member.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Uuid" + } + } ], - "summary": "Get your user.", - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", - "operationId": "get_user_self", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4510,13 +4691,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } } }, "4XX": { @@ -4527,26 +4701,27 @@ } } }, - "put": { + "options": { "tags": [ - "users" + "hidden" ], - "summary": "Update your user.", - "description": "This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.", - "operationId": "update_user_self", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateUser" - } + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_update_org_member", + "parameters": [ + { + "in": "path", + "name": "user_id", + "description": "The user id of the org member.", + "required": true, + "schema": { + "$ref": "#/components/schemas/Uuid" } - }, - "required": true - }, + } + ], "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4580,13 +4755,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/User" - } - } } }, "4XX": { @@ -4596,17 +4764,19 @@ "$ref": "#/components/responses/Error" } } - }, - "delete": { + } + }, + "/org/payment": { + "get": { "tags": [ - "users" + "payments" ], - "summary": "Delete your user.", - "description": "This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.\nThis call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.", - "operationId": "delete_user_self", + "summary": "Get payment info about your org.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.", + "operationId": "get_payment_information_for_org", "responses": { - "204": { - "description": "successful deletion", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4640,6 +4810,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } } }, "4XX": { @@ -4650,16 +4827,26 @@ } } }, - "options": { + "put": { "tags": [ - "hidden" + "payments" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_user_self", + "summary": "Update payment info for your org.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.", + "operationId": "update_payment_information_for_org", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "successful operation, no content", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4693,6 +4880,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } } }, "4XX": { @@ -4702,48 +4896,27 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/api-calls": { - "get": { + }, + "post": { "tags": [ - "api-calls" + "payments" ], - "summary": "List API calls for your user.", - "description": "This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "user_list_api_calls", - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 + "summary": "Create payment info for your org.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.", + "operationId": "create_payment_information_for_org", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo" + } } }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - } - } - ], + "required": true + }, "responses": { - "200": { - "description": "successful operation", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4781,7 +4954,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + "$ref": "#/components/schemas/Customer" } } } @@ -4792,35 +4965,18 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - } - }, - "/user/api-calls/{id}": { - "get": { + }, + "delete": { "tags": [ - "api-calls" - ], - "summary": "Get an API call for a user.", - "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.", - "operationId": "get_api_call_for_user", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The ID of the API call.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "payments" ], + "summary": "Delete payment info for your org.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.", + "operationId": "delete_payment_information_for_org", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -4854,11 +5010,57 @@ "type": "string" } } - }, - "content": { - "application/json": { + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_information_for_org", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, "schema": { - "$ref": "#/components/schemas/ApiCallWithPrice" + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" } } } @@ -4872,43 +5074,14 @@ } } }, - "/user/api-tokens": { + "/org/payment/balance": { "get": { "tags": [ - "api-tokens" - ], - "summary": "List API tokens for your user.", - "description": "This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", - "operationId": "list_api_tokens_for_user", - "parameters": [ - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - } - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - } - } + "payments" ], + "summary": "Get balance for your org.", + "description": "This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.", + "operationId": "get_payment_balance_for_org", "responses": { "200": { "description": "successful operation", @@ -4949,7 +5122,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiTokenResultsPage" + "$ref": "#/components/schemas/CustomerBalance" } } } @@ -4960,18 +5133,18 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - }, + } + }, + "/org/payment/intent": { "post": { "tags": [ - "api-tokens" + "payments", + "hidden" ], - "summary": "Create a new API token for your user.", - "description": "This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.", - "operationId": "create_api_token_for_user", + "summary": "Create a payment intent for your org.", + "description": "This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.", + "operationId": "create_payment_intent_for_org", "responses": { "201": { "description": "successful creation", @@ -5012,7 +5185,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiToken" + "$ref": "#/components/schemas/PaymentIntent" } } } @@ -5031,7 +5204,7 @@ ], "summary": "OPTIONS endpoint.", "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_api_token_for_user", + "operationId": "options_payment_intent_for_org", "responses": { "204": { "description": "successful operation, no content", @@ -5079,26 +5252,14 @@ } } }, - "/user/api-tokens/{token}": { + "/org/payment/invoices": { "get": { "tags": [ - "api-tokens" - ], - "summary": "Get an API token for your user.", - "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.", - "operationId": "get_api_token_for_user", - "parameters": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "payments" ], + "summary": "List invoices for your org.", + "description": "This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.", + "operationId": "list_invoices_for_org", "responses": { "200": { "description": "successful operation", @@ -5139,7 +5300,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiToken" + "title": "Array_of_Invoice", + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice" + } } } } @@ -5151,29 +5316,19 @@ "$ref": "#/components/responses/Error" } } - }, - "delete": { + } + }, + "/org/payment/methods": { + "get": { "tags": [ - "api-tokens" - ], - "summary": "Delete an API token for your user.", - "description": "This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", - "operationId": "delete_api_token_for_user", - "parameters": [ - { - "in": "path", - "name": "token", - "description": "The API token.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } + "payments" ], + "summary": "List payment methods for your org.", + "description": "This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.", + "operationId": "list_payment_methods_for_org", "responses": { - "204": { - "description": "successful deletion", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5207,6 +5362,17 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_PaymentMethod", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } + } + } } }, "4XX": { @@ -5216,29 +5382,31 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/org/payment/methods/{id}": { + "delete": { "tags": [ + "payments", "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_api_token_for_user", + "summary": "Delete a payment method for your org.", + "description": "This endpoint requires authentication by an org admin. It deletes the specified payment method for the authenticated user's org.", + "operationId": "delete_payment_method_for_org", "parameters": [ { "in": "path", - "name": "token", - "description": "The API token.", + "name": "id", + "description": "The ID of the payment method.", "required": true, "schema": { - "type": "string", - "format": "uuid" + "type": "string" } } ], "responses": { "204": { - "description": "successful operation, no content", + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5281,82 +5449,28 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/extended": { - "get": { + }, + "options": { "tags": [ - "users" + "hidden" ], - "summary": "Get extended information about your user.", - "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users-extended/me` endpoint.", - "operationId": "get_user_self_extended", - "responses": { - "200": { - "description": "successful operation", - "headers": { - "Access-Control-Allow-Credentials": { - "description": "Access-Control-Allow-Credentials header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Headers": { - "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Methods": { - "description": "Access-Control-Allow-Methods header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - }, - "Access-Control-Allow-Origin": { - "description": "Access-Control-Allow-Origin header.", - "style": "simple", - "required": true, - "schema": { - "type": "string" - } - } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtendedUser" - } - } + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_methods_for_org", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" } - } - } - }, - "/user/onboarding": { - "get": { - "tags": [ - "users", - "hidden" ], - "summary": "Get your user's onboarding status.", - "description": "Checks key part of their api usage to determine their onboarding progress", - "operationId": "get_user_onboarding_self", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5390,13 +5504,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Onboarding" - } - } } }, "4XX": { @@ -5408,14 +5515,14 @@ } } }, - "/user/payment": { + "/org/payment/subscriptions": { "get": { "tags": [ "payments" ], - "summary": "Get payment info about your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.", - "operationId": "get_payment_information_for_user", + "summary": "Get the subscription for an org.", + "description": "This endpoint requires authentication by an org admin. It gets the subscription for the authenticated user's org.", + "operationId": "get_org_subscription", "responses": { "200": { "description": "successful operation", @@ -5456,7 +5563,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } } @@ -5473,14 +5580,14 @@ "tags": [ "payments" ], - "summary": "Update payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.", - "operationId": "update_payment_information_for_user", + "summary": "Update the subscription for an org.", + "description": "This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.", + "operationId": "update_org_subscription", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BillingInfo" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } }, @@ -5526,7 +5633,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } } @@ -5543,14 +5650,14 @@ "tags": [ "payments" ], - "summary": "Create payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.", - "operationId": "create_payment_information_for_user", + "summary": "Create the subscription for an org.", + "description": "This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.", + "operationId": "create_org_subscription", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BillingInfo" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } }, @@ -5596,7 +5703,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Customer" + "$ref": "#/components/schemas/ZooProductSubscriptions" } } } @@ -5609,16 +5716,16 @@ } } }, - "delete": { + "options": { "tags": [ - "payments" + "hidden" ], - "summary": "Delete payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.", - "operationId": "delete_payment_information_for_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_org_subscription", "responses": { "204": { - "description": "successful deletion", + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5661,14 +5768,17 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/org/payment/tax": { + "get": { "tags": [ + "payments", "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_information_for_user", + "summary": "Validate an orgs's information is correct and valid for automatic tax.", + "description": "This endpoint requires authentication by an org admin. It will return an error if the org's information is not valid for automatic tax. Otherwise, it will return an empty successful response.", + "operationId": "validate_customer_tax_information_for_org", "responses": { "204": { "description": "successful operation, no content", @@ -5716,14 +5826,14 @@ } } }, - "/user/payment/balance": { + "/org/saml/idp": { "get": { "tags": [ - "payments" + "orgs" ], - "summary": "Get balance for your user.", - "description": "This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.", - "operationId": "get_payment_balance_for_user", + "summary": "Get the SAML identity provider.", + "description": "This endpoint requires authentication by an org admin.", + "operationId": "get_org_saml_idp", "responses": { "200": { "description": "successful operation", @@ -5764,7 +5874,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CustomerBalance" + "$ref": "#/components/schemas/SamlIdentityProvider" } } } @@ -5776,20 +5886,27 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/intent": { - "post": { + }, + "put": { "tags": [ - "payments", - "hidden" + "orgs" ], - "summary": "Create a payment intent for your user.", - "description": "This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.", - "operationId": "create_payment_intent_for_user", + "summary": "Update the SAML identity provider.", + "description": "This endpoint requires authentication by an org admin.", + "operationId": "update_org_saml_idp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SamlIdentityProviderCreate" + } + } + }, + "required": true + }, "responses": { - "201": { - "description": "successful creation", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5827,7 +5944,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentIntent" + "$ref": "#/components/schemas/SamlIdentityProvider" } } } @@ -5840,16 +5957,26 @@ } } }, - "options": { + "post": { "tags": [ - "hidden" + "orgs" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_payment_intent_for_user", + "summary": "Create a SAML identity provider.", + "description": "This endpoint requires authentication by an org admin.", + "operationId": "create_org_saml_idp", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SamlIdentityProviderCreate" + } + } + }, + "required": true + }, "responses": { - "204": { - "description": "successful operation, no content", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5883,6 +6010,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SamlIdentityProvider" + } + } } }, "4XX": { @@ -5892,19 +6026,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/invoices": { - "get": { + }, + "delete": { "tags": [ - "payments" + "orgs" ], - "summary": "List invoices for your user.", - "description": "This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.", - "operationId": "list_invoices_for_user", + "summary": "Delete an SAML identity provider.", + "description": "This endpoint requires authentication by an org admin.", + "operationId": "delete_org_saml_idp", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -5938,17 +6070,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_Invoice", - "type": "array", - "items": { - "$ref": "#/components/schemas/Invoice" - } - } - } } }, "4XX": { @@ -5958,19 +6079,17 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/methods": { - "get": { + }, + "options": { "tags": [ - "payments" + "hidden" ], - "summary": "List payment methods for your user.", - "description": "This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.", - "operationId": "list_payment_methods_for_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_org_saml_idp", "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6004,17 +6123,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "title": "Array_of_PaymentMethod", - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentMethod" - } - } - } } }, "4XX": { @@ -6026,29 +6134,46 @@ } } }, - "/user/payment/methods/{id}": { - "delete": { + "/org/service-accounts": { + "get": { "tags": [ - "payments", - "hidden" + "service-accounts" ], - "summary": "Delete a payment method for your user.", - "description": "This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.", - "operationId": "delete_payment_method_for_user", + "summary": "List service accounts for your org.", + "description": "This endpoint requires authentication by an org admin. It returns the service accounts for the organization.\nThe service accounts are returned in order of creation, with the most recently created service accounts first.", + "operationId": "list_service_accounts_for_org", "parameters": [ { - "in": "path", - "name": "id", - "description": "The ID of the payment method.", - "required": true, + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", "schema": { + "nullable": true, "type": "string" } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } } ], "responses": { - "204": { - "description": "successful deletion", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6082,37 +6207,47 @@ "type": "string" } } - } - }, + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAccountResultsPage" + } + } + } + }, "4XX": { "$ref": "#/components/responses/Error" }, "5XX": { "$ref": "#/components/responses/Error" } + }, + "x-dropshot-pagination": { + "required": [] } }, - "options": { + "post": { "tags": [ - "hidden" + "service-accounts" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_payment_methods_for_user", + "summary": "Create a new service account for your org.", + "description": "This endpoint requires authentication by an org admin. It creates a new service account for the organization.", + "operationId": "create_service_account_for_org", "parameters": [ { - "in": "path", - "name": "id", - "description": "The ID of the payment method.", - "required": true, + "in": "query", + "name": "label", + "description": "An optional label for the service account.", "schema": { + "nullable": true, "type": "string" } } ], "responses": { - "204": { - "description": "successful operation, no content", + "201": { + "description": "successful creation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6146,6 +6281,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAccount" + } + } } }, "4XX": { @@ -6155,17 +6297,14 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/payment/tax": { - "get": { + }, + "options": { "tags": [ - "payments", "hidden" ], - "summary": "Validate a customer's information is correct and valid for automatic tax.", - "description": "This endpoint requires authentication by any Zoo user. It will return an error if the customer's information is not valid for automatic tax. Otherwise, it will return an empty successful response.", - "operationId": "validate_customer_tax_information_for_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_create_service_account_for_org", "responses": { "204": { "description": "successful operation, no content", @@ -6213,19 +6352,19 @@ } } }, - "/user/session/{token}": { + "/org/service-accounts/{token}": { "get": { "tags": [ - "users" + "service-accounts" ], - "summary": "Get a session for your user.", - "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.", - "operationId": "get_session_for_user", + "summary": "Get an service account for your org.", + "description": "This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.", + "operationId": "get_service_account_for_org", "parameters": [ { "in": "path", "name": "token", - "description": "The API token.", + "description": "The service account.", "required": true, "schema": { "type": "string", @@ -6273,7 +6412,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Session" + "$ref": "#/components/schemas/ServiceAccount" } } } @@ -6285,57 +6424,29 @@ "$ref": "#/components/responses/Error" } } - } - }, - "/user/text-to-cad": { - "get": { + }, + "delete": { "tags": [ - "ai" + "service-accounts" ], - "summary": "List text-to-CAD models you've generated.", - "description": "This will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.", - "operationId": "list_text_to_cad_models_for_user", + "summary": "Delete an service account for your org.", + "description": "This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.\nThis endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.", + "operationId": "delete_service_account_for_org", "parameters": [ { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 - } - }, - { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", - "schema": { - "nullable": true, - "type": "string" - } - }, - { - "in": "query", - "name": "sort_by", - "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" - } - }, - { - "in": "query", - "name": "no_models", - "description": "If we should return the model file contents or just the metadata.", + "in": "path", + "name": "token", + "description": "The service account.", + "required": true, "schema": { - "nullable": true, - "type": "boolean" + "type": "string", + "format": "uuid" } } ], "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful deletion", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6369,13 +6480,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TextToCadResultsPage" - } - } } }, "4XX": { @@ -6384,25 +6488,20 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } - } - }, - "/user/text-to-cad/{id}": { - "get": { + }, + "options": { "tags": [ - "ai" + "hidden" ], - "summary": "Get a text-to-CAD response.", - "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.", - "operationId": "get_text_to_cad_model_for_user", + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_service_account_for_org", "parameters": [ { "in": "path", - "name": "id", - "description": "The id of the model to give feedback to.", + "name": "token", + "description": "The service account.", "required": true, "schema": { "type": "string", @@ -6411,8 +6510,8 @@ } ], "responses": { - "200": { - "description": "successful operation", + "204": { + "description": "successful operation, no content", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6446,13 +6545,6 @@ "type": "string" } } - }, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TextToCad" - } - } } }, "4XX": { @@ -6462,39 +6554,18 @@ "$ref": "#/components/responses/Error" } } - }, - "post": { + } + }, + "/ping": { + "get": { "tags": [ - "ai", - "beta" - ], - "summary": "Give feedback to a specific text-to-CAD response.", - "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model, in order to give feedback.", - "operationId": "create_text_to_cad_model_feedback", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The id of the model to give feedback to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "in": "query", - "name": "feedback", - "description": "The feedback.", - "required": true, - "schema": { - "$ref": "#/components/schemas/AiFeedback" - } - } + "meta" ], + "summary": "Return pong.", + "operationId": "ping", "responses": { - "204": { - "description": "resource updated", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6528,6 +6599,13 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Pong" + } + } } }, "4XX": { @@ -6537,29 +6615,20 @@ "$ref": "#/components/responses/Error" } } - }, - "options": { + } + }, + "/pricing/subscriptions": { + "get": { "tags": [ + "meta", "hidden" ], - "summary": "OPTIONS endpoint.", - "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", - "operationId": "options_create_text_to_cad_model_feedback", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The id of the model to give feedback to.", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - } - ], + "summary": "Get the pricing for our subscriptions.", + "description": "This is the ultimate source of truth for the pricing of our subscriptions.", + "operationId": "get_pricing_subscriptions", "responses": { - "204": { - "description": "successful operation, no content", + "200": { + "description": "successful operation", "headers": { "Access-Control-Allow-Credentials": { "description": "Access-Control-Allow-Credentials header.", @@ -6593,6 +6662,20 @@ "type": "string" } } + }, + "content": { + "application/json": { + "schema": { + "title": "Map_of_Array_of_ZooProductSubscription", + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ZooProductSubscription" + } + } + } + } } }, "4XX": { @@ -6604,41 +6687,41 @@ } } }, - "/users": { + "/unit/conversion/angle/{input_unit}/{output_unit}": { "get": { "tags": [ - "users", - "hidden" + "unit" ], - "summary": "List users.", - "description": "This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users", + "summary": "Convert angle units.", + "description": "Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_angle_unit_conversion", "parameters": [ { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 + "$ref": "#/components/schemas/UnitAngle" } }, { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, "schema": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/UnitAngle" } }, { "in": "query", - "name": "sort_by", + "name": "value", + "description": "The initial value.", + "required": true, "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "type": "number", + "format": "double" } } ], @@ -6682,7 +6765,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserResultsPage" + "$ref": "#/components/schemas/UnitAngleConversion" } } } @@ -6693,47 +6776,44 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } } }, - "/users-extended": { + "/unit/conversion/area/{input_unit}/{output_unit}": { "get": { "tags": [ - "users", - "hidden" + "unit" ], - "summary": "List users with extended information.", - "description": "This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", - "operationId": "list_users_extended", + "summary": "Convert area units.", + "description": "Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_area_unit_conversion", "parameters": [ { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 + "$ref": "#/components/schemas/UnitArea" } }, { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, "schema": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/UnitArea" } }, { "in": "query", - "name": "sort_by", + "name": "value", + "description": "The initial value.", + "required": true, "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "type": "number", + "format": "double" } } ], @@ -6777,7 +6857,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedUserResultsPage" + "$ref": "#/components/schemas/UnitAreaConversion" } } } @@ -6788,29 +6868,44 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } } }, - "/users-extended/{id}": { + "/unit/conversion/current/{input_unit}/{output_unit}": { "get": { "tags": [ - "users", - "hidden" + "unit" ], - "summary": "Get extended information about a user.", - "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any Zoo user, you must be a Zoo employee.", - "operationId": "get_user_extended", + "summary": "Convert current units.", + "description": "Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_current_unit_conversion", "parameters": [ { "in": "path", - "name": "id", - "description": "The user ID.", + "name": "input_unit", + "description": "The source format of the unit.", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/UnitCurrent" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitCurrent" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" } } ], @@ -6854,7 +6949,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ExtendedUser" + "$ref": "#/components/schemas/UnitCurrentConversion" } } } @@ -6868,23 +6963,41 @@ } } }, - "/users/{id}": { + "/unit/conversion/energy/{input_unit}/{output_unit}": { "get": { "tags": [ - "users", - "hidden" + "unit" ], - "summary": "Get a user.", - "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any Zoo user, you must be a Zoo employee.", - "operationId": "get_user", + "summary": "Convert energy units.", + "description": "Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_energy_unit_conversion", "parameters": [ { "in": "path", - "name": "id", - "description": "The user ID.", + "name": "input_unit", + "description": "The source format of the unit.", "required": true, "schema": { - "type": "string" + "$ref": "#/components/schemas/UnitEnergy" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitEnergy" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" } } ], @@ -6928,7 +7041,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/User" + "$ref": "#/components/schemas/UnitEnergyConversion" } } } @@ -6942,50 +7055,41 @@ } } }, - "/users/{id}/api-calls": { + "/unit/conversion/force/{input_unit}/{output_unit}": { "get": { "tags": [ - "api-calls", - "hidden" + "unit" ], - "summary": "List API calls for a user.", - "description": "This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", - "operationId": "list_api_calls_for_user", + "summary": "Convert force units.", + "description": "Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_force_unit_conversion", "parameters": [ { "in": "path", - "name": "id", - "description": "The user ID.", + "name": "input_unit", + "description": "The source format of the unit.", "required": true, "schema": { - "type": "string" - } - }, - { - "in": "query", - "name": "limit", - "description": "Maximum number of items returned by a single call", - "schema": { - "nullable": true, - "type": "integer", - "format": "uint32", - "minimum": 1 + "$ref": "#/components/schemas/UnitForce" } }, { - "in": "query", - "name": "page_token", - "description": "Token returned by previous call to retrieve the subsequent page", + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, "schema": { - "nullable": true, - "type": "string" + "$ref": "#/components/schemas/UnitForce" } }, { "in": "query", - "name": "sort_by", + "name": "value", + "description": "The initial value.", + "required": true, "schema": { - "$ref": "#/components/schemas/CreatedAtSortMode" + "type": "number", + "format": "double" } } ], @@ -7029,7 +7133,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + "$ref": "#/components/schemas/UnitForceConversion" } } } @@ -7040,86 +7144,3793 @@ "5XX": { "$ref": "#/components/responses/Error" } - }, - "x-dropshot-pagination": { - "required": [] } } }, - "/ws/executor/term": { - "get": { - "tags": [ - "executor", - "hidden" - ], - "summary": "Create a terminal.", - "description": "Attach to a docker container to create an interactive terminal.", - "operationId": "create_executor_term", - "responses": { - "default": { - "description": "", - "content": { - "*/*": { - "schema": {} - } - } - } - }, - "x-dropshot-websocket": {} - } - }, - "/ws/modeling/commands": { + "/unit/conversion/frequency/{input_unit}/{output_unit}": { "get": { "tags": [ - "modeling", - "beta" + "unit" ], - "summary": "Open a websocket which accepts modeling commands.", - "description": "Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.", - "operationId": "modeling_commands_ws", + "summary": "Convert frequency units.", + "description": "Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_frequency_unit_conversion", "parameters": [ { - "in": "query", - "name": "fps", - "description": "Frames per second of the video feed.", - "schema": { - "type": "integer", - "format": "uint32", - "minimum": 0 - } - }, - { - "in": "query", - "name": "unlocked_framerate", - "description": "If true, engine will render video frames as fast as it can.", + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, "schema": { - "type": "boolean" + "$ref": "#/components/schemas/UnitFrequency" } }, { - "in": "query", - "name": "video_res_height", - "description": "Height of the video feed. Must be a multiple of 4.", + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, "schema": { - "type": "integer", - "format": "uint32", - "minimum": 0 + "$ref": "#/components/schemas/UnitFrequency" } }, { "in": "query", - "name": "video_res_width", - "description": "Width of the video feed. Must be a multiple of 4.", + "name": "value", + "description": "The initial value.", + "required": true, "schema": { - "type": "integer", - "format": "uint32", - "minimum": 0 + "type": "number", + "format": "double" } - }, - { - "in": "query", - "name": "webrtc", - "description": "If true, will start a webrtc connection.", + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitFrequencyConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/length/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert length units.", + "description": "Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_length_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitLength" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitLength" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitLengthConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/mass/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert mass units.", + "description": "Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_mass_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMass" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitMass" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitMassConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/power/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert power units.", + "description": "Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_power_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPower" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPower" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitPowerConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/pressure/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert pressure units.", + "description": "Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_pressure_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPressure" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitPressure" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitPressureConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/temperature/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert temperature units.", + "description": "Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_temperature_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTemperature" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTemperature" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitTemperatureConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/torque/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert torque units.", + "description": "Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_torque_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTorque" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitTorque" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitTorqueConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/unit/conversion/volume/{input_unit}/{output_unit}": { + "get": { + "tags": [ + "unit" + ], + "summary": "Convert volume units.", + "description": "Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.", + "operationId": "get_volume_unit_conversion", + "parameters": [ + { + "in": "path", + "name": "input_unit", + "description": "The source format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVolume" + } + }, + { + "in": "path", + "name": "output_unit", + "description": "The output format of the unit.", + "required": true, + "schema": { + "$ref": "#/components/schemas/UnitVolume" + } + }, + { + "in": "query", + "name": "value", + "description": "The initial value.", + "required": true, + "schema": { + "type": "number", + "format": "double" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnitVolumeConversion" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user": { + "get": { + "tags": [ + "users" + ], + "summary": "Get your user.", + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users/me` endpoint.", + "operationId": "get_user_self", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "tags": [ + "users" + ], + "summary": "Update your user.", + "description": "This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.", + "operationId": "update_user_self", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateUser" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "tags": [ + "users" + ], + "summary": "Delete your user.", + "description": "This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.\nThis call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.", + "operationId": "delete_user_self", + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_user_self", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/api-calls": { + "get": { + "tags": [ + "api-calls" + ], + "summary": "List API calls for your user.", + "description": "This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "user_list_api_calls", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/user/api-calls/{id}": { + "get": { + "tags": [ + "api-calls" + ], + "summary": "Get an API call for a user.", + "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.", + "operationId": "get_api_call_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the API call.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPrice" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/api-tokens": { + "get": { + "tags": [ + "api-tokens" + ], + "summary": "List API tokens for your user.", + "description": "This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user.\nThe API tokens are returned in order of creation, with the most recently created API tokens first.", + "operationId": "list_api_tokens_for_user", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiTokenResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + }, + "post": { + "tags": [ + "api-tokens" + ], + "summary": "Create a new API token for your user.", + "description": "This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.", + "operationId": "create_api_token_for_user", + "parameters": [ + { + "in": "query", + "name": "label", + "description": "An optional label for the API token.", + "schema": { + "nullable": true, + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_create_api_token_for_user", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/api-tokens/{token}": { + "get": { + "tags": [ + "api-tokens" + ], + "summary": "Get an API token for your user.", + "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.", + "operationId": "get_api_token_for_user", + "parameters": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiToken" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "tags": [ + "api-tokens" + ], + "summary": "Delete an API token for your user.", + "description": "This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\nThis endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.", + "operationId": "delete_api_token_for_user", + "parameters": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_api_token_for_user", + "parameters": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/extended": { + "get": { + "tags": [ + "users" + ], + "summary": "Get extended information about your user.", + "description": "Get the user information for the authenticated user.\nAlternatively, you can also use the `/users-extended/me` endpoint.", + "operationId": "get_user_self_extended", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/oauth2/providers": { + "get": { + "tags": [ + "users" + ], + "summary": "Get the OAuth2 providers for your user.", + "description": "If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication.\nThis endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.", + "operationId": "get_oauth2_providers_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_AccountProvider", + "type": "array", + "items": { + "$ref": "#/components/schemas/AccountProvider" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/onboarding": { + "get": { + "tags": [ + "users", + "hidden" + ], + "summary": "Get your user's onboarding status.", + "description": "Checks key part of their api usage to determine their onboarding progress", + "operationId": "get_user_onboarding_self", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Onboarding" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/org": { + "get": { + "tags": [ + "orgs", + "users" + ], + "summary": "Get a user's org.", + "description": "This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.\nIf the user is not a member of an org, this endpoint will return a 404.", + "operationId": "get_user_org", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserOrgInfo" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment": { + "get": { + "tags": [ + "payments" + ], + "summary": "Get payment info about your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.", + "operationId": "get_payment_information_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "tags": [ + "payments" + ], + "summary": "Update payment info for your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.", + "operationId": "update_payment_information_for_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "tags": [ + "payments" + ], + "summary": "Create payment info for your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.", + "operationId": "create_payment_information_for_user", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingInfo" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Customer" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "tags": [ + "payments" + ], + "summary": "Delete payment info for your user.", + "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.", + "operationId": "delete_payment_information_for_user", + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_information_for_user", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/balance": { + "get": { + "tags": [ + "payments" + ], + "summary": "Get balance for your user.", + "description": "This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.", + "operationId": "get_payment_balance_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CustomerBalance" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/intent": { + "post": { + "tags": [ + "payments", + "hidden" + ], + "summary": "Create a payment intent for your user.", + "description": "This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.", + "operationId": "create_payment_intent_for_user", + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentIntent" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_intent_for_user", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/invoices": { + "get": { + "tags": [ + "payments" + ], + "summary": "List invoices for your user.", + "description": "This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.", + "operationId": "list_invoices_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_Invoice", + "type": "array", + "items": { + "$ref": "#/components/schemas/Invoice" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/methods": { + "get": { + "tags": [ + "payments" + ], + "summary": "List payment methods for your user.", + "description": "This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.", + "operationId": "list_payment_methods_for_user", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "title": "Array_of_PaymentMethod", + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentMethod" + } + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/methods/{id}": { + "delete": { + "tags": [ + "payments", + "hidden" + ], + "summary": "Delete a payment method for your user.", + "description": "This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.", + "operationId": "delete_payment_method_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "successful deletion", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_payment_methods_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The ID of the payment method.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/subscriptions": { + "get": { + "tags": [ + "payments" + ], + "summary": "Get the subscription for a user.", + "description": "This endpoint requires authentication by any Zoo user. It gets the subscription for the user.", + "operationId": "get_user_subscription", + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptions" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "put": { + "tags": [ + "payments" + ], + "summary": "Update the user's subscription.", + "description": "This endpoint requires authentication by any Zoo user. It updates the subscription for the user.", + "operationId": "update_user_subscription", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptions" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptions" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "tags": [ + "payments" + ], + "summary": "Create the subscription for a user.", + "description": "This endpoint requires authentication by any Zoo user. It creates the subscription for the user.", + "operationId": "create_user_subscription", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptions" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "successful creation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZooProductSubscriptions" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_user_subscription", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/payment/tax": { + "get": { + "tags": [ + "payments", + "hidden" + ], + "summary": "Validate a user's information is correct and valid for automatic tax.", + "description": "This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.", + "operationId": "validate_customer_tax_information_for_user", + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/session/{token}": { + "get": { + "tags": [ + "users" + ], + "summary": "Get a session for your user.", + "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.", + "operationId": "get_session_for_user", + "parameters": [ + { + "in": "path", + "name": "token", + "description": "The API token.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/user/text-to-cad": { + "get": { + "tags": [ + "ai" + ], + "summary": "List text-to-CAD models you've generated.", + "description": "This will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\nThe text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.", + "operationId": "list_text_to_cad_models_for_user", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + }, + { + "in": "query", + "name": "no_models", + "description": "If we should return the model file contents or just the metadata.", + "schema": { + "nullable": true, + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TextToCadResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/user/text-to-cad/{id}": { + "get": { + "tags": [ + "ai" + ], + "summary": "Get a text-to-CAD response.", + "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.", + "operationId": "get_text_to_cad_model_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The id of the model to give feedback to.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/TextToCad" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "tags": [ + "ai" + ], + "summary": "Give feedback to a specific text-to-CAD response.", + "description": "This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model, in order to give feedback.", + "operationId": "create_text_to_cad_model_feedback", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The id of the model to give feedback to.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + }, + { + "in": "query", + "name": "feedback", + "description": "The feedback.", + "required": true, + "schema": { + "$ref": "#/components/schemas/AiFeedback" + } + } + ], + "responses": { + "204": { + "description": "resource updated", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + }, + "options": { + "tags": [ + "hidden" + ], + "summary": "OPTIONS endpoint.", + "description": "This is necessary for some preflight requests, specifically POST, PUT, and DELETE.", + "operationId": "options_text_to_cad_model_feedback", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The id of the model to give feedback to.", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "204": { + "description": "successful operation, no content", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/users": { + "get": { + "tags": [ + "users", + "hidden" + ], + "summary": "List users.", + "description": "This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/users-extended": { + "get": { + "tags": [ + "users", + "hidden" + ], + "summary": "List users with extended information.", + "description": "This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.", + "operationId": "list_users_extended", + "parameters": [ + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUserResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/users-extended/{id}": { + "get": { + "tags": [ + "users", + "hidden" + ], + "summary": "Get extended information about a user.", + "description": "To get information about yourself, use `/users-extended/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user/extended` endpoint.\nTo get information about any Zoo user, you must be a Zoo employee.", + "operationId": "get_user_extended", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The user ID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExtendedUser" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/users/{id}": { + "get": { + "tags": [ + "users", + "hidden" + ], + "summary": "Get a user.", + "description": "To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\nAlternatively, to get information about the authenticated user, use `/user` endpoint.\nTo get information about any Zoo user, you must be a Zoo employee.", + "operationId": "get_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The user ID.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/User" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/users/{id}/api-calls": { + "get": { + "tags": [ + "api-calls", + "hidden" + ], + "summary": "List API calls for a user.", + "description": "This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\nAlternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\nIf the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.\nThe API calls are returned in order of creation, with the most recently created API calls first.", + "operationId": "list_api_calls_for_user", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The user ID.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "description": "Maximum number of items returned by a single call", + "schema": { + "nullable": true, + "type": "integer", + "format": "uint32", + "minimum": 1 + } + }, + { + "in": "query", + "name": "page_token", + "description": "Token returned by previous call to retrieve the subsequent page", + "schema": { + "nullable": true, + "type": "string" + } + }, + { + "in": "query", + "name": "sort_by", + "schema": { + "$ref": "#/components/schemas/CreatedAtSortMode" + } + } + ], + "responses": { + "200": { + "description": "successful operation", + "headers": { + "Access-Control-Allow-Credentials": { + "description": "Access-Control-Allow-Credentials header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Headers": { + "description": "Access-Control-Allow-Headers header. This is a comma-separated list of headers.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Methods": { + "description": "Access-Control-Allow-Methods header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + }, + "Access-Control-Allow-Origin": { + "description": "Access-Control-Allow-Origin header.", + "style": "simple", + "required": true, + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApiCallWithPriceResultsPage" + } + } + } + }, + "4XX": { + "$ref": "#/components/responses/Error" + }, + "5XX": { + "$ref": "#/components/responses/Error" + } + }, + "x-dropshot-pagination": { + "required": [] + } + } + }, + "/ws/executor/term": { + "get": { + "tags": [ + "executor", + "hidden" + ], + "summary": "Create a terminal.", + "description": "Attach to a docker container to create an interactive terminal.", + "operationId": "create_executor_term", + "responses": { + "default": { + "description": "", + "content": { + "*/*": { + "schema": {} + } + } + } + }, + "x-dropshot-websocket": {} + } + }, + "/ws/modeling/commands": { + "get": { + "tags": [ + "modeling", + "beta" + ], + "summary": "Open a websocket which accepts modeling commands.", + "description": "Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.", + "operationId": "modeling_commands_ws", + "parameters": [ + { + "in": "query", + "name": "fps", + "description": "Frames per second of the video feed.", + "schema": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + { + "in": "query", + "name": "unlocked_framerate", + "description": "If true, engine will render video frames as fast as it can.", + "schema": { + "type": "boolean" + } + }, + { + "in": "query", + "name": "video_res_height", + "description": "Height of the video feed. Must be a multiple of 4.", + "schema": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + { + "in": "query", + "name": "video_res_width", + "description": "Width of the video feed. Must be a multiple of 4.", + "schema": { + "type": "integer", + "format": "uint32", + "minimum": 0 + } + }, + { + "in": "query", + "name": "webrtc", + "description": "If true, will start a webrtc connection.", "schema": { "type": "boolean" } @@ -7153,22 +10964,17 @@ } }, "components": { - "responses": { - "Error": { - "description": "Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error" - } - } - } - } - }, "schemas": { "AccountProvider": { "description": "An account provider.", "oneOf": [ + { + "description": "The Apple account provider.", + "type": "string", + "enum": [ + "apple" + ] + }, { "description": "The Discord account provider.", "type": "string", @@ -7189,7 +10995,88 @@ "enum": [ "github" ] + }, + { + "description": "The Microsoft account provider.", + "type": "string", + "enum": [ + "microsoft" + ] + }, + { + "description": "The SAML account provider.", + "type": "string", + "enum": [ + "saml" + ] + }, + { + "description": "The Tencent QQ account provider.", + "type": "string", + "enum": [ + "tencent" + ] + } + ] + }, + "AddOrgMember": { + "description": "Data for adding a member to an org.", + "type": "object", + "properties": { + "email": { + "description": "The email address of the user to add to the org.", + "type": "string", + "format": "email" + }, + "role": { + "description": "The organization role to give the user.", + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ] + } + }, + "required": [ + "email", + "role" + ] + }, + "AddressDetails": { + "description": "Address details.", + "type": "object", + "properties": { + "city": { + "description": "The city component.", + "type": "string" + }, + "country": { + "description": "The country component. This is a two-letter ISO country code.", + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ] + }, + "state": { + "description": "The state component.", + "type": "string" + }, + "street1": { + "description": "The first street component.", + "type": "string" + }, + "street2": { + "description": "The second street component.", + "type": "string" + }, + "zip": { + "description": "The zip component.", + "type": "string" } + }, + "required": [ + "country" ] }, "AiFeedback": { @@ -7700,6 +11587,15 @@ "type": "integer", "format": "int32" }, + "org_id": { + "nullable": true, + "description": "The organization ID of the API call if it is billable through an organization.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, "origin": { "description": "The origin of the API call.", "type": "string" @@ -7845,6 +11741,11 @@ "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", "type": "boolean" }, + "label": { + "nullable": true, + "description": "An optional label for the API token.", + "type": "string" + }, "token": { "description": "The API token itself.", "allOf": [ @@ -8836,6 +12737,30 @@ } ] }, + "AuthCallback": { + "description": "The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating.", + "type": "object", + "properties": { + "code": { + "description": "The authorization code.", + "type": "string" + }, + "id_token": { + "nullable": true, + "description": "For Apple only, a JSON web token containing the user’s identity information.", + "type": "string" + }, + "state": { + "description": "The state that we had passed in through the user consent URL.", + "type": "string" + }, + "user": { + "nullable": true, + "description": "For Apple only, a JSON string containing the data requested in the scope property. The returned data is in the following format: `{ \"name\": { \"firstName\": string, \"lastName\": string }, \"email\": string }`", + "type": "string" + } + } + }, "Axis": { "description": "Co-ordinate axis specifier.\n\nSee [cglearn.eu] for background reading.\n\n[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1", "oneOf": [ @@ -8890,7 +12815,7 @@ "description": "The address of the customer.", "allOf": [ { - "$ref": "#/components/schemas/NewAddress" + "$ref": "#/components/schemas/AddressDetails" } ] }, @@ -9143,7 +13068,7 @@ } }, "CodeLanguage": { - "description": "The language code is written in.", + "description": "The language code is written in.\n\n
JSON schema\n\n```json { \"description\": \"The language code is written in.\", \"oneOf\": [ { \"description\": \"The `go` programming language.\", \"type\": \"string\", \"enum\": [ \"go\" ] }, { \"description\": \"The `python` programming language.\", \"type\": \"string\", \"enum\": [ \"python\" ] }, { \"description\": \"The `node` programming language.\", \"type\": \"string\", \"enum\": [ \"node\" ] } ] } ```
", "oneOf": [ { "description": "The `go` programming language.", @@ -9169,7 +13094,7 @@ ] }, "CodeOutput": { - "description": "Output of the code being executed.", + "description": "Output of the code being executed.\n\n
JSON schema\n\n```json { \"description\": \"Output of the code being executed.\", \"type\": \"object\", \"properties\": { \"output_files\": { \"description\": \"The contents of the files requested if they were passed.\", \"type\": \"array\", \"items\": { \"$ref\": \"#/components/schemas/OutputFile\" } }, \"stderr\": { \"description\": \"The stderr of the code.\", \"default\": \"\", \"type\": \"string\" }, \"stdout\": { \"description\": \"The stdout of the code.\", \"default\": \"\", \"type\": \"string\" } } } ```
", "type": "object", "properties": { "output_files": { @@ -9701,7 +13626,7 @@ "description": "The customer's address.", "allOf": [ { - "$ref": "#/components/schemas/NewAddress" + "$ref": "#/components/schemas/AddressDetails" } ] }, @@ -9765,7 +13690,7 @@ ] }, "CustomerBalance": { - "description": "A balance for a user.\n\nThis holds information about the financial balance for the user.", + "description": "A balance for a customer.\n\nThis holds information about the financial balance for the customer.", "type": "object", "properties": { "created_at": { @@ -9782,54 +13707,68 @@ } ] }, + "map_id": { + "description": "The mapping id of the user or org.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "modeling_app_subscription_type": { + "nullable": true, + "description": "The Modeling App Subscription type for the user.", + "allOf": [ + { + "$ref": "#/components/schemas/ModelingAppSubscriptionTierName" + } + ] + }, "monthly_credits_remaining": { "title": "double", - "description": "The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the user per month.", + "description": "The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the customer per month.", "type": "number", "format": "money-usd" }, "pre_pay_cash_remaining": { "title": "double", - "description": "The amount of pre-pay cash remaining in the balance. This number goes down as the user uses their pre-paid credits. The reason we track this amount is if a user ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a user has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.", + "description": "The amount of pre-pay cash remaining in the balance. This number goes down as the customer uses their pre-paid credits. The reason we track this amount is if a customer ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a customer has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.", "type": "number", "format": "money-usd" }, "pre_pay_credits_remaining": { "title": "double", - "description": "The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a user adds funds to their balance. This may be through a subscription or a one off payment.", + "description": "The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a customer adds funds to their balance. This may be through a subscription or a one off payment.", "type": "number", "format": "money-usd" }, + "subscription_id": { + "nullable": true, + "description": "The subscription ID for the user.", + "type": "string" + }, "total_due": { "title": "double", - "description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the user has on their account.", + "description": "This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the customer has on their account.", "type": "number", "format": "money-usd" }, "updated_at": { - "title": "DateTime", - "description": "The date and time the balance was last updated.", - "type": "string", - "format": "date-time" - }, - "user_id": { - "description": "The user ID the balance belongs to.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] + "title": "DateTime", + "description": "The date and time the balance was last updated.", + "type": "string", + "format": "date-time" } }, "required": [ "created_at", "id", + "map_id", "monthly_credits_remaining", "pre_pay_cash_remaining", "pre_pay_credits_remaining", "total_due", - "updated_at", - "user_id" + "updated_at" ] }, "Density": { @@ -9855,6 +13794,28 @@ "output_unit" ] }, + "DerEncodedKeyPair": { + "description": "The DER encoded key pair.", + "type": "object", + "properties": { + "private_key": { + "title": "String", + "description": "The request signing private key (pem file).", + "type": "string", + "format": "byte" + }, + "public_cert": { + "title": "String", + "description": "The request signing public certificate (pem file).", + "type": "string", + "format": "byte" + } + }, + "required": [ + "private_key", + "public_cert" + ] + }, "DeviceAccessTokenRequestForm": { "description": "The form for a device access token request.", "type": "object", @@ -10011,6 +13972,23 @@ "email" ] }, + "EntityCircularPattern": { + "description": "The response from the `EntityCircularPattern` command.", + "type": "object", + "properties": { + "entity_ids": { + "description": "The UUIDs of the entities that were created.", + "type": "array", + "items": { + "type": "string", + "format": "uuid" + } + } + }, + "required": [ + "entity_ids" + ] + }, "EntityGetAllChildUuids": { "description": "The response from the `EntityGetAllChildUuids` command.", "type": "object", @@ -10048,13 +14026,19 @@ "properties": { "max_distance": { "description": "The maximum distance between the input entities.", - "type": "number", - "format": "double" + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] }, "min_distance": { "description": "The minimum distance between the input entities.", - "type": "number", - "format": "double" + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] } }, "required": [ @@ -10286,6 +14270,11 @@ } ] }, + "can_train_on_data": { + "description": "If we can train on the user's data. If the user is a member of an organization, the organization's setting will override this.", + "default": false, + "type": "boolean" + }, "company": { "description": "The user's company.", "type": "string" @@ -10399,6 +14388,61 @@ "items" ] }, + "ExtrusionFaceCapType": { + "description": "Possible types of faces which can be extruded from a 3D solid.", + "oneOf": [ + { + "description": "Uncapped.", + "type": "string", + "enum": [ + "none" + ] + }, + { + "description": "Capped on top.", + "type": "string", + "enum": [ + "top" + ] + }, + { + "description": "Capped below.", + "type": "string", + "enum": [ + "bottom" + ] + } + ] + }, + "ExtrusionFaceInfo": { + "description": "Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)", + "type": "object", + "properties": { + "cap": { + "description": "Whether or not this extrusion face is a top/bottom cap face or not. Note that top/bottom cap faces will not have associated curve IDs.", + "allOf": [ + { + "$ref": "#/components/schemas/ExtrusionFaceCapType" + } + ] + }, + "curve_id": { + "nullable": true, + "description": "Path component (curve) UUID.", + "type": "string", + "format": "uuid" + }, + "face_id": { + "nullable": true, + "description": "Face uuid.", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "cap" + ] + }, "FailureWebSocketResponse": { "description": "Unsuccessful Websocket response.", "type": "object", @@ -11259,7 +15303,7 @@ ] }, "GlobalAxis": { - "description": "An enum that contains the three global axes.", + "description": "The global axes.", "oneOf": [ { "description": "The X axis", @@ -11374,6 +15418,55 @@ "urls" ] }, + "IdpMetadataSource": { + "description": "The source of an identity provider metadata descriptor.", + "oneOf": [ + { + "description": "A URL to the identity provider metadata descriptor.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "url" + ] + }, + "url": { + "title": "String", + "description": "The URL of the identity provider metadata descriptor.", + "type": "string", + "format": "uri" + } + }, + "required": [ + "type", + "url" + ] + }, + { + "description": "A base64 encoded XML document containing the identity provider metadata descriptor.", + "type": "object", + "properties": { + "data": { + "title": "String", + "description": "The base64 encoded XML document containing the identity provider metadata descriptor.", + "type": "string", + "format": "byte" + }, + "type": { + "type": "string", + "enum": [ + "base64_encoded_xml" + ] + } + }, + "required": [ + "data", + "type" + ] + } + ] + }, "ImageFormat": { "description": "Enum containing the variety of image formats snapshots may be exported to.", "oneOf": [ @@ -11834,6 +15927,102 @@ } ] }, + "IpAddrInfo": { + "description": "Information about an ip address. Represents geographical and network-related information.", + "type": "object", + "properties": { + "asn": { + "nullable": true, + "description": "Autonomous System Number.", + "type": "integer", + "format": "int64" + }, + "city": { + "nullable": true, + "description": "City name.", + "type": "string" + }, + "continent_code": { + "nullable": true, + "description": "Continent code (e.g., \"EU\" for Europe).", + "type": "string" + }, + "country": { + "nullable": true, + "description": "Country name.", + "type": "string" + }, + "country_code": { + "nullable": true, + "description": "Two-letter country code (e.g., \"NL\" for Netherlands).", + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ] + }, + "country_code3": { + "nullable": true, + "description": "Three-letter country code (e.g., \"NLD\" for Netherlands).", + "type": "string" + }, + "ip": { + "title": "String", + "description": "IP address of the user.", + "default": "", + "type": "string", + "format": "ip" + }, + "is_in_european_union": { + "nullable": true, + "description": "Flag indicating whether the country is in the European Union.", + "type": "boolean" + }, + "latitude": { + "nullable": true, + "description": "Geographic latitude.", + "type": "number", + "format": "double" + }, + "longitude": { + "nullable": true, + "description": "Geographic longitude.", + "type": "number", + "format": "double" + }, + "offset": { + "nullable": true, + "description": "Time offset in seconds from UTC.", + "type": "integer", + "format": "int64" + }, + "organization": { + "nullable": true, + "description": "Organization name (e.g., \"RIPE NCC\").", + "type": "string" + }, + "postal_code": { + "nullable": true, + "description": "Postal code.", + "type": "string" + }, + "region": { + "nullable": true, + "description": "Name of the region (e.g., \"North Holland\").", + "type": "string" + }, + "region_code": { + "nullable": true, + "description": "Region code (e.g., \"NH\" for North Holland).", + "type": "string" + }, + "timezone": { + "nullable": true, + "description": "Timezone (e.g., \"Europe/Amsterdam\").", + "type": "string" + } + } + }, "Jetstream": { "description": "Jetstream information.", "type": "object", @@ -11987,14 +16176,138 @@ "type": "integer", "format": "int64" }, - "store": { - "description": "The storage used by the Jetstream server.", - "default": 0, - "type": "integer", - "format": "int64" + "store": { + "description": "The storage used by the Jetstream server.", + "default": 0, + "type": "integer", + "format": "int64" + } + } + }, + "KclCodeCompletionParams": { + "description": "Extra params for the completions.", + "type": "object", + "properties": { + "language": { + "description": "The language of the code.", + "default": "", + "type": "string" + }, + "next_indent": { + "nullable": true, + "description": "The next indent of the code.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "prompt_tokens": { + "nullable": true, + "description": "The prompt tokens for the completions.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "suffix_tokens": { + "nullable": true, + "description": "The suffix tokens for the completions.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "trim_by_indentation": { + "description": "If we should trim by indentation.", + "default": false, + "type": "boolean" + } + } + }, + "KclCodeCompletionRequest": { + "description": "A request to generate KCL code completions.", + "type": "object", + "properties": { + "extra": { + "description": "Extra parameters for the completions.", + "default": { + "language": "", + "trim_by_indentation": false + }, + "allOf": [ + { + "$ref": "#/components/schemas/KclCodeCompletionParams" + } + ] + }, + "max_tokens": { + "nullable": true, + "description": "The maximum number of tokens that can be generated for the completions. The total length of input tokens and generated tokens is limited by the model’s context length.", + "type": "integer", + "format": "uint16", + "minimum": 0 + }, + "n": { + "nullable": true, + "description": "How many completion choices to generate for each input message.", + "type": "integer", + "format": "uint8", + "minimum": 0 + }, + "nwo": { + "nullable": true, + "description": "For GitHub copilot this is the `{org}/{repo}`. This does not do anything yet. But we wanted the same API as GitHub Copilot. It might be used in the future.", + "type": "string" + }, + "prompt": { + "description": "The prompt for the model.", + "default": "", + "type": "string" + }, + "stop": { + "description": "Up to 4 sequences where the API will stop generating further tokens.", + "type": "array", + "items": { + "type": "string" + } + }, + "stream": { + "description": "If set, partial message deltas will be sent, like in ChatGPT or OpenAPI. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.", + "default": false, + "type": "boolean" + }, + "suffix": { + "description": "The suffix for the model.", + "default": "", + "type": "string" + }, + "temperature": { + "nullable": true, + "description": "The temperature for the model.", + "type": "number", + "format": "float" + }, + "top_p": { + "nullable": true, + "description": "The top p for the model.", + "type": "number", + "format": "float" } } }, + "KclCodeCompletionResponse": { + "description": "A response with KCL code completions.", + "type": "object", + "properties": { + "completions": { + "description": "The completions.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "completions" + ] + }, "LeafNode": { "description": "Leaf node information.", "type": "object", @@ -12024,6 +16337,10 @@ } } }, + "LengthUnit": { + "type": "number", + "format": "double" + }, "Mass": { "description": "The mass response.", "type": "object", @@ -12193,6 +16510,114 @@ } ] }, + "ModelingAppSubscriptionTier": { + "description": "A subscription tier we offer for the modeling app.", + "type": "object", + "properties": { + "description": { + "description": "A description of the tier.", + "type": "string" + }, + "features": { + "description": "Features that are included in the subscription.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionTierFeature" + }, + "minItems": 0, + "maxItems": 15 + }, + "name": { + "description": "The name of the tier.", + "allOf": [ + { + "$ref": "#/components/schemas/ModelingAppSubscriptionTierName" + } + ] + }, + "pay_as_you_go_credits": { + "title": "double", + "description": "The amount of pay-as-you-go credits the individual or org gets outside the modeling app.", + "type": "number", + "format": "money-usd" + }, + "price": { + "description": "The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD.", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionTierPrice" + } + ] + }, + "support_tier": { + "description": "The support tier the subscription provides.", + "allOf": [ + { + "$ref": "#/components/schemas/SupportTier" + } + ] + }, + "training_data_behavior": { + "description": "The behavior of the users data (can it be used for training, etc).", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionTrainingDataBehavior" + } + ] + }, + "type": { + "description": "If the tier is offered for an individual or an org.", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionTierType" + } + ] + } + }, + "required": [ + "description", + "features", + "name", + "pay_as_you_go_credits", + "price", + "support_tier", + "training_data_behavior", + "type" + ] + }, + "ModelingAppSubscriptionTierName": { + "description": "An enum representing a subscription tier name.", + "oneOf": [ + { + "description": "The free tier.", + "type": "string", + "enum": [ + "free" + ] + }, + { + "description": "The pro tier.", + "type": "string", + "enum": [ + "pro" + ] + }, + { + "description": "The team tier.", + "type": "string", + "enum": [ + "team" + ] + }, + { + "description": "The enterprise tier.", + "type": "string", + "enum": [ + "enterprise" + ] + } + ] + }, "ModelingCmd": { "description": "Commands that the KittyCAD engine can execute.", "oneOf": [ @@ -12287,8 +16712,11 @@ }, "distance": { "description": "How far off the plane to extrude", - "type": "number", - "format": "double" + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] }, "target": { "description": "Which sketch to extrude. Must be a closed 2D solid.", @@ -12451,6 +16879,13 @@ } ] }, + "sequence": { + "nullable": true, + "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, "type": { "type": "string", "enum": [ @@ -12481,6 +16916,73 @@ "vantage" ] }, + { + "description": "Change all perspective camera settings", + "type": "object", + "properties": { + "center": { + "description": "What the camera is looking at. Center of the camera's field of vision", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ] + }, + "fov_y": { + "description": "The field of view angle in the y direction, in degrees.", + "type": "number", + "format": "float" + }, + "sequence": { + "nullable": true, + "description": "Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "type": { + "type": "string", + "enum": [ + "default_camera_perspective_settings" + ] + }, + "up": { + "description": "Which way is \"up\", from the camera's point of view.", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ] + }, + "vantage": { + "description": "Where the camera is positioned", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ] + }, + "z_far": { + "description": "The distance to the far clipping plane.", + "type": "number", + "format": "float" + }, + "z_near": { + "description": "The distance to the near clipping plane.", + "type": "number", + "format": "float" + } + }, + "required": [ + "center", + "fov_y", + "type", + "up", + "vantage", + "z_far", + "z_near" + ] + }, { "description": "Adjust zoom of the default camera.", "type": "object", @@ -12900,6 +17402,30 @@ "type" ] }, + { + "description": "Set the units of the scene. For all following commands, the units will be interpreted as the given units.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "set_scene_units" + ] + }, + "unit": { + "description": "Which units the scene uses.", + "allOf": [ + { + "$ref": "#/components/schemas/UnitLength" + } + ] + } + }, + "required": [ + "type", + "unit" + ] + }, { "description": "Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.", "type": "object", @@ -13151,7 +17677,7 @@ "properties": { "along_vector": { "nullable": true, - "description": "If given, ohnly faces parallel to this vector will be considered.", + "description": "If given, only faces parallel to this vector will be considered.", "allOf": [ { "$ref": "#/components/schemas/Point3d" @@ -13280,6 +17806,42 @@ "type" ] }, + { + "description": "Fillets the specified edge with the given radius.", + "type": "object", + "properties": { + "edge_id": { + "description": "Which edge you want to fillet.", + "type": "string", + "format": "uuid" + }, + "object_id": { + "description": "Which object is being filletted.", + "type": "string", + "format": "uuid" + }, + "radius": { + "description": "The radius of the fillet. Measured in length (using the same units that the current sketch uses). Must be positive (i.e. greater than zero).", + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "solid3d_fillet_edge" + ] + } + }, + "required": [ + "edge_id", + "object_id", + "radius", + "type" + ] + }, { "description": "Sends object to front or back.", "type": "object", @@ -13388,8 +17950,11 @@ }, "size": { "description": "What should the plane's span/extent? When rendered visually, this is both the width and height along X and Y axis respectively.", - "type": "number", - "format": "double" + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] }, "type": { "type": "string", @@ -14271,6 +18836,10 @@ "description": "Sketch on some entity (e.g. a plane, a face)", "type": "object", "properties": { + "adjust_camera": { + "description": "Should the camera move at all?", + "type": "boolean" + }, "animated": { "description": "Should we animate or snap for the camera transition?", "type": "boolean" @@ -14292,6 +18861,7 @@ } }, "required": [ + "adjust_camera", "animated", "entity_id", "ortho", @@ -14354,40 +18924,99 @@ "description": "Type of distance to be measured.", "allOf": [ { - "$ref": "#/components/schemas/DistanceType" + "$ref": "#/components/schemas/DistanceType" + } + ] + }, + "entity_id1": { + "description": "ID of the first entity being queried.", + "type": "string", + "format": "uuid" + }, + "entity_id2": { + "description": "ID of the second entity being queried.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "entity_get_distance" + ] + } + }, + "required": [ + "distance_type", + "entity_id1", + "entity_id2", + "type" + ] + }, + { + "description": "Duplicate the given entity, evenly spaced along the chosen axis.", + "type": "object", + "properties": { + "axis": { + "description": "Axis along which to make the copies", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" } ] }, - "entity_id1": { - "description": "ID of the first entity being queried.", + "entity_id": { + "description": "ID of the entity being copied.", "type": "string", "format": "uuid" }, - "entity_id2": { - "description": "ID of the second entity being queried.", - "type": "string", - "format": "uuid" + "num_repetitions": { + "description": "Number of repetitions to make.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "spacing": { + "description": "Spacing between repetitions.", + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] }, "type": { "type": "string", "enum": [ - "entity_get_distance" + "entity_linear_pattern" ] } }, "required": [ - "distance_type", - "entity_id1", - "entity_id2", + "axis", + "entity_id", + "num_repetitions", + "spacing", "type" ] }, { - "description": "Duplicate the given entity, evenly spaced along the chosen axis.", + "description": "Duplicate the given entity, evenly spaced around the specified axis, spanning the arc.", "type": "object", "properties": { + "arc_degrees": { + "description": "Arc angle (in degrees) to place repetitions along.", + "type": "number", + "format": "double" + }, "axis": { - "description": "Axis along which to make the copites", + "description": "Axis around which to make the copies", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ] + }, + "center": { + "description": "Point around which to make the copies", "allOf": [ { "$ref": "#/components/schemas/Point3d" @@ -14405,23 +19034,24 @@ "format": "uint32", "minimum": 0 }, - "spacing": { - "description": "Spacing between repetitions.", - "type": "number", - "format": "double" + "rotate_duplicates": { + "description": "Whether or not to rotate the objects as they are copied.", + "type": "boolean" }, "type": { "type": "string", "enum": [ - "entity_linear_pattern" + "entity_circular_pattern" ] } }, "required": [ + "arc_degrees", "axis", + "center", "entity_id", "num_repetitions", - "spacing", + "rotate_duplicates", "type" ] }, @@ -14510,6 +19140,33 @@ "required": [ "type" ] + }, + { + "description": "Get a concise description of all of an extrusion's faces", + "type": "object", + "properties": { + "edge_id": { + "description": "Any edge that lies on the extrusion base path.", + "type": "string", + "format": "uuid" + }, + "object_id": { + "description": "The Solid3d object whose extrusion is being queried.", + "type": "string", + "format": "uuid" + }, + "type": { + "type": "string", + "enum": [ + "solid3d_get_extrusion_face_info" + ] + } + }, + "required": [ + "edge_id", + "object_id", + "type" + ] } ] }, @@ -14570,52 +19227,6 @@ "entities_selected" ] }, - "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`.", - "type": "object", - "properties": { - "city": { - "description": "The city component.", - "type": "string" - }, - "country": { - "description": "The country component. This is a two-letter ISO country code.", - "allOf": [ - { - "$ref": "#/components/schemas/CountryCode" - } - ] - }, - "state": { - "description": "The state component.", - "type": "string" - }, - "street1": { - "description": "The first street component.", - "type": "string" - }, - "street2": { - "description": "The second street component.", - "type": "string" - }, - "user_id": { - "description": "The user ID that this address belongs to.", - "allOf": [ - { - "$ref": "#/components/schemas/Uuid" - } - ] - }, - "zip": { - "description": "The zip component.", - "type": "string" - } - }, - "required": [ - "country", - "user_id" - ] - }, "OAuth2ClientInfo": { "description": "Information about an OAuth 2.0 client.", "type": "object", @@ -14874,6 +19485,25 @@ "type" ] }, + { + "description": "The response from the ` ` command.", + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EntityCircularPattern" + }, + "type": { + "type": "string", + "enum": [ + "entity_circular_pattern" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "description": "The response from the ` ` command.", "type": "object", @@ -15254,6 +19884,25 @@ "type" ] }, + { + "description": "The response from the ` ` command.", + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/Solid3dGetExtrusionFaceInfo" + }, + "type": { + "type": "string", + "enum": [ + "solid3d_get_extrusion_face_info" + ] + } + }, + "required": [ + "data", + "type" + ] + }, { "description": "The response from the ` ` command.", "type": "object", @@ -15455,37 +20104,296 @@ "type" ] } - ] + ] + }, + "Onboarding": { + "description": "Onboarding details", + "type": "object", + "properties": { + "first_call_from_modeling_app_date": { + "nullable": true, + "title": "DateTime", + "description": "When the user first used the modeling app.", + "type": "string", + "format": "date-time" + }, + "first_call_from_text_to_cad_date": { + "nullable": true, + "title": "DateTime", + "description": "When the user first used text-to-CAD.", + "type": "string", + "format": "date-time" + }, + "first_token_date": { + "nullable": true, + "title": "DateTime", + "description": "When the user created their first token.", + "type": "string", + "format": "date-time" + } + } + }, + "Org": { + "description": "An organization.", + "type": "object", + "properties": { + "allow_users_in_domain_to_auto_join": { + "nullable": true, + "description": "If we should allow all future users who are created with email addresses from this domain to join the org.", + "type": "boolean" + }, + "billing_email": { + "description": "The billing email address of the org.", + "type": "string", + "format": "email" + }, + "billing_email_verified": { + "nullable": true, + "title": "DateTime", + "description": "The date and time the billing email address was verified.", + "type": "string", + "format": "date-time" + }, + "block": { + "nullable": true, + "description": "If the org should be blocked and the reason why.", + "allOf": [ + { + "$ref": "#/components/schemas/BlockReason" + } + ] + }, + "can_train_on_data": { + "description": "If we can train on the orgs's data. This value overrides any individual user's `can_train_on_data` value if they are a member of the org.", + "default": false, + "type": "boolean" + }, + "created_at": { + "title": "DateTime", + "description": "The date and time the org was created.", + "type": "string", + "format": "date-time" + }, + "domain": { + "nullable": true, + "description": "The org's domain.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the org.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "image": { + "nullable": true, + "title": "String", + "description": "The image for the org. This is a URL.", + "type": "string", + "format": "uri" + }, + "name": { + "description": "The name of the org.", + "type": "string" + }, + "phone": { + "title": "String", + "description": "The org's phone number.", + "default": "", + "type": "string", + "format": "phone" + }, + "stripe_id": { + "nullable": true, + "description": "The org's stripe id.", + "type": "string" + }, + "updated_at": { + "title": "DateTime", + "description": "The date and time the org was last updated.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at", + "id", + "updated_at" + ] + }, + "OrgDetails": { + "description": "The user-modifiable parts of an organization.", + "type": "object", + "properties": { + "allow_users_in_domain_to_auto_join": { + "nullable": true, + "description": "If we should allow all future users who are created with email addresses from this domain to join the org.", + "type": "boolean" + }, + "billing_email": { + "description": "The billing email address of the org.", + "type": "string", + "format": "email" + }, + "domain": { + "nullable": true, + "description": "The org's domain.", + "type": "string" + }, + "image": { + "nullable": true, + "title": "String", + "description": "The image for the org. This is a URL.", + "type": "string", + "format": "uri" + }, + "name": { + "description": "The name of the org.", + "type": "string" + }, + "phone": { + "title": "String", + "description": "The org's phone number.", + "default": "", + "type": "string", + "format": "phone" + } + } }, - "Onboarding": { - "description": "Onboarding details", + "OrgMember": { + "description": "A member of an organization.", "type": "object", "properties": { - "first_call_from_modeling_app_date": { - "nullable": true, + "company": { + "description": "The user's company.", + "type": "string" + }, + "created_at": { "title": "DateTime", - "description": "When the user first used the modeling app.", + "description": "The date and time the user was created.", "type": "string", "format": "date-time" }, - "first_call_from_text_to_cad_date": { + "discord": { + "description": "The user's Discord handle.", + "type": "string" + }, + "email": { + "description": "The email address of the user.", + "type": "string", + "format": "email" + }, + "email_verified": { "nullable": true, "title": "DateTime", - "description": "When the user first used text-to-CAD.", + "description": "The date and time the email address was verified.", "type": "string", "format": "date-time" }, - "first_token_date": { - "nullable": true, + "first_name": { + "description": "The user's first name.", + "type": "string" + }, + "github": { + "description": "The user's GitHub handle.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the user.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "image": { + "title": "String", + "description": "The image avatar for the user. This is a URL.", + "type": "string", + "format": "uri" + }, + "last_name": { + "description": "The user's last name.", + "type": "string" + }, + "name": { + "description": "The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.", + "type": "string" + }, + "phone": { + "title": "String", + "description": "The user's phone number.", + "default": "", + "type": "string", + "format": "phone" + }, + "role": { + "description": "The user's role in the org.", + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ] + }, + "updated_at": { "title": "DateTime", - "description": "When the user created their first token.", + "description": "The date and time the user was last updated.", "type": "string", "format": "date-time" } - } + }, + "required": [ + "created_at", + "id", + "image", + "role", + "updated_at" + ] + }, + "OrgMemberResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgMember" + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, + "OrgRole": { + "description": "The roles for users in an organization.", + "oneOf": [ + { + "description": "Admins can do anything in the org.", + "type": "string", + "enum": [ + "admin" + ] + }, + { + "description": "Members of an org can not modify an org, but they belong in the org.", + "type": "string", + "enum": [ + "member" + ] + } + ] }, "OutputFile": { - "description": "Output file contents.", + "description": "Output file contents.\n\n
JSON schema\n\n```json { \"description\": \"Output file contents.\", \"type\": \"object\", \"properties\": { \"contents\": { \"description\": \"The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.\", \"type\": \"string\" }, \"name\": { \"description\": \"The name of the file.\", \"default\": \"\", \"type\": \"string\" } } } ```
", "type": "object", "properties": { "contents": { @@ -15857,8 +20765,11 @@ }, "radius": { "description": "Radius of the circle", - "type": "number", - "format": "double" + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] }, "relative": { "description": "Whether or not this arc is a relative offset", @@ -15949,8 +20860,11 @@ }, "radius": { "description": "Radius of the arc. Not to be confused with Raiders of the Lost Ark.", - "type": "number", - "format": "double" + "allOf": [ + { + "$ref": "#/components/schemas/LengthUnit" + } + ] }, "type": { "type": "string", @@ -16153,6 +21067,39 @@ "z_near" ] }, + "PlanInterval": { + "description": "A plan's interval.", + "oneOf": [ + { + "description": "Day.", + "type": "string", + "enum": [ + "day" + ] + }, + { + "description": "Month.", + "type": "string", + "enum": [ + "month" + ] + }, + { + "description": "Week.", + "type": "string", + "enum": [ + "week" + ] + }, + { + "description": "Year.", + "type": "string", + "enum": [ + "year" + ] + } + ] + }, "PlaneIntersectAndProject": { "description": "Corresponding coordinates of given window coordinates, intersected on given plane.", "type": "object", @@ -16199,12 +21146,10 @@ "type": "object", "properties": { "x": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/LengthUnit" }, "y": { - "type": "number", - "format": "double" + "$ref": "#/components/schemas/LengthUnit" } }, "required": [ @@ -16311,56 +21256,172 @@ "unspecified" ] }, - { - "description": "indicates that a description MUST be treated as an SDP offer.", + { + "description": "indicates that a description MUST be treated as an SDP offer.", + "type": "string", + "enum": [ + "offer" + ] + }, + { + "description": "indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer.", + "type": "string", + "enum": [ + "pranswer" + ] + }, + { + "description": "indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer.", + "type": "string", + "enum": [ + "answer" + ] + }, + { + "description": "indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation.", + "type": "string", + "enum": [ + "rollback" + ] + } + ] + }, + "RtcSessionDescription": { + "description": "SessionDescription is used to expose local and remote session descriptions.", + "type": "object", + "properties": { + "sdp": { + "description": "SDP string.", + "type": "string" + }, + "type": { + "description": "SDP type.", + "allOf": [ + { + "$ref": "#/components/schemas/RtcSdpType" + } + ] + } + }, + "required": [ + "sdp", + "type" + ] + }, + "SamlIdentityProvider": { + "description": "A SAML identity provider.", + "type": "object", + "properties": { + "acs_url": { + "title": "String", + "description": "The ACS (Assertion Consumer Service) url.", + "type": "string", + "format": "uri" + }, + "created_at": { + "title": "DateTime", + "description": "The date and time the SAML identity provider was created.", + "type": "string", + "format": "date-time" + }, + "id": { + "description": "The unique identifier for the SAML identity provider.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "idp_entity_id": { + "description": "The entity ID of the SAML identity provider.", + "type": "string" + }, + "idp_metadata_document_string": { + "description": "The metadata document as a string.", + "type": "string" + }, + "org_id": { + "description": "The organization ID the SAML identity provider belongs to.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "private_key": { + "nullable": true, + "title": "String", + "description": "The private key for the SAML identity provider. This is the PEM corresponding to the X509 pair.", + "type": "string", + "format": "byte" + }, + "public_cert": { + "nullable": true, + "title": "String", + "description": "The public certificate for the SAML identity provider. This is the PEM corresponding to the X509 pair.", "type": "string", - "enum": [ - "offer" - ] + "format": "byte" }, - { - "description": "indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer.", + "slo_url": { + "title": "String", + "description": "The SLO (Single Logout) url.", "type": "string", - "enum": [ - "pranswer" - ] + "format": "uri" }, - { - "description": "indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer.", + "technical_contact_email": { + "description": "The technical contact email address for the SAML identity provider.", "type": "string", - "enum": [ - "answer" - ] + "format": "email" }, - { - "description": "indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation.", + "updated_at": { + "title": "DateTime", + "description": "The date and time the SAML identity provider was last updated.", "type": "string", - "enum": [ - "rollback" - ] + "format": "date-time" } + }, + "required": [ + "acs_url", + "created_at", + "id", + "org_id", + "slo_url", + "updated_at" ] }, - "RtcSessionDescription": { - "description": "SessionDescription is used to expose local and remote session descriptions.", + "SamlIdentityProviderCreate": { + "description": "Parameters for creating a SAML identity provider.", "type": "object", "properties": { - "sdp": { - "description": "SDP string.", + "idp_entity_id": { + "description": "The entity ID of the SAML identity provider.", "type": "string" }, - "type": { - "description": "SDP type.", + "idp_metadata_source": { + "description": "The source of an identity provider metadata descriptor.", "allOf": [ { - "$ref": "#/components/schemas/RtcSdpType" + "$ref": "#/components/schemas/IdpMetadataSource" + } + ] + }, + "signing_keypair": { + "nullable": true, + "description": "The request signing key pair.", + "allOf": [ + { + "$ref": "#/components/schemas/DerEncodedKeyPair" } ] + }, + "technical_contact_email": { + "description": "The technical contact email address for the SAML identity provider.", + "type": "string", + "format": "email" } }, "required": [ - "sdp", - "type" + "idp_metadata_source" ] }, "SceneSelectionType": { @@ -16535,8 +21596,88 @@ } ] }, + "ServiceAccount": { + "description": "A service account.\n\nThese are used to authenticate orgs with Bearer authentication.\n\nThis works just like an API token, but it is tied to an organization versus an individual user.", + "type": "object", + "properties": { + "created_at": { + "title": "DateTime", + "description": "The date and time the API token was created.", + "type": "string", + "format": "date-time" + }, + "id": { + "description": "The unique identifier for the API token.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "is_valid": { + "description": "If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token.", + "type": "boolean" + }, + "label": { + "nullable": true, + "description": "An optional label for the API token.", + "type": "string" + }, + "org_id": { + "description": "The ID of the organization that owns the API token.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "token": { + "description": "The API token itself.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "updated_at": { + "title": "DateTime", + "description": "The date and time the API token was last updated.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at", + "id", + "is_valid", + "org_id", + "token", + "updated_at" + ] + }, + "ServiceAccountResultsPage": { + "description": "A single page of results", + "type": "object", + "properties": { + "items": { + "description": "list of items on this page of results", + "type": "array", + "items": { + "$ref": "#/components/schemas/ServiceAccount" + } + }, + "next_page": { + "nullable": true, + "description": "token used to fetch the next page of results (if any)", + "type": "string" + } + }, + "required": [ + "items" + ] + }, "Session": { - "description": "An authentication session.\n\nFor our UIs, these are automatically created by Next.js.", + "description": "An authentication session.", "type": "object", "properties": { "created_at": { @@ -16625,59 +21766,217 @@ "edges" ] }, - "Solid3dGetNextAdjacentEdge": { - "description": "The response from the `Solid3dGetNextAdjacentEdge` command.", - "type": "object", - "properties": { - "edge": { - "nullable": true, - "description": "The UUID of the edge.", + "Solid3dGetExtrusionFaceInfo": { + "description": "Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)", + "type": "object", + "properties": { + "faces": { + "description": "Details of each face.", + "type": "array", + "items": { + "$ref": "#/components/schemas/ExtrusionFaceInfo" + } + } + }, + "required": [ + "faces" + ] + }, + "Solid3dGetNextAdjacentEdge": { + "description": "The response from the `Solid3dGetNextAdjacentEdge` command.", + "type": "object", + "properties": { + "edge": { + "nullable": true, + "description": "The UUID of the edge.", + "type": "string", + "format": "uuid" + } + } + }, + "Solid3dGetOppositeEdge": { + "description": "The response from the `Solid3dGetOppositeEdge` command.", + "type": "object", + "properties": { + "edge": { + "description": "The UUID of the edge.", + "type": "string", + "format": "uuid" + } + }, + "required": [ + "edge" + ] + }, + "Solid3dGetPrevAdjacentEdge": { + "description": "The response from the `Solid3dGetPrevAdjacentEdge` command.", + "type": "object", + "properties": { + "edge": { + "nullable": true, + "description": "The UUID of the edge.", + "type": "string", + "format": "uuid" + } + } + }, + "StlStorage": { + "description": "Export storage.", + "oneOf": [ + { + "description": "Plaintext encoding.", + "type": "string", + "enum": [ + "ascii" + ] + }, + { + "description": "Binary STL encoding.\n\nThis is the default setting.", + "type": "string", + "enum": [ + "binary" + ] + } + ] + }, + "SubscriptionTierFeature": { + "description": "A subscription tier feature.", + "type": "object", + "properties": { + "info": { + "description": "Information about the feature.", + "type": "string", + "minLength": 1, + "maxLength": 80 + } + }, + "required": [ + "info" + ] + }, + "SubscriptionTierPrice": { + "description": "The price for a subscription tier.", + "oneOf": [ + { + "description": "A flat price that we publicly list.", + "type": "object", + "properties": { + "interval": { + "description": "The interval the price is charged.", + "allOf": [ + { + "$ref": "#/components/schemas/PlanInterval" + } + ] + }, + "price": { + "title": "double", + "description": "The price.", + "type": "number", + "format": "money-usd" + }, + "type": { + "type": "string", + "enum": [ + "flat" + ] + } + }, + "required": [ + "interval", + "price", + "type" + ] + }, + { + "description": "A per user price that we publicly list.", + "type": "object", + "properties": { + "interval": { + "description": "The interval the price is charged.", + "allOf": [ + { + "$ref": "#/components/schemas/PlanInterval" + } + ] + }, + "price": { + "title": "double", + "description": "The price.", + "type": "number", + "format": "money-usd" + }, + "type": { + "type": "string", + "enum": [ + "per_user" + ] + } + }, + "required": [ + "interval", + "price", + "type" + ] + }, + { + "description": "Enterprise: The price is not listed and the user needs to contact sales.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "enterprise" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "SubscriptionTierType": { + "description": "An enum representing a subscription tier type.", + "oneOf": [ + { + "description": "A subscription tier that can be applied to individuals only.", "type": "string", - "format": "uuid" - } - } - }, - "Solid3dGetOppositeEdge": { - "description": "The response from the `Solid3dGetOppositeEdge` command.", - "type": "object", - "properties": { - "edge": { - "description": "The UUID of the edge.", + "enum": [ + "individual" + ] + }, + { + "description": "An subscription tier that can be applied to organizations only.", "type": "string", - "format": "uuid" + "enum": [ + "organization" + ] } - }, - "required": [ - "edge" ] }, - "Solid3dGetPrevAdjacentEdge": { - "description": "The response from the `Solid3dGetPrevAdjacentEdge` command.", - "type": "object", - "properties": { - "edge": { - "nullable": true, - "description": "The UUID of the edge.", - "type": "string", - "format": "uuid" - } - } - }, - "StlStorage": { - "description": "Export storage.", + "SubscriptionTrainingDataBehavior": { + "description": "An enum representing a subscription training data behavior.", "oneOf": [ { - "description": "Plaintext encoding.", + "description": "The data is always used for training and cannot be turned off.", "type": "string", "enum": [ - "ascii" + "always" ] }, { - "description": "Binary STL encoding.\n\nThis is the default setting.", + "description": "The data is used for training by default, but can be turned off.", "type": "string", "enum": [ - "binary" + "default_on" + ] + }, + { + "description": "The data is not used for training by default, but can be turned on.", + "type": "string", + "enum": [ + "default_off" ] } ] @@ -16710,6 +22009,39 @@ "success" ] }, + "SupportTier": { + "description": "The support tier the subscription provides.", + "oneOf": [ + { + "description": "Community support.", + "type": "string", + "enum": [ + "community" + ] + }, + { + "description": "Standard support.", + "type": "string", + "enum": [ + "standard" + ] + }, + { + "description": "Premium support.", + "type": "string", + "enum": [ + "premium" + ] + }, + { + "description": "Priority support.", + "type": "string", + "enum": [ + "priority" + ] + } + ] + }, "SurfaceArea": { "description": "The surface area response.", "type": "object", @@ -18782,6 +24114,23 @@ "user_id" ] }, + "UpdateMemberToOrgBody": { + "description": "Data for updating a member of an org.", + "type": "object", + "properties": { + "role": { + "description": "The organization role to give the user.", + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ] + } + }, + "required": [ + "role" + ] + }, "UpdateUser": { "description": "The user-modifiable parts of a User.", "type": "object", @@ -18802,6 +24151,12 @@ "description": "The user's GitHub handle.", "type": "string" }, + "image": { + "title": "String", + "description": "The image URL for the user. NOTE: If the user uses an OAuth2 provider, this will be overwritten by the provider's image URL when the user logs in next.", + "type": "string", + "format": "uri" + }, "last_name": { "description": "The user's last name.", "type": "string" @@ -18813,7 +24168,10 @@ "type": "string", "format": "phone" } - } + }, + "required": [ + "image" + ] }, "User": { "description": "A user.", @@ -18828,6 +24186,11 @@ } ] }, + "can_train_on_data": { + "description": "If we can train on the user's data. If the user is a member of an organization, the organization's setting will override this.", + "default": false, + "type": "boolean" + }, "company": { "description": "The user's company.", "type": "string" @@ -18905,6 +24268,100 @@ "updated_at" ] }, + "UserOrgInfo": { + "description": "A user's information about an org, including their role.", + "type": "object", + "properties": { + "allow_users_in_domain_to_auto_join": { + "nullable": true, + "description": "If we should allow all future users who are created with email addresses from this domain to join the org.", + "type": "boolean" + }, + "billing_email": { + "description": "The billing email address of the org.", + "type": "string", + "format": "email" + }, + "billing_email_verified": { + "nullable": true, + "title": "DateTime", + "description": "The date and time the billing email address was verified.", + "type": "string", + "format": "date-time" + }, + "block": { + "nullable": true, + "description": "If the org should be blocked and the reason why.", + "allOf": [ + { + "$ref": "#/components/schemas/BlockReason" + } + ] + }, + "created_at": { + "title": "DateTime", + "description": "The date and time the org was created.", + "type": "string", + "format": "date-time" + }, + "domain": { + "nullable": true, + "description": "The org's domain.", + "type": "string" + }, + "id": { + "description": "The unique identifier for the org.", + "allOf": [ + { + "$ref": "#/components/schemas/Uuid" + } + ] + }, + "image": { + "nullable": true, + "title": "String", + "description": "The image for the org. This is a URL.", + "type": "string", + "format": "uri" + }, + "name": { + "description": "The name of the org.", + "type": "string" + }, + "phone": { + "title": "String", + "description": "The org's phone number.", + "default": "", + "type": "string", + "format": "phone" + }, + "role": { + "description": "The user's role in the org.", + "allOf": [ + { + "$ref": "#/components/schemas/OrgRole" + } + ] + }, + "stripe_id": { + "nullable": true, + "description": "The org's stripe id.", + "type": "string" + }, + "updated_at": { + "title": "DateTime", + "description": "The date and time the org was last updated.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at", + "id", + "role", + "updated_at" + ] + }, "UserResultsPage": { "description": "A single page of results", "type": "object", @@ -18931,8 +24388,8 @@ "type": "string", "format": "uuid" }, - "VerificationToken": { - "description": "A verification token for a user.\n\nThis is typically used to verify a user's email address.", + "VerificationTokenResponse": { + "description": "A verification token response.", "type": "object", "properties": { "created_at": { @@ -18959,6 +24416,13 @@ "description": "The identifier for the user. This is typically the user's email address since that is what we are verifying.", "type": "string" }, + "saml_redirect_url": { + "nullable": true, + "title": "String", + "description": "The URL to redirect to if the user requires SAML authentication.", + "type": "string", + "format": "uri" + }, "updated_at": { "title": "DateTime", "description": "The date and time the verification token was last updated.", @@ -19164,6 +24628,115 @@ ] } ] + }, + "ZooProductSubscription": { + "description": "A Zoo product subscription.", + "oneOf": [ + { + "description": "A subscription to the modeling app.", + "type": "object", + "properties": { + "description": { + "description": "A description of the tier.", + "type": "string" + }, + "features": { + "description": "Features that are included in the subscription.", + "type": "array", + "items": { + "$ref": "#/components/schemas/SubscriptionTierFeature" + }, + "minItems": 0, + "maxItems": 15 + }, + "name": { + "description": "The name of the tier.", + "allOf": [ + { + "$ref": "#/components/schemas/ModelingAppSubscriptionTierName" + } + ] + }, + "pay_as_you_go_credits": { + "title": "double", + "description": "The amount of pay-as-you-go credits the individual or org gets outside the modeling app.", + "type": "number", + "format": "money-usd" + }, + "price": { + "description": "The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD.", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionTierPrice" + } + ] + }, + "support_tier": { + "description": "The support tier the subscription provides.", + "allOf": [ + { + "$ref": "#/components/schemas/SupportTier" + } + ] + }, + "training_data_behavior": { + "description": "The behavior of the users data (can it be used for training, etc).", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionTrainingDataBehavior" + } + ] + }, + "type": { + "description": "If the tier is offered for an individual or an org.", + "allOf": [ + { + "$ref": "#/components/schemas/SubscriptionTierType" + } + ] + } + }, + "required": [ + "description", + "features", + "name", + "pay_as_you_go_credits", + "price", + "support_tier", + "training_data_behavior", + "type" + ] + } + ] + }, + "ZooProductSubscriptions": { + "description": "A struct of Zoo product subscriptions.", + "type": "object", + "properties": { + "modeling_app": { + "description": "The subscriptions.", + "allOf": [ + { + "$ref": "#/components/schemas/ModelingAppSubscriptionTier" + } + ] + } + }, + "required": [ + "modeling_app" + ] + } + }, + "responses": { + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } } } }, @@ -19252,6 +24825,13 @@ "url": "https://zoo.dev/docs/api/oauth2" } }, + { + "name": "orgs", + "description": "An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs.", + "externalDocs": { + "url": "https://zoo.dev/docs/api/orgs" + } + }, { "name": "payments", "description": "Operations around payments and billing.", @@ -19259,6 +24839,13 @@ "url": "https://zoo.dev/docs/api/payments" } }, + { + "name": "service-accounts", + "description": "Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won't stop working when an individual leaves the company.", + "externalDocs": { + "url": "https://zoo.dev/docs/api/service-accounts" + } + }, { "name": "unit", "description": "Unit conversion operations.", @@ -19274,4 +24861,4 @@ } } ] -} \ No newline at end of file +} diff --git a/src/cmd_kcl.rs b/src/cmd_kcl.rs index 38d09ca7..41bbc1e9 100644 --- a/src/cmd_kcl.rs +++ b/src/cmd_kcl.rs @@ -66,7 +66,7 @@ pub struct CmdKclExport { output_format: kittycad::types::FileExportFormat, /// The source unit to use for the kcl file. - #[clap(long, short = 's', value_enum)] + #[clap(long, short = 's', value_enum, default_value = "mm")] pub src_unit: kittycad::types::UnitLength, /// Command output format. @@ -101,6 +101,7 @@ impl crate::cmd::Command for CmdKclExport { format: get_output_format(&self.output_format, self.src_unit.clone()), source_unit: self.src_unit.clone(), }, + self.src_unit.clone(), ) .await?; @@ -142,6 +143,10 @@ pub struct CmdKclSnapshot { #[clap(short = 't', long = "output-format", value_enum)] output_format: Option, + /// The source unit to use for the kcl file. + #[clap(long, short = 's', value_enum, default_value = "mm")] + pub src_unit: kittycad::types::UnitLength, + /// Command output format. #[clap(long, short, value_enum)] pub format: Option, @@ -179,6 +184,7 @@ impl crate::cmd::Command for CmdKclSnapshot { "", input, kittycad::types::ModelingCmd::TakeSnapshot { format: output_format }, + self.src_unit.clone(), ) .await?; @@ -216,6 +222,10 @@ pub struct CmdKclView { #[clap(name = "input", required = true)] pub input: std::path::PathBuf, + /// The source unit to use for the kcl file. + #[clap(long, short = 's', value_enum, default_value = "mm")] + pub src_unit: kittycad::types::UnitLength, + /// Command output format. #[clap(long, short, value_enum)] pub format: Option, @@ -242,6 +252,7 @@ impl crate::cmd::Command for CmdKclView { kittycad::types::ModelingCmd::TakeSnapshot { format: kittycad::types::ImageFormat::Png, }, + self.src_unit.clone(), ) .await?; @@ -365,7 +376,7 @@ pub struct CmdKclVolume { pub format: Option, /// The source unit to use for the kcl file. - #[clap(long, short = 's', value_enum)] + #[clap(long, short = 's', value_enum, default_value = "mm")] pub src_unit: kittycad::types::UnitLength, /// Output unit. @@ -392,6 +403,7 @@ impl crate::cmd::Command for CmdKclVolume { output_unit: self.output_unit.clone(), source_unit: self.src_unit.clone(), }, + self.src_unit.clone(), ) .await?; @@ -434,7 +446,7 @@ pub struct CmdKclMass { material_density_unit: kittycad::types::UnitDensity, /// The source unit to use for the kcl file. - #[clap(long, short = 's', value_enum)] + #[clap(long, short = 's', value_enum, default_value = "mm")] pub src_unit: kittycad::types::UnitLength, /// Output format. @@ -471,6 +483,7 @@ impl crate::cmd::Command for CmdKclMass { output_unit: self.output_unit.clone(), source_unit: self.src_unit.clone(), }, + self.src_unit.clone(), ) .await?; @@ -505,7 +518,7 @@ pub struct CmdKclCenterOfMass { pub input: std::path::PathBuf, /// The source unit to use for the kcl file. - #[clap(long, short = 's', value_enum)] + #[clap(long, short = 's', value_enum, default_value = "mm")] pub src_unit: kittycad::types::UnitLength, /// Output format. @@ -536,6 +549,7 @@ impl crate::cmd::Command for CmdKclCenterOfMass { output_unit: self.output_unit.clone(), source_unit: self.src_unit.clone(), }, + self.src_unit.clone(), ) .await?; @@ -570,7 +584,7 @@ pub struct CmdKclDensity { pub input: std::path::PathBuf, /// The source unit to use for the kcl file. - #[clap(long, short = 's', value_enum)] + #[clap(long, short = 's', value_enum, default_value = "mm")] pub src_unit: kittycad::types::UnitLength, /// Material mass. @@ -615,6 +629,7 @@ impl crate::cmd::Command for CmdKclDensity { output_unit: self.output_unit.clone(), source_unit: self.src_unit.clone(), }, + self.src_unit.clone(), ) .await?; @@ -649,7 +664,7 @@ pub struct CmdKclSurfaceArea { pub input: std::path::PathBuf, /// The source unit to use for the kcl file. - #[clap(long, short = 's', value_enum)] + #[clap(long, short = 's', value_enum, default_value = "mm")] pub src_unit: kittycad::types::UnitLength, /// Output format. @@ -680,6 +695,7 @@ impl crate::cmd::Command for CmdKclSurfaceArea { output_unit: self.output_unit.clone(), source_unit: self.src_unit.clone(), }, + self.src_unit.clone(), ) .await?; diff --git a/src/cmd_user.rs b/src/cmd_user.rs index 444e222f..607ca5e1 100644 --- a/src/cmd_user.rs +++ b/src/cmd_user.rs @@ -96,6 +96,7 @@ mod test { new_last_name: Default::default(), new_first_name: Default::default(), new_github: Default::default(), + new_image: Default::default(), }), stdin: "".to_string(), want_out: "".to_string(), diff --git a/src/context.rs b/src/context.rs index e276de62..5b07bd62 100644 --- a/src/context.rs +++ b/src/context.rs @@ -122,6 +122,7 @@ impl Context<'_> { hostname: &str, code: &str, cmd: kittycad::types::ModelingCmd, + units: kittycad::types::UnitLength, ) -> Result { let client = self.api_client(hostname)?; let ws = client @@ -136,11 +137,12 @@ impl Context<'_> { .map_err(|err| kcl_error_fmt::KclError::new(code.to_string(), err))?; let mut mem: kcl_lib::executor::ProgramMemory = Default::default(); let engine = kcl_lib::engine::EngineConnection::new(ws).await?; - let planes = kcl_lib::executor::DefaultPlanes::new(&engine).await?; + let fs = kcl_lib::fs::FileManager::new(); let ctx = kcl_lib::executor::ExecutorContext { engine: engine.clone(), stdlib: Arc::new(kcl_lib::std::StdLib::default()), - planes, + fs, + units, }; let _ = kcl_lib::executor::execute(program, &mut mem, kcl_lib::executor::BodyType::Root, &ctx) .await