diff --git a/kittycad.rs.patch.json b/kittycad.rs.patch.json index ff83d4fc..c746b7f6 100644 --- a/kittycad.rs.patch.json +++ b/kittycad.rs.patch.json @@ -27,7 +27,7 @@ "op": "add", "path": "/paths/~1_meta~1info/get/x-rust", "value": { - "example": "/// Get the metadata about our currently running server.\n/// \n/// This includes information on any of our other distributed systems it is connected to.\n/// You must be a KittyCAD employee to perform this request.\nasync fn example_meta_get_metadata() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Metadata = client.meta().get_metadata().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get the metadata about our currently running server.\n/// \n/// This includes information on any of our other distributed systems it is connected to.\n/// You must be a Zoo employee to perform this request.\nasync fn example_meta_get_metadata() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Metadata = client.meta().get_metadata().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.get_metadata" } }, @@ -35,7 +35,7 @@ "op": "add", "path": "/paths/~1ai-prompts/get/x-rust", "value": { - "example": "/// List all AI prompts.\n/// \n/// For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\n/// This endpoint requires authentication by a KittyCAD employee.\n/// The AI prompts are returned in order of creation, with the most recently created AI prompts first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_ai_list_prompts() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AiPromptResultsPage = client\n .ai()\n .list_prompts(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_prompts_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_prompts_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List all AI prompts.\n/// \n/// For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\n/// This endpoint requires authentication by a Zoo employee.\n/// The AI prompts are returned in order of creation, with the most recently created AI prompts first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_ai_list_prompts() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AiPromptResultsPage = client\n .ai()\n .list_prompts(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_prompts_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_prompts_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.list_prompts" } }, @@ -43,7 +43,7 @@ "op": "add", "path": "/paths/~1ai-prompts~1{id}/get/x-rust", "value": { - "example": "/// Get an AI prompt.\n/// \n/// This endpoint requires authentication by a KittyCAD employee.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The id of the model to give feedback to. (required)\nuse std::str::FromStr;\nasync fn example_ai_get_prompt() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AiPrompt = client\n .ai()\n .get_prompt(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get an AI prompt.\n/// \n/// This endpoint requires authentication by a Zoo employee.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The id of the model to give feedback to. (required)\nuse std::str::FromStr;\nasync fn example_ai_get_prompt() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AiPrompt = client\n .ai()\n .get_prompt(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.get_prompt" } }, @@ -59,7 +59,7 @@ "op": "add", "path": "/paths/~1api-call-metrics/get/x-rust", "value": { - "example": "/// Get API call metrics.\n/// \n/// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n/// \n/// **Parameters:**\n/// \n/// - `group_by: crate::types::ApiCallQueryGroupBy`: What field to group the metrics by. (required)\nasync fn example_api_calls_get_metrics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client\n .api_calls()\n .get_metrics(kittycad::types::ApiCallQueryGroupBy::IpAddress)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get API call metrics.\n/// \n/// This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.\n/// \n/// **Parameters:**\n/// \n/// - `group_by: crate::types::ApiCallQueryGroupBy`: What field to group the metrics by. (required)\nasync fn example_api_calls_get_metrics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client\n .api_calls()\n .get_metrics(kittycad::types::ApiCallQueryGroupBy::IpAddress)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_metrics" } }, @@ -67,7 +67,7 @@ "op": "add", "path": "/paths/~1api-calls/get/x-rust", "value": { - "example": "/// List API calls.\n/// \n/// This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API calls.\n/// \n/// This endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list" } }, @@ -75,7 +75,7 @@ "op": "add", "path": "/paths/~1api-calls~1{id}/get/x-rust", "value": { - "example": "/// Get details of an API call.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n/// If the user is not authenticated to view the specified API call, then it is not returned.\n/// Only KittyCAD employees can view API calls for other users.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The ID of the API call. (required)\nuse std::str::FromStr;\nasync fn example_api_calls_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get details of an API call.\n/// \n/// This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.\n/// If the user is not authenticated to view the specified API call, then it is not returned.\n/// Only Zoo employees can view API calls for other users.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The ID of the API call. (required)\nuse std::str::FromStr;\nasync fn example_api_calls_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get" } }, @@ -83,7 +83,7 @@ "op": "add", "path": "/paths/~1apps~1github~1callback/get/x-rust", "value": { - "example": "/// Listen for callbacks to GitHub app authentication.\n/// \n/// This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\n/// The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.\nasync fn example_apps_github_callback() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .apps()\n .github_callback(&serde_json::Value::String(\"some-string\".to_string()))\n .await?;\n Ok(())\n}\n", + "example": "/// Listen for callbacks to GitHub app authentication.\n/// \n/// This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\n/// The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.\nasync fn example_apps_github_callback() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .apps()\n .github_callback(&serde_json::Value::String(\"some-string\".to_string()))\n .await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/apps/struct.Apps.html#method.github_callback" } }, @@ -91,7 +91,7 @@ "op": "add", "path": "/paths/~1apps~1github~1consent/get/x-rust", "value": { - "example": "/// Get the consent URL for GitHub app authentication.\n/// \n/// This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\n/// The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.\nasync fn example_apps_github_consent() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AppClientInfo = client.apps().github_consent().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get the consent URL for GitHub app authentication.\n/// \n/// This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\n/// The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.\nasync fn example_apps_github_consent() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AppClientInfo = client.apps().github_consent().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/apps/struct.Apps.html#method.github_consent" } }, @@ -107,7 +107,7 @@ "op": "add", "path": "/paths/~1async~1operations/get/x-rust", "value": { - "example": "/// List async operations.\n/// \n/// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n/// This endpoint requires authentication by a KittyCAD employee.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\n/// - `status: Option`: The status to filter by.\nasync fn example_api_calls_list_async_operations() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AsyncApiCallResultsPage = client\n .api_calls()\n .list_async_operations(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List async operations.\n/// \n/// For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\n/// This endpoint requires authentication by a Zoo employee.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\n/// - `status: Option`: The status to filter by.\nasync fn example_api_calls_list_async_operations() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AsyncApiCallResultsPage = client\n .api_calls()\n .list_async_operations(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_async_operations" } }, @@ -115,7 +115,7 @@ "op": "add", "path": "/paths/~1async~1operations~1{id}/get/x-rust", "value": { - "example": "/// Get an async operation.\n/// \n/// Get the status and output of an async operation.\n/// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\n/// If the user is not authenticated to view the specified async operation, then it is not returned.\n/// Only KittyCAD employees with the proper access can view async operations for other users.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The ID of the async operation. (required)\nasync fn example_api_calls_get_async_operation() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AsyncApiCallOutput = client\n .api_calls()\n .get_async_operation(\"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get an async operation.\n/// \n/// Get the status and output of an async operation.\n/// This endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user.\n/// If the user is not authenticated to view the specified async operation, then it is not returned.\n/// Only Zoo employees with the proper access can view async operations for other users.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The ID of the async operation. (required)\nasync fn example_api_calls_get_async_operation() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::AsyncApiCallOutput = client\n .api_calls()\n .get_async_operation(\"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_async_operation" } }, @@ -163,7 +163,7 @@ "op": "add", "path": "/paths/~1file~1execute~1{lang}/post/x-rust", "value": { - "example": "/// Execute a KittyCAD program in a specific language.\n/// \n/// **Parameters:**\n/// \n/// - `lang: crate::types::CodeLanguage`: The language of the code. (required)\n/// - `output: Option`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\nasync fn example_executor_create_file_execution() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CodeOutput = client\n .executor()\n .create_file_execution(\n kittycad::types::CodeLanguage::Node,\n Some(\"some-string\".to_string()),\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Execute a Zoo program in a specific language.\n/// \n/// **Parameters:**\n/// \n/// - `lang: crate::types::CodeLanguage`: The language of the code. (required)\n/// - `output: Option`: The output file we want to get the contents for (the paths are relative to where in litterbox it is being run). You can denote more than one file with a comma separated list of string paths.\nasync fn example_executor_create_file_execution() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CodeOutput = client\n .executor()\n .create_file_execution(\n kittycad::types::CodeLanguage::Node,\n Some(\"some-string\".to_string()),\n &bytes::Bytes::from(\"some-string\"),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/executor/struct.Executor.html#method.create_file_execution" } }, @@ -195,7 +195,7 @@ "op": "add", "path": "/paths/~1internal~1discord~1api-token~1{discord_id}/get/x-rust", "value": { - "example": "/// Get an API token for a user by their discord id.\n/// \n/// This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their KittyCAD Account via oauth2 for this to work.\n/// You must be a KittyCAD employee to use this endpoint.\n/// \n/// **Parameters:**\n/// \n/// - `discord_id: &'astr`: The user's discord ID. (required)\nasync fn example_meta_internal_get_api_token_for_discord_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client\n .meta()\n .internal_get_api_token_for_discord_user(\"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get an API token for a user by their discord id.\n/// \n/// This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\n/// You must be a Zoo employee to use this endpoint.\n/// \n/// **Parameters:**\n/// \n/// - `discord_id: &'astr`: The user's discord ID. (required)\nasync fn example_meta_internal_get_api_token_for_discord_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client\n .meta()\n .internal_get_api_token_for_discord_user(\"some-string\")\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/meta/struct.Meta.html#method.internal_get_api_token_for_discord_user" } }, @@ -379,7 +379,7 @@ "op": "add", "path": "/paths/~1user/delete/x-rust", "value": { - "example": "/// Delete your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database.\n/// This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.\nasync fn example_users_delete_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client.users().delete_self().await?;\n Ok(())\n}\n", + "example": "/// Delete your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.\n/// This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.\nasync fn example_users_delete_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client.users().delete_self().await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.delete_self" } }, @@ -395,7 +395,7 @@ "op": "add", "path": "/paths/~1user/put/x-rust", "value": { - "example": "/// Update your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\nuse std::str::FromStr;\nasync fn example_users_update_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client\n .users()\n .update_self(&kittycad::types::UpdateUser {\n company: Some(\"some-string\".to_string()),\n discord: Some(\"some-string\".to_string()),\n first_name: Some(\"some-string\".to_string()),\n github: Some(\"some-string\".to_string()),\n last_name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Update your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\nuse std::str::FromStr;\nasync fn example_users_update_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client\n .users()\n .update_self(&kittycad::types::UpdateUser {\n company: Some(\"some-string\".to_string()),\n discord: Some(\"some-string\".to_string()),\n first_name: Some(\"some-string\".to_string()),\n github: Some(\"some-string\".to_string()),\n last_name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.update_self" } }, @@ -403,7 +403,7 @@ "op": "add", "path": "/paths/~1user~1api-calls/get/x-rust", "value": { - "example": "/// List API calls for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user.\n/// The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_user_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .user_list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API calls for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.\n/// The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_user_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .user_list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.user_list" } }, @@ -411,7 +411,7 @@ "op": "add", "path": "/paths/~1user~1api-calls~1{id}/get/x-rust", "value": { - "example": "/// Get an API call for a user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The ID of the API call. (required)\nuse std::str::FromStr;\nasync fn example_api_calls_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get an API call for a user.\n/// \n/// This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The ID of the API call. (required)\nuse std::str::FromStr;\nasync fn example_api_calls_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.get_for_user" } }, @@ -419,7 +419,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens/get/x-rust", "value": { - "example": "/// List API tokens for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user.\n/// The API tokens are returned in order of creation, with the most recently created API tokens first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_tokens_list_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiTokenResultsPage = client\n .api_tokens()\n .list_for_user(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API tokens for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user.\n/// The API tokens are returned in order of creation, with the most recently created API tokens first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_tokens_list_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiTokenResultsPage = client\n .api_tokens()\n .list_for_user(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.list_for_user" } }, @@ -427,7 +427,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens/post/x-rust", "value": { - "example": "/// Create a new API token for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\nasync fn example_api_tokens_create_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client.api_tokens().create_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Create a new API token for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.\nasync fn example_api_tokens_create_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client.api_tokens().create_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.create_for_user" } }, @@ -435,7 +435,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens~1{token}/delete/x-rust", "value": { - "example": "/// Delete an API token for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user.\n/// This 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.\n/// \n/// **Parameters:**\n/// \n/// - `token: uuid::Uuid`: The API token. (required)\nuse std::str::FromStr;\nasync fn example_api_tokens_delete_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .api_tokens()\n .delete_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n Ok(())\n}\n", + "example": "/// Delete an API token for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.\n/// This 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.\n/// \n/// **Parameters:**\n/// \n/// - `token: uuid::Uuid`: The API token. (required)\nuse std::str::FromStr;\nasync fn example_api_tokens_delete_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .api_tokens()\n .delete_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.delete_for_user" } }, @@ -443,7 +443,7 @@ "op": "add", "path": "/paths/~1user~1api-tokens~1{token}/get/x-rust", "value": { - "example": "/// Get an API token for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n/// \n/// **Parameters:**\n/// \n/// - `token: uuid::Uuid`: The API token. (required)\nuse std::str::FromStr;\nasync fn example_api_tokens_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client\n .api_tokens()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get an API token for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n/// \n/// **Parameters:**\n/// \n/// - `token: uuid::Uuid`: The API token. (required)\nuse std::str::FromStr;\nasync fn example_api_tokens_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client\n .api_tokens()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_tokens/struct.ApiTokens.html#method.get_for_user" } }, @@ -455,14 +455,6 @@ "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_self_extended" } }, - { - "op": "add", - "path": "/paths/~1user~1front-hash/get/x-rust", - "value": { - "example": "/// Get your user's front verification hash.\n/// \n/// This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser\nasync fn example_users_get_front_hash_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: String = client.users().get_front_hash_self().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", - "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_front_hash_self" - } - }, { "op": "add", "path": "/paths/~1user~1onboarding/get/x-rust", @@ -475,7 +467,7 @@ "op": "add", "path": "/paths/~1user~1payment/delete/x-rust", "value": { - "example": "/// Delete payment info for your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user.\nasync fn example_payments_delete_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client.payments().delete_information_for_user().await?;\n Ok(())\n}\n", + "example": "/// Delete payment info for your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.\nasync fn example_payments_delete_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client.payments().delete_information_for_user().await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.delete_information_for_user" } }, @@ -483,7 +475,7 @@ "op": "add", "path": "/paths/~1user~1payment/get/x-rust", "value": { - "example": "/// Get payment info about your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user.\nasync fn example_payments_get_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = client.payments().get_information_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get payment info about your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.\nasync fn example_payments_get_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = client.payments().get_information_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.get_information_for_user" } }, @@ -491,7 +483,7 @@ "op": "add", "path": "/paths/~1user~1payment/post/x-rust", "value": { - "example": "/// Create payment info for your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user.\nuse std::str::FromStr;\nasync fn example_payments_create_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = client\n .payments()\n .create_information_for_user(&kittycad::types::BillingInfo {\n address: Some(kittycad::types::NewAddress {\n city: Some(\"some-string\".to_string()),\n country: \"some-string\".to_string(),\n state: Some(\"some-string\".to_string()),\n street_1: Some(\"some-string\".to_string()),\n street_2: Some(\"some-string\".to_string()),\n user_id: uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n zip: Some(\"some-string\".to_string()),\n }),\n name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Create payment info for your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.\nuse std::str::FromStr;\nasync fn example_payments_create_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = client\n .payments()\n .create_information_for_user(&kittycad::types::BillingInfo {\n address: Some(kittycad::types::NewAddress {\n city: Some(\"some-string\".to_string()),\n country: \"some-string\".to_string(),\n state: Some(\"some-string\".to_string()),\n street_1: Some(\"some-string\".to_string()),\n street_2: Some(\"some-string\".to_string()),\n user_id: uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n zip: Some(\"some-string\".to_string()),\n }),\n name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.create_information_for_user" } }, @@ -499,7 +491,7 @@ "op": "add", "path": "/paths/~1user~1payment/put/x-rust", "value": { - "example": "/// Update payment info for your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user.\nuse std::str::FromStr;\nasync fn example_payments_update_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = client\n .payments()\n .update_information_for_user(&kittycad::types::BillingInfo {\n address: Some(kittycad::types::NewAddress {\n city: Some(\"some-string\".to_string()),\n country: \"some-string\".to_string(),\n state: Some(\"some-string\".to_string()),\n street_1: Some(\"some-string\".to_string()),\n street_2: Some(\"some-string\".to_string()),\n user_id: uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n zip: Some(\"some-string\".to_string()),\n }),\n name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Update payment info for your user.\n/// \n/// This includes billing address, phone, and name.\n/// This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.\nuse std::str::FromStr;\nasync fn example_payments_update_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = client\n .payments()\n .update_information_for_user(&kittycad::types::BillingInfo {\n address: Some(kittycad::types::NewAddress {\n city: Some(\"some-string\".to_string()),\n country: \"some-string\".to_string(),\n state: Some(\"some-string\".to_string()),\n street_1: Some(\"some-string\".to_string()),\n street_2: Some(\"some-string\".to_string()),\n user_id: uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n zip: Some(\"some-string\".to_string()),\n }),\n name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.update_information_for_user" } }, @@ -507,7 +499,7 @@ "op": "add", "path": "/paths/~1user~1payment~1balance/get/x-rust", "value": { - "example": "/// Get balance for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.\nasync fn example_payments_get_balance_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CustomerBalance = client.payments().get_balance_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get balance for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.\nasync fn example_payments_get_balance_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CustomerBalance = client.payments().get_balance_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.get_balance_for_user" } }, @@ -515,7 +507,7 @@ "op": "add", "path": "/paths/~1user~1payment~1intent/post/x-rust", "value": { - "example": "/// Create a payment intent for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\nasync fn example_payments_create_intent_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PaymentIntent = client.payments().create_intent_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Create a payment intent for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.\nasync fn example_payments_create_intent_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PaymentIntent = client.payments().create_intent_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.create_intent_for_user" } }, @@ -523,7 +515,7 @@ "op": "add", "path": "/paths/~1user~1payment~1invoices/get/x-rust", "value": { - "example": "/// List invoices for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\nasync fn example_payments_list_invoices_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client.payments().list_invoices_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// List invoices for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.\nasync fn example_payments_list_invoices_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client.payments().list_invoices_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.list_invoices_for_user" } }, @@ -531,7 +523,7 @@ "op": "add", "path": "/paths/~1user~1payment~1methods/get/x-rust", "value": { - "example": "/// List payment methods for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\nasync fn example_payments_list_methods_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec =\n client.payments().list_methods_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// List payment methods for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.\nasync fn example_payments_list_methods_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec =\n client.payments().list_methods_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.list_methods_for_user" } }, @@ -539,7 +531,7 @@ "op": "add", "path": "/paths/~1user~1payment~1methods~1{id}/delete/x-rust", "value": { - "example": "/// Delete a payment method for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The ID of the payment method. (required)\nasync fn example_payments_delete_method_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .payments()\n .delete_method_for_user(\"some-string\")\n .await?;\n Ok(())\n}\n", + "example": "/// Delete a payment method for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The ID of the payment method. (required)\nasync fn example_payments_delete_method_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .payments()\n .delete_method_for_user(\"some-string\")\n .await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.delete_method_for_user" } }, @@ -547,7 +539,7 @@ "op": "add", "path": "/paths/~1user~1payment~1tax/get/x-rust", "value": { - "example": "/// Validate a customer's information is correct and valid for automatic tax.\n/// \n/// This endpoint requires authentication by any KittyCAD 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.\nasync fn example_payments_validate_customer_tax_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .payments()\n .validate_customer_tax_information_for_user()\n .await?;\n Ok(())\n}\n", + "example": "/// Validate a customer's information is correct and valid for automatic tax.\n/// \n/// 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.\nasync fn example_payments_validate_customer_tax_information_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .payments()\n .validate_customer_tax_information_for_user()\n .await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/payments/struct.Payments.html#method.validate_customer_tax_information_for_user" } }, @@ -555,7 +547,7 @@ "op": "add", "path": "/paths/~1user~1session~1{token}/get/x-rust", "value": { - "example": "/// Get a session for your user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n/// \n/// **Parameters:**\n/// \n/// - `token: uuid::Uuid`: The API token. (required)\nuse std::str::FromStr;\nasync fn example_users_get_session_for() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Session = client\n .users()\n .get_session_for(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get a session for your user.\n/// \n/// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n/// \n/// **Parameters:**\n/// \n/// - `token: uuid::Uuid`: The API token. (required)\nuse std::str::FromStr;\nasync fn example_users_get_session_for() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::Session = client\n .users()\n .get_session_for(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_session_for" } }, @@ -563,7 +555,7 @@ "op": "add", "path": "/paths/~1user~1text-to-cad/get/x-rust", "value": { - "example": "/// List text-to-CAD models you've generated.\n/// \n/// This will always return the STEP file contents as well as the format the user originally requested.\n/// This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user.\n/// The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_ai_list_text_to_cad_models_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::TextToCadResultsPage = client\n .ai()\n .list_text_to_cad_models_for_user(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_text_to_cad_models_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_text_to_cad_models_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List text-to-CAD models you've generated.\n/// \n/// This will always return the STEP file contents as well as the format the user originally requested.\n/// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user.\n/// The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_ai_list_text_to_cad_models_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::TextToCadResultsPage = client\n .ai()\n .list_text_to_cad_models_for_user(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_text_to_cad_models_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_text_to_cad_models_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.list_text_to_cad_models_for_user" } }, @@ -571,7 +563,7 @@ "op": "add", "path": "/paths/~1user~1text-to-cad~1{id}/get/x-rust", "value": { - "example": "/// Get a text-to-CAD response.\n/// \n/// This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The id of the model to give feedback to. (required)\nuse std::str::FromStr;\nasync fn example_ai_get_text_to_cad_model_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::TextToCad = client\n .ai()\n .get_text_to_cad_model_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get a text-to-CAD response.\n/// \n/// This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model.\n/// \n/// **Parameters:**\n/// \n/// - `id: uuid::Uuid`: The id of the model to give feedback to. (required)\nuse std::str::FromStr;\nasync fn example_ai_get_text_to_cad_model_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::TextToCad = client\n .ai()\n .get_text_to_cad_model_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.get_text_to_cad_model_for_user" } }, @@ -579,7 +571,7 @@ "op": "add", "path": "/paths/~1user~1text-to-cad~1{id}/post/x-rust", "value": { - "example": "/// Give feedback to a specific text-to-CAD response.\n/// \n/// This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.\n/// \n/// **Parameters:**\n/// \n/// - `feedback: crate::types::AiFeedback`: The feedback. (required)\n/// - `id: uuid::Uuid`: The id of the model to give feedback to. (required)\nuse std::str::FromStr;\nasync fn example_ai_create_text_to_cad_model_feedback() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .ai()\n .create_text_to_cad_model_feedback(\n kittycad::types::AiFeedback::ThumbsDown,\n uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n )\n .await?;\n Ok(())\n}\n", + "example": "/// Give feedback to a specific text-to-CAD response.\n/// \n/// 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.\n/// \n/// **Parameters:**\n/// \n/// - `feedback: crate::types::AiFeedback`: The feedback. (required)\n/// - `id: uuid::Uuid`: The id of the model to give feedback to. (required)\nuse std::str::FromStr;\nasync fn example_ai_create_text_to_cad_model_feedback() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .ai()\n .create_text_to_cad_model_feedback(\n kittycad::types::AiFeedback::ThumbsDown,\n uuid::Uuid::from_str(\"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\")?,\n )\n .await?;\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/ai/struct.Ai.html#method.create_text_to_cad_model_feedback" } }, @@ -587,7 +579,7 @@ "op": "add", "path": "/paths/~1users/get/x-rust", "value": { - "example": "/// List users.\n/// \n/// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_users_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UserResultsPage = client\n .users()\n .list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List users.\n/// \n/// This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_users_list() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::UserResultsPage = client\n .users()\n .list(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.list" } }, @@ -595,7 +587,7 @@ "op": "add", "path": "/paths/~1users-extended/get/x-rust", "value": { - "example": "/// List users with extended information.\n/// \n/// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_users_list_extended() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ExtendedUserResultsPage = client\n .users()\n .list_extended(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List users with extended information.\n/// \n/// This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.\n/// \n/// **Parameters:**\n/// \n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_users_list_extended() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ExtendedUserResultsPage = client\n .users()\n .list_extended(\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.list_extended" } }, @@ -603,7 +595,7 @@ "op": "add", "path": "/paths/~1users-extended~1{id}/get/x-rust", "value": { - "example": "/// Get extended information about a user.\n/// \n/// 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.\n/// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n/// To get information about any KittyCAD user, you must be a KittyCAD employee.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The user ID. (required)\nasync fn example_users_get_extended() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ExtendedUser = client.users().get_extended(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get extended information about a user.\n/// \n/// 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.\n/// Alternatively, to get information about the authenticated user, use `/user/extended` endpoint.\n/// To get information about any Zoo user, you must be a Zoo employee.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The user ID. (required)\nasync fn example_users_get_extended() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ExtendedUser = client.users().get_extended(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get_extended" } }, @@ -611,7 +603,7 @@ "op": "add", "path": "/paths/~1users~1{id}/get/x-rust", "value": { - "example": "/// Get a user.\n/// \n/// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n/// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n/// To get information about any KittyCAD user, you must be a KittyCAD employee.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The user ID. (required)\nasync fn example_users_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client.users().get(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", + "example": "/// Get a user.\n/// \n/// To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.\n/// Alternatively, to get information about the authenticated user, use `/user` endpoint.\n/// To get information about any Zoo user, you must be a Zoo employee.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The user ID. (required)\nasync fn example_users_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client.users().get(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/users/struct.Users.html#method.get" } }, @@ -619,7 +611,7 @@ "op": "add", "path": "/paths/~1users~1{id}~1api-calls/get/x-rust", "value": { - "example": "/// List API calls for a user.\n/// \n/// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user if \"me\" is passed as the user id.\n/// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n/// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id.\n/// The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The user ID. (required)\n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_list_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .list_for_user(\n \"some-string\",\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_for_user_stream(\n \"some-string\",\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", + "example": "/// List API calls for a user.\n/// \n/// 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.\n/// Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.\n/// If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.\n/// The API calls are returned in order of creation, with the most recently created API calls first.\n/// \n/// **Parameters:**\n/// \n/// - `id: &'astr`: The user ID. (required)\n/// - `limit: Option`: Maximum number of items returned by a single call\n/// - `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n/// - `sort_by: Option`\nasync fn example_api_calls_list_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPriceResultsPage = client\n .api_calls()\n .list_for_user(\n \"some-string\",\n Some(4 as u32),\n Some(\"some-string\".to_string()),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n )\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n\n\n/// - OR -\n\n/// Get a stream of results.\n///\n/// This allows you to paginate through all the items.\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_for_user_stream(\n \"some-string\",\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n", "libDocsLink": "https://docs.rs/kittycad/latest/kittycad/api_calls/struct.ApiCalls.html#method.list_for_user" } }, diff --git a/kittycad/README.md b/kittycad/README.md index 47466fe8..6180ce7d 100644 --- a/kittycad/README.md +++ b/kittycad/README.md @@ -6,7 +6,7 @@ A fully generated & opinionated API client for the KittyCAD API. ## API Details -API server for KittyCAD +API server for Zoo @@ -15,7 +15,7 @@ API server for KittyCAD | url | email | |----|----| -| | api@kittycad.io | +| | api@zoo.dev | diff --git a/kittycad/src/ai.rs b/kittycad/src/ai.rs index e2c99481..24b5152a 100644 --- a/kittycad/src/ai.rs +++ b/kittycad/src/ai.rs @@ -12,7 +12,7 @@ impl Ai { Self { client } } - #[doc = "List all AI prompts.\n\nFor text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a KittyCAD employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_prompts_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_prompts_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List all AI prompts.\n\nFor text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a Zoo employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_prompts_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_prompts_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_prompts<'a>( &'a self, @@ -58,7 +58,7 @@ impl Ai { } } - #[doc = "List all AI prompts.\n\nFor text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a KittyCAD employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_prompts_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_prompts_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List all AI prompts.\n\nFor text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a Zoo employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_prompts_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_prompts_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_prompts_stream<'a>( @@ -124,7 +124,7 @@ impl Ai { .boxed() } - #[doc = "Get an AI prompt.\n\nThis endpoint requires authentication by a KittyCAD \ + #[doc = "Get an AI prompt.\n\nThis endpoint requires authentication by a Zoo \ employee.\n\n**Parameters:**\n\n- `id: uuid::Uuid`: The id of the model to give \ feedback to. (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn \ example_ai_get_prompt() -> anyhow::Result<()> {\n let client = \ @@ -202,7 +202,7 @@ impl Ai { } } - #[doc = "List text-to-CAD models you've generated.\n\nThis will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any KittyCAD 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_text_to_cad_models_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_text_to_cad_models_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List text-to-CAD models you've generated.\n\nThis 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_text_to_cad_models_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_text_to_cad_models_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_text_to_cad_models_for_user<'a>( &'a self, @@ -248,7 +248,7 @@ impl Ai { } } - #[doc = "List text-to-CAD models you've generated.\n\nThis will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by any KittyCAD 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_text_to_cad_models_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_text_to_cad_models_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List text-to-CAD models you've generated.\n\nThis 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_ai_list_text_to_cad_models_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut ai = client.ai();\n let mut stream = ai.list_text_to_cad_models_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_text_to_cad_models_for_user_stream<'a>( @@ -314,9 +314,9 @@ impl Ai { .boxed() } - #[doc = "Get a text-to-CAD response.\n\nThis endpoint requires authentication by any KittyCAD \ - user. The user must be the owner of the text-to-CAD model.\n\n**Parameters:**\n\n- \ - `id: uuid::Uuid`: The id of the model to give feedback to. \ + #[doc = "Get a text-to-CAD response.\n\nThis endpoint requires authentication by any Zoo user. \ + The user must be the owner of the text-to-CAD model.\n\n**Parameters:**\n\n- `id: \ + uuid::Uuid`: The id of the model to give feedback to. \ (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn \ example_ai_get_text_to_cad_model_for_user() -> anyhow::Result<()> {\n let client = \ kittycad::Client::new_from_env();\n let result: kittycad::types::TextToCad = \ @@ -358,8 +358,8 @@ impl Ai { } #[doc = "Give feedback to a specific text-to-CAD response.\n\nThis endpoint requires \ - authentication by any KittyCAD user. The user must be the owner of the text-to-CAD \ - model, in order to give feedback.\n\n**Parameters:**\n\n- `feedback: \ + authentication by any Zoo user. The user must be the owner of the text-to-CAD model, \ + in order to give feedback.\n\n**Parameters:**\n\n- `feedback: \ crate::types::AiFeedback`: The feedback. (required)\n- `id: uuid::Uuid`: The id of \ the model to give feedback to. (required)\n\n```rust,no_run\nuse \ std::str::FromStr;\nasync fn example_ai_create_text_to_cad_model_feedback() -> \ diff --git a/kittycad/src/api_calls.rs b/kittycad/src/api_calls.rs index cee30592..2792771f 100644 --- a/kittycad/src/api_calls.rs +++ b/kittycad/src/api_calls.rs @@ -12,7 +12,7 @@ impl ApiCalls { Self { client } } - #[doc = "Get API call metrics.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n\n**Parameters:**\n\n- `group_by: crate::types::ApiCallQueryGroupBy`: What field to group the metrics by. (required)\n\n```rust,no_run\nasync fn example_api_calls_get_metrics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client\n .api_calls()\n .get_metrics(kittycad::types::ApiCallQueryGroupBy::IpAddress)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get API call metrics.\n\nThis endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.\n\n**Parameters:**\n\n- `group_by: crate::types::ApiCallQueryGroupBy`: What field to group the metrics by. (required)\n\n```rust,no_run\nasync fn example_api_calls_get_metrics() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client\n .api_calls()\n .get_metrics(kittycad::types::ApiCallQueryGroupBy::IpAddress)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_metrics<'a>( &'a self, @@ -44,7 +44,7 @@ impl ApiCalls { } } - #[doc = "List API calls.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls.\n\nThis endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list<'a>( &'a self, @@ -90,7 +90,7 @@ impl ApiCalls { } } - #[doc = "List API calls.\n\nThis endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls.\n\nThis endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_stream<'a>( @@ -157,7 +157,7 @@ impl ApiCalls { .boxed() } - #[doc = "Get details of an API call.\n\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.\n\n**Parameters:**\n\n- `id: uuid::Uuid`: The ID of the API call. (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_api_calls_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get details of an API call.\n\nThis endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly Zoo employees can view API calls for other users.\n\n**Parameters:**\n\n- `id: uuid::Uuid`: The ID of the API call. (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_api_calls_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get<'a>( &'a self, @@ -191,7 +191,7 @@ impl ApiCalls { } } - #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a Zoo employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_async_operations<'a>( &'a self, @@ -242,7 +242,7 @@ impl ApiCalls { } } - #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List async operations.\n\nFor async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a Zoo employee.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n- `status: Option`: The status to filter by.\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_async_operations_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_async_operations_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n Some(kittycad::types::ApiCallStatus::Failed),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_async_operations_stream<'a>( @@ -310,11 +310,11 @@ impl ApiCalls { } #[doc = "Get an async operation.\n\nGet the status and output of an async operation.\nThis \ - endpoint requires authentication by any KittyCAD user. It returns details of the \ - requested async operation for the user.\nIf the user is not authenticated to view the \ - specified async operation, then it is not returned.\nOnly KittyCAD employees with the \ - proper access can view async operations for other users.\n\n**Parameters:**\n\n- `id: \ - &'astr`: The ID of the async operation. (required)\n\n```rust,no_run\nasync fn \ + endpoint requires authentication by any Zoo user. It returns details of the requested \ + async operation for the user.\nIf the user is not authenticated to view the specified \ + async operation, then it is not returned.\nOnly Zoo employees with the proper access \ + can view async operations for other users.\n\n**Parameters:**\n\n- `id: &'astr`: The \ + ID of the async operation. (required)\n\n```rust,no_run\nasync fn \ example_api_calls_get_async_operation() -> anyhow::Result<()> {\n let client = \ kittycad::Client::new_from_env();\n let result: \ kittycad::types::AsyncApiCallOutput = client\n .api_calls()\n \ @@ -353,7 +353,7 @@ impl ApiCalls { } } - #[doc = "List API calls for your user.\n\nThis endpoint requires authentication by any KittyCAD 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls for your user.\n\nThis 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn user_list<'a>( &'a self, @@ -399,7 +399,7 @@ impl ApiCalls { } } - #[doc = "List API calls for your user.\n\nThis endpoint requires authentication by any KittyCAD 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls for your user.\n\nThis 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_user_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.user_list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn user_list_stream<'a>( @@ -466,7 +466,15 @@ impl ApiCalls { .boxed() } - #[doc = "Get an API call for a user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\n\n**Parameters:**\n\n- `id: uuid::Uuid`: The ID of the API call. (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_api_calls_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiCallWithPrice = client\n .api_calls()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get an API call for a user.\n\nThis endpoint requires authentication by any Zoo user. \ + It returns details of the requested API call for the user.\n\n**Parameters:**\n\n- \ + `id: uuid::Uuid`: The ID of the API call. (required)\n\n```rust,no_run\nuse \ + std::str::FromStr;\nasync fn example_api_calls_get_for_user() -> anyhow::Result<()> \ + {\n let client = kittycad::Client::new_from_env();\n let result: \ + kittycad::types::ApiCallWithPrice = client\n .api_calls()\n \ + .get_for_user(uuid::Uuid::from_str(\n \ + \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_for_user<'a>( &'a self, @@ -500,7 +508,7 @@ impl ApiCalls { } } - #[doc = "List API calls for a user.\n\nThis endpoint requires authentication by any KittyCAD 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 KittyCAD 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.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. (required)\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_for_user_stream(\n \"some-string\",\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls for a user.\n\nThis 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.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. (required)\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_for_user_stream(\n \"some-string\",\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_for_user<'a>( &'a self, @@ -551,7 +559,7 @@ impl ApiCalls { } } - #[doc = "List API calls for a user.\n\nThis endpoint requires authentication by any KittyCAD 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 KittyCAD 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.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. (required)\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_for_user_stream(\n \"some-string\",\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API calls for a user.\n\nThis 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.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. (required)\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_calls_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_calls = client.api_calls();\n let mut stream = api_calls.list_for_user_stream(\n \"some-string\",\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_for_user_stream<'a>( diff --git a/kittycad/src/api_tokens.rs b/kittycad/src/api_tokens.rs index ef24cd85..c7813143 100644 --- a/kittycad/src/api_tokens.rs +++ b/kittycad/src/api_tokens.rs @@ -12,7 +12,7 @@ impl ApiTokens { Self { client } } - #[doc = "List API tokens for your user.\n\nThis endpoint requires authentication by any KittyCAD 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API tokens for your user.\n\nThis 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_for_user<'a>( &'a self, @@ -58,7 +58,7 @@ impl ApiTokens { } } - #[doc = "List API tokens for your user.\n\nThis endpoint requires authentication by any KittyCAD 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List API tokens for your user.\n\nThis 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.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_api_tokens_list_for_user_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut api_tokens = client.api_tokens();\n let mut stream = api_tokens.list_for_user_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_for_user_stream<'a>( @@ -124,7 +124,7 @@ impl ApiTokens { .boxed() } - #[doc = "Create a new API token for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\n\n```rust,no_run\nasync fn example_api_tokens_create_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client.api_tokens().create_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Create a new API token for your user.\n\nThis endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.\n\n```rust,no_run\nasync fn example_api_tokens_create_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client.api_tokens().create_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_for_user<'a>( &'a self, @@ -153,7 +153,7 @@ impl ApiTokens { } } - #[doc = "Get an API token for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user.\n\n**Parameters:**\n\n- `token: uuid::Uuid`: The API token. (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_api_tokens_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client\n .api_tokens()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get an API token for your user.\n\nThis endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.\n\n**Parameters:**\n\n- `token: uuid::Uuid`: The API token. (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_api_tokens_get_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::ApiToken = client\n .api_tokens()\n .get_for_user(uuid::Uuid::from_str(\n \"d9797f8d-9ad6-4e08-90d7-2ec17e13471c\",\n )?)\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_for_user<'a>( &'a self, @@ -188,8 +188,8 @@ impl ApiTokens { } #[doc = "Delete an API token for your user.\n\nThis endpoint requires authentication by any \ - KittyCAD 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 \ + 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.\n\n**Parameters:**\n\n- `token: uuid::Uuid`: The API token. \ (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn \ diff --git a/kittycad/src/apps.rs b/kittycad/src/apps.rs index 1c042afe..d72cbcdb 100644 --- a/kittycad/src/apps.rs +++ b/kittycad/src/apps.rs @@ -13,10 +13,10 @@ impl Apps { } #[doc = "Listen for callbacks to GitHub app authentication.\n\nThis is different than OAuth \ - 2.0 authentication for users. This endpoint grants access for KittyCAD to access \ - user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, \ - this is purely for the GitHub permissions to access repos.\n\n```rust,no_run\nasync \ - fn example_apps_github_callback() -> anyhow::Result<()> {\n let client = \ + 2.0 authentication for users. This endpoint grants access for Zoo to access user's \ + repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is \ + purely for the GitHub permissions to access repos.\n\n```rust,no_run\nasync fn \ + example_apps_github_callback() -> anyhow::Result<()> {\n let client = \ kittycad::Client::new_from_env();\n client\n .apps()\n \ .github_callback(&serde_json::Value::String(\"some-string\".to_string()))\n \ .await?;\n Ok(())\n}\n```"] @@ -45,10 +45,10 @@ impl Apps { } #[doc = "Get the consent URL for GitHub app authentication.\n\nThis is different than OAuth \ - 2.0 authentication for users. This endpoint grants access for KittyCAD to access \ - user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, \ - this is purely for the GitHub permissions to access repos.\n\n```rust,no_run\nasync \ - fn example_apps_github_consent() -> anyhow::Result<()> {\n let client = \ + 2.0 authentication for users. This endpoint grants access for Zoo to access user's \ + repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is \ + purely for the GitHub permissions to access repos.\n\n```rust,no_run\nasync fn \ + example_apps_github_consent() -> anyhow::Result<()> {\n let client = \ kittycad::Client::new_from_env();\n let result: kittycad::types::AppClientInfo = \ client.apps().github_consent().await?;\n println!(\"{:?}\", result);\n \ Ok(())\n}\n```"] diff --git a/kittycad/src/executor.rs b/kittycad/src/executor.rs index be0cb926..197f14e2 100644 --- a/kittycad/src/executor.rs +++ b/kittycad/src/executor.rs @@ -12,7 +12,7 @@ impl Executor { Self { client } } - #[doc = "Execute a KittyCAD program in a specific language.\n\n**Parameters:**\n\n- `lang: \ + #[doc = "Execute a Zoo program in a specific language.\n\n**Parameters:**\n\n- `lang: \ crate::types::CodeLanguage`: The language of the code. (required)\n- `output: \ Option`: The output file we want to get the contents for (the paths are \ relative to where in litterbox it is being run). You can denote more than one file \ diff --git a/kittycad/src/lib.rs b/kittycad/src/lib.rs index de6eb5be..244609d3 100644 --- a/kittycad/src/lib.rs +++ b/kittycad/src/lib.rs @@ -4,7 +4,7 @@ //! //! ## API Details //! -//! API server for KittyCAD +//! API server for Zoo //! //! //! @@ -13,7 +13,7 @@ //! //! | url | email | //! |----|----| -//! | | api@kittycad.io | +//! | | api@zoo.dev | //! //! //! diff --git a/kittycad/src/meta.rs b/kittycad/src/meta.rs index 86457d4d..a80317e6 100644 --- a/kittycad/src/meta.rs +++ b/kittycad/src/meta.rs @@ -72,12 +72,11 @@ impl Meta { } #[doc = "Get the metadata about our currently running server.\n\nThis includes information on \ - any of our other distributed systems it is connected to.\nYou must be a KittyCAD \ - employee to perform this request.\n\n```rust,no_run\nasync fn \ - example_meta_get_metadata() -> anyhow::Result<()> {\n let client = \ - kittycad::Client::new_from_env();\n let result: kittycad::types::Metadata = \ - client.meta().get_metadata().await?;\n println!(\"{:?}\", result);\n \ - Ok(())\n}\n```"] + any of our other distributed systems it is connected to.\nYou must be a Zoo employee \ + to perform this request.\n\n```rust,no_run\nasync fn example_meta_get_metadata() -> \ + anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ + result: kittycad::types::Metadata = client.meta().get_metadata().await?;\n \ + println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_metadata<'a>( &'a self, @@ -108,9 +107,9 @@ impl Meta { #[doc = "Get an API token for a user by their discord id.\n\nThis endpoint allows us to run \ API calls from our discord bot on behalf of a user. The user must have a discord \ - account linked to their KittyCAD Account via oauth2 for this to work.\nYou must be a \ - KittyCAD employee to use this endpoint.\n\n**Parameters:**\n\n- `discord_id: &'astr`: \ - The user's discord ID. (required)\n\n```rust,no_run\nasync fn \ + account linked to their Zoo Account via oauth2 for this to work.\nYou must be a Zoo \ + employee to use this endpoint.\n\n**Parameters:**\n\n- `discord_id: &'astr`: The \ + user's discord ID. (required)\n\n```rust,no_run\nasync fn \ example_meta_internal_get_api_token_for_discord_user() -> anyhow::Result<()> {\n \ let client = kittycad::Client::new_from_env();\n let result: \ kittycad::types::ApiToken = client\n .meta()\n \ diff --git a/kittycad/src/payments.rs b/kittycad/src/payments.rs index 081a47ec..07ad339c 100644 --- a/kittycad/src/payments.rs +++ b/kittycad/src/payments.rs @@ -13,8 +13,8 @@ impl Payments { } #[doc = "Get payment info about your user.\n\nThis includes billing address, phone, and \ - name.\nThis endpoint requires authentication by any KittyCAD user. It gets the \ - payment information for the authenticated user.\n\n```rust,no_run\nasync fn \ + name.\nThis endpoint requires authentication by any Zoo user. It gets the payment \ + information for the authenticated user.\n\n```rust,no_run\nasync fn \ example_payments_get_information_for_user() -> anyhow::Result<()> {\n let client = \ kittycad::Client::new_from_env();\n let result: kittycad::types::Customer = \ client.payments().get_information_for_user().await?;\n println!(\"{:?}\", \ @@ -48,8 +48,8 @@ impl Payments { } #[doc = "Update payment info for your user.\n\nThis includes billing address, phone, and \ - name.\nThis endpoint requires authentication by any KittyCAD user. It updates the \ - payment information for the authenticated user.\n\n```rust,no_run\nuse \ + name.\nThis endpoint requires authentication by any Zoo user. It updates the payment \ + information for the authenticated user.\n\n```rust,no_run\nuse \ std::str::FromStr;\nasync fn example_payments_update_information_for_user() -> \ anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ result: kittycad::types::Customer = client\n .payments()\n \ @@ -96,8 +96,8 @@ impl Payments { } #[doc = "Create payment info for your user.\n\nThis includes billing address, phone, and \ - name.\nThis endpoint requires authentication by any KittyCAD user. It creates the \ - payment information for the authenticated user.\n\n```rust,no_run\nuse \ + name.\nThis endpoint requires authentication by any Zoo user. It creates the payment \ + information for the authenticated user.\n\n```rust,no_run\nuse \ std::str::FromStr;\nasync fn example_payments_create_information_for_user() -> \ anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ result: kittycad::types::Customer = client\n .payments()\n \ @@ -144,8 +144,8 @@ impl Payments { } #[doc = "Delete payment info for your user.\n\nThis includes billing address, phone, and \ - name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the \ - payment information for the authenticated user.\n\n```rust,no_run\nasync fn \ + name.\nThis endpoint requires authentication by any Zoo user. It deletes the payment \ + information for the authenticated user.\n\n```rust,no_run\nasync fn \ example_payments_delete_information_for_user() -> anyhow::Result<()> {\n let \ client = kittycad::Client::new_from_env();\n \ client.payments().delete_information_for_user().await?;\n Ok(())\n}\n```"] @@ -171,7 +171,7 @@ impl Payments { } } - #[doc = "Get balance for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_get_balance_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CustomerBalance = client.payments().get_balance_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get balance for your user.\n\nThis endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_get_balance_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::CustomerBalance = client.payments().get_balance_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get_balance_for_user<'a>( &'a self, @@ -200,7 +200,7 @@ impl Payments { } } - #[doc = "Create a payment intent for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_create_intent_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PaymentIntent = client.payments().create_intent_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Create a payment intent for your user.\n\nThis endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_create_intent_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::PaymentIntent = client.payments().create_intent_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn create_intent_for_user<'a>( &'a self, @@ -229,7 +229,7 @@ impl Payments { } } - #[doc = "List invoices for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_list_invoices_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client.payments().list_invoices_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "List invoices for your user.\n\nThis endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_list_invoices_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec = client.payments().list_invoices_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_invoices_for_user<'a>( &'a self, @@ -258,7 +258,7 @@ impl Payments { } } - #[doc = "List payment methods for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_list_methods_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec =\n client.payments().list_methods_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "List payment methods for your user.\n\nThis endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.\n\n```rust,no_run\nasync fn example_payments_list_methods_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: Vec =\n client.payments().list_methods_for_user().await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_methods_for_user<'a>( &'a self, @@ -287,7 +287,7 @@ impl Payments { } } - #[doc = "Delete a payment method for your user.\n\nThis endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user.\n\n**Parameters:**\n\n- `id: &'astr`: The ID of the payment method. (required)\n\n```rust,no_run\nasync fn example_payments_delete_method_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .payments()\n .delete_method_for_user(\"some-string\")\n .await?;\n Ok(())\n}\n```"] + #[doc = "Delete a payment method for your user.\n\nThis endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.\n\n**Parameters:**\n\n- `id: &'astr`: The ID of the payment method. (required)\n\n```rust,no_run\nasync fn example_payments_delete_method_for_user() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n client\n .payments()\n .delete_method_for_user(\"some-string\")\n .await?;\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn delete_method_for_user<'a>( &'a self, @@ -316,7 +316,7 @@ impl Payments { } #[doc = "Validate a customer's information is correct and valid for automatic tax.\n\nThis \ - endpoint requires authentication by any KittyCAD user. It will return an error if the \ + 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.\n\n```rust,no_run\nasync fn \ example_payments_validate_customer_tax_information_for_user() -> anyhow::Result<()> \ diff --git a/kittycad/src/types.rs b/kittycad/src/types.rs index 61e3b7a8..d3fded57 100644 --- a/kittycad/src/types.rs +++ b/kittycad/src/types.rs @@ -3910,6 +3910,24 @@ impl tabled::Tabled for Discount { } } +#[doc = "The type of distance Distances can vary depending on the objects used as input."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] +#[serde(tag = "type")] +pub enum DistanceType { + #[doc = "Euclidean Distance."] + #[serde(rename = "euclidean")] + Euclidean {}, + #[doc = "The distance between objects along the specified axis"] + #[serde(rename = "on_axis")] + OnAxis { + #[doc = "Global axis"] + axis: GlobalAxis, + }, +} + #[doc = "The body of the form for email authentication."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -4013,6 +4031,42 @@ impl tabled::Tabled for EntityGetChildUuid { } } +#[doc = "The response from the `EntitiesGetDistance` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetDistance { + #[doc = "The maximum distance between the input entities."] + pub max_distance: f64, + #[doc = "The minimum distance between the input entities."] + pub min_distance: f64, +} + +impl std::fmt::Display for EntityGetDistance { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +#[cfg(feature = "tabled")] +impl tabled::Tabled for EntityGetDistance { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.max_distance).into(), + format!("{:?}", self.min_distance).into(), + ] + } + + fn headers() -> Vec> { + vec!["max_distance".into(), "min_distance".into()] + } +} + #[doc = "The response from the `EntityGetNumChildren` command."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -4075,6 +4129,37 @@ impl tabled::Tabled for EntityGetParentId { } } +#[doc = "The response from the `EntityLinearPattern` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityLinearPattern { + #[doc = "The UUIDs of the entities that were created."] + pub entity_ids: Vec, +} + +impl std::fmt::Display for EntityLinearPattern { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +#[cfg(feature = "tabled")] +impl tabled::Tabled for EntityLinearPattern { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_ids).into()] + } + + fn headers() -> Vec> { + vec!["entity_ids".into()] + } +} + #[doc = "The type of entity"] #[derive( serde :: Serialize, @@ -5499,6 +5584,35 @@ impl tabled::Tabled for GetSketchModePlane { } } +#[doc = "An enum that contains the three global axes."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + parse_display :: FromStr, + parse_display :: Display, +)] +#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] +#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] +pub enum GlobalAxis { + #[doc = "The X axis"] + #[serde(rename = "x")] + #[display("x")] + X, + #[doc = "The Y axis"] + #[serde(rename = "y")] + #[display("y")] + Y, + #[doc = "The Z axis"] + #[serde(rename = "z")] + #[display("z")] + Z, +} + #[doc = "Describes the presentation style of the glTF JSON."] #[derive( serde :: Serialize, @@ -5676,7 +5790,8 @@ pub enum ImageFormat { Jpeg, } -#[doc = "File to import into the current model"] +#[doc = "File to import into the current model If you are sending binary data for a file, be sure \ + to send the WebSocketRequest as binary/bson, not text/json."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] @@ -6859,8 +6974,7 @@ pub enum ModelingCmd { entity_ids: Vec, #[doc = "The file format to export to."] format: OutputFormat, - #[doc = "Select the unit interpretation of exported objects.\n\nThis is not the same as \ - the export units. Setting export units is part of the format options."] + #[doc = "Select the unit interpretation of exported objects."] source_unit: UnitLength, }, #[doc = "What is this entity's parent?"] @@ -7322,6 +7436,54 @@ pub enum ModelingCmd { #[doc = "Which curve to constrain."] object_id: uuid::Uuid, }, + #[doc = "Sketch on some entity (e.g. a plane, a face)"] + #[serde(rename = "enable_sketch_mode")] + EnableSketchMode { + #[doc = "Should we animate or snap for the camera transition?"] + animated: bool, + #[doc = "Which entity to sketch on."] + entity_id: uuid::Uuid, + #[doc = "Should the camera use orthographic projection? In other words, should an \ + object's size in the rendered image stay constant regardless of its distance \ + from the camera."] + ortho: bool, + }, + #[doc = "Set the material properties of an object"] + #[serde(rename = "object_set_material_params_pbr")] + ObjectSetMaterialParamsPbr { + #[doc = "Ambient Occlusion of the new material"] + ambient_occlusion: f64, + #[doc = "Color of the new material"] + color: Color, + #[doc = "Metalness of the new material"] + metalness: f64, + #[doc = "Which object to change"] + object_id: uuid::Uuid, + #[doc = "Roughness of the new material"] + roughness: f64, + }, + #[doc = "What is the distance between these two entities?"] + #[serde(rename = "entity_get_distance")] + EntityGetDistance { + #[doc = "Type of distance to be measured."] + distance_type: DistanceType, + #[doc = "ID of the first entity being queried."] + entity_id1: uuid::Uuid, + #[doc = "ID of the second entity being queried."] + entity_id2: uuid::Uuid, + }, + #[doc = "Duplicate the given entity, evenly spaced along the chosen axis."] + #[serde(rename = "entity_linear_pattern")] + EntityLinearPattern { + #[doc = "Axis along which to make the copites"] + axis: Point3D, + #[doc = "ID of the entity being copied."] + entity_id: uuid::Uuid, + #[doc = "Number of repetitions to make."] + num_repetitions: u32, + #[doc = "Spacing between repetitions."] + spacing: f64, + }, } #[doc = "A graphics command submitted to the KittyCAD engine via the Modeling API."] @@ -7580,184 +7742,194 @@ pub enum OkModelingCmdResponse { defined here."] #[serde(rename = "empty")] Empty {}, - #[doc = "The response from the `Export` command. When this is being performed over a \ - websocket, this is sent as binary not JSON. The binary data can be deserialized as \ - `bincode` into a `Vec`."] + #[doc = "The response from the ` ` command."] #[serde(rename = "export")] Export { #[doc = "The response from the `Export` endpoint."] data: Export, }, - #[doc = "The response from the `SelectWithPoint` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "select_with_point")] SelectWithPoint { #[doc = "The response from the `SelectWithPoint` command."] data: SelectWithPoint, }, - #[doc = "The response from the `HighlightSetEntity` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "highlight_set_entity")] HighlightSetEntity { #[doc = "The response from the `HighlightSetEntity` command."] data: HighlightSetEntity, }, - #[doc = "The response from the `EntityGetChildUuid` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_child_uuid")] EntityGetChildUuid { #[doc = "The response from the `EntityGetChildUuid` command."] data: EntityGetChildUuid, }, - #[doc = "The response from the `EntityGetNumChildren` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_num_children")] EntityGetNumChildren { #[doc = "The response from the `EntityGetNumChildren` command."] data: EntityGetNumChildren, }, - #[doc = "The response from the `EntityGetParentId` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_parent_id")] EntityGetParentId { #[doc = "The response from the `EntityGetParentId` command."] data: EntityGetParentId, }, - #[doc = "The response from the `EntityGetAllChildUuids` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_all_child_uuids")] EntityGetAllChildUuids { #[doc = "The response from the `EntityGetAllChildUuids` command."] data: EntityGetAllChildUuids, }, - #[doc = "The response from the `SelectGet` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "select_get")] SelectGet { #[doc = "The response from the `SelectGet` command."] data: SelectGet, }, - #[doc = "The response from the `GetEntityType` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "get_entity_type")] GetEntityType { #[doc = "The response from the `GetEntityType` command."] data: GetEntityType, }, - #[doc = "The response from the `Solid3dGetAllEdgeFaces` command."] + #[doc = "The response from the ` ` command."] + #[serde(rename = "entity_get_distance")] + EntityGetDistance { + #[doc = "The response from the `EntitiesGetDistance` command."] + data: EntityGetDistance, + }, + #[doc = "The response from the ` ` command."] + #[serde(rename = "entity_linear_pattern")] + EntityLinearPattern { + #[doc = "The response from the `EntityLinearPattern` command."] + data: EntityLinearPattern, + }, + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_all_edge_faces")] Solid3DGetAllEdgeFaces { #[doc = "The response from the `Solid3dGetAllEdgeFaces` command."] data: Solid3DGetAllEdgeFaces, }, - #[doc = "The response from the `Solid3dGetAllOppositeEdges` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_all_opposite_edges")] Solid3DGetAllOppositeEdges { #[doc = "The response from the `Solid3dGetAllOppositeEdges` command."] data: Solid3DGetAllOppositeEdges, }, - #[doc = "The response from the `Solid3dGetOppositeEdge` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_opposite_edge")] Solid3DGetOppositeEdge { #[doc = "The response from the `Solid3dGetOppositeEdge` command."] data: Solid3DGetOppositeEdge, }, - #[doc = "The response from the `Solid3dGetPrevAdjacentEdge` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_prev_adjacent_edge")] Solid3DGetPrevAdjacentEdge { #[doc = "The response from the `Solid3dGetPrevAdjacentEdge` command."] data: Solid3DGetPrevAdjacentEdge, }, - #[doc = "The response from the `Solid3dGetNextAdjacentEdge` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_next_adjacent_edge")] Solid3DGetNextAdjacentEdge { #[doc = "The response from the `Solid3dGetNextAdjacentEdge` command."] data: Solid3DGetNextAdjacentEdge, }, - #[doc = "The response from the `MouseClick` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "mouse_click")] MouseClick { #[doc = "The response from the `MouseClick` command."] data: MouseClick, }, - #[doc = "The response from the `CurveGetType` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "curve_get_type")] CurveGetType { #[doc = "The response from the `CurveGetType` command."] data: CurveGetType, }, - #[doc = "The response from the `CurveGetControlPoints` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "curve_get_control_points")] CurveGetControlPoints { #[doc = "The response from the `CurveGetControlPoints` command."] data: CurveGetControlPoints, }, - #[doc = "The response from the `Take Snapshot` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "take_snapshot")] TakeSnapshot { #[doc = "The response from the `TakeSnapshot` command."] data: TakeSnapshot, }, - #[doc = "The response from the `Path Get Info` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "path_get_info")] PathGetInfo { #[doc = "The response from the `PathGetInfo` command."] data: PathGetInfo, }, - #[doc = "The response from the `Path Get Curve UUIDs for Vertices` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "path_get_curve_uuids_for_vertices")] PathGetCurveUuidsForVertices { #[doc = "The response from the `PathGetCurveUuidsForVertices` command."] data: PathGetCurveUuidsForVertices, }, - #[doc = "The response from the `Path Get Vertex UUIDs` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "path_get_vertex_uuids")] PathGetVertexUuids { #[doc = "The response from the `PathGetVertexUuids` command."] data: PathGetVertexUuids, }, - #[doc = "The response from the `PlaneIntersectAndProject` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "plane_intersect_and_project")] PlaneIntersectAndProject { #[doc = "Corresponding coordinates of given window coordinates, intersected on given \ plane."] data: PlaneIntersectAndProject, }, - #[doc = "The response from the `CurveGetEndPoints` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "curve_get_end_points")] CurveGetEndPoints { #[doc = "Endpoints of a curve"] data: CurveGetEndPoints, }, - #[doc = "The response from the `ImportFiles` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "import_files")] ImportFiles { #[doc = "Data from importing the files"] data: ImportFiles, }, - #[doc = "The response from the `Mass` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "mass")] Mass { #[doc = "The mass response."] data: Mass, }, - #[doc = "The response from the `Volume` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "volume")] Volume { #[doc = "The volume response."] data: Volume, }, - #[doc = "The response from the `Density` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "density")] Density { #[doc = "The density response."] data: Density, }, - #[doc = "The response from the `SurfaceArea` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "surface_area")] SurfaceArea { #[doc = "The surface area response."] data: SurfaceArea, }, - #[doc = "The response from the `CenterOfMass` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "center_of_mass")] CenterOfMass { #[doc = "The center of mass response."] data: CenterOfMass, }, - #[doc = "The response from the `GetSketchModePlane` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "get_sketch_mode_plane")] GetSketchModePlane { #[doc = "The plane for sketch mode."] @@ -7812,14 +7984,20 @@ pub enum OkWebSocketResponseData { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct Onboarding { + #[doc = "When the user first used the modeling app."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_call_from_modeling_app_date: Option, + #[doc = "When the user first used text-to-CAD."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_call_from_text_to_cad_date: Option, #[doc = "When the user first called an endpoint from their machine (i.e. not a litterbox \ - execution)"] + execution)."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_call_from_their_machine_date: Option, - #[doc = "When the user first used the litterbox"] + #[doc = "When the user first used the litterbox."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_litterbox_execute_date: Option, - #[doc = "When the user created their first token"] + #[doc = "When the user created their first token."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_token_date: Option, } @@ -7836,9 +8014,20 @@ impl std::fmt::Display for Onboarding { #[cfg(feature = "tabled")] impl tabled::Tabled for Onboarding { - const LENGTH: usize = 3; + const LENGTH: usize = 5; fn fields(&self) -> Vec> { vec![ + if let Some(first_call_from_modeling_app_date) = &self.first_call_from_modeling_app_date + { + format!("{:?}", first_call_from_modeling_app_date).into() + } else { + String::new().into() + }, + if let Some(first_call_from_text_to_cad_date) = &self.first_call_from_text_to_cad_date { + format!("{:?}", first_call_from_text_to_cad_date).into() + } else { + String::new().into() + }, if let Some(first_call_from_their_machine_date) = &self.first_call_from_their_machine_date { @@ -7861,6 +8050,8 @@ impl tabled::Tabled for Onboarding { fn headers() -> Vec> { vec![ + "first_call_from_modeling_app_date".into(), + "first_call_from_text_to_cad_date".into(), "first_call_from_their_machine_date".into(), "first_litterbox_execute_date".into(), "first_token_date".into(), @@ -7930,7 +8121,7 @@ pub enum OutputFormat { }, #[doc = "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, \ although by default it will be in binary format and thus technically (glb). If you \ - prefer ascii output, you can set that option for the export."] + prefer ASCII output, you can set that option for the export."] #[serde(rename = "gltf")] Gltf { #[doc = "Specifies how the JSON will be presented."] @@ -8186,24 +8377,16 @@ pub enum PathSegment { #[doc = "A circular arc segment."] #[serde(rename = "arc")] Arc { - #[doc = "End of the arc along circle's perimeter, in degrees. Deprecated: use `end` \ - instead."] - angle_end: f64, - #[doc = "Start of the arc along circle's perimeter, in degrees. Deprecated: use `start` \ - instead."] - angle_start: f64, #[doc = "Center of the circle"] center: Point2D, - #[doc = "End of the arc along circle's perimeter. If not given, this will use \ - `degrees_end` instead."] - end: Option, + #[doc = "End of the arc along circle's perimeter."] + end: Angle, #[doc = "Radius of the circle"] radius: f64, #[doc = "Whether or not this arc is a relative offset"] relative: bool, - #[doc = "Start of the arc along circle's perimeter. If not given, this will use \ - `degrees_start` instead."] - start: Option, + #[doc = "Start of the arc along circle's perimeter."] + start: Angle, }, #[doc = "A cubic bezier curve segment. Start at the end of the current line, go through \ control point 1 and 2, then end at a given point."] @@ -8645,7 +8828,8 @@ impl tabled::Tabled for Pong { } } -#[doc = "A raw file with unencoded contents to be passed over binary websockets."] +#[doc = "A raw file with unencoded contents to be passed over binary websockets. When raw files \ + come back for exports it is sent as binary/bson, not text/json."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] diff --git a/kittycad/src/users.rs b/kittycad/src/users.rs index f6cb74cc..278c9425 100644 --- a/kittycad/src/users.rs +++ b/kittycad/src/users.rs @@ -44,7 +44,7 @@ impl Users { } } - #[doc = "Update your user.\n\nThis endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_users_update_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client\n .users()\n .update_self(&kittycad::types::UpdateUser {\n company: Some(\"some-string\".to_string()),\n discord: Some(\"some-string\".to_string()),\n first_name: Some(\"some-string\".to_string()),\n github: Some(\"some-string\".to_string()),\n last_name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Update your user.\n\nThis endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn example_users_update_self() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client\n .users()\n .update_self(&kittycad::types::UpdateUser {\n company: Some(\"some-string\".to_string()),\n discord: Some(\"some-string\".to_string()),\n first_name: Some(\"some-string\".to_string()),\n github: Some(\"some-string\".to_string()),\n last_name: Some(\"some-string\".to_string()),\n phone: kittycad::types::phone_number::PhoneNumber::from_str(\"+1555-555-5555\")?,\n })\n .await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn update_self<'a>( &'a self, @@ -75,9 +75,9 @@ impl Users { } } - #[doc = "Delete your user.\n\nThis endpoint requires authentication by any KittyCAD user. It \ - deletes the authenticated user from KittyCAD's database.\nThis call will only succeed \ - if all invoices associated with the user have been paid in full and there is no \ + #[doc = "Delete your user.\n\nThis 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.\n\n```rust,no_run\nasync fn example_users_delete_self() -> \ anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n \ client.users().delete_self().await?;\n Ok(())\n}\n```"] @@ -130,38 +130,6 @@ impl Users { } } - #[doc = "Get your user's front verification hash.\n\nThis info is sent to front when \ - initialing the front chat, it prevents impersonations using js hacks in the \ - browser\n\n```rust,no_run\nasync fn example_users_get_front_hash_self() -> \ - anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ - result: String = client.users().get_front_hash_self().await?;\n println!(\"{:?}\", \ - result);\n Ok(())\n}\n```"] - #[tracing::instrument] - pub async fn get_front_hash_self<'a>(&'a self) -> Result { - let mut req = self.client.client.request( - http::Method::GET, - format!("{}/{}", self.client.base_url, "user/front-hash"), - ); - req = req.bearer_auth(&self.client.token); - let resp = req.send().await?; - let status = resp.status(); - if status.is_success() { - let text = resp.text().await.unwrap_or_default(); - serde_json::from_str(&text).map_err(|err| { - crate::types::error::Error::from_serde_error( - format_serde_error::SerdeError::new(text.to_string(), err), - status, - ) - }) - } else { - let text = resp.text().await.unwrap_or_default(); - return Err(crate::types::error::Error::Server { - body: text.to_string(), - status, - }); - } - } - #[doc = "Get your user's onboarding status.\n\nChecks key part of their api usage to determine \ their onboarding progress\n\n```rust,no_run\nasync fn \ example_users_get_onboarding_self() -> anyhow::Result<()> {\n let client = \ @@ -196,7 +164,7 @@ impl Users { } } - #[doc = "Get a session for your user.\n\nThis endpoint requires authentication by any KittyCAD \ + #[doc = "Get a session for your user.\n\nThis endpoint requires authentication by any Zoo \ user. It returns details of the requested API token for the \ user.\n\n**Parameters:**\n\n- `token: uuid::Uuid`: The API token. \ (required)\n\n```rust,no_run\nuse std::str::FromStr;\nasync fn \ @@ -238,7 +206,7 @@ impl Users { } } - #[doc = "List users.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List users.\n\nThis endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list<'a>( &'a self, @@ -284,7 +252,7 @@ impl Users { } } - #[doc = "List users.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List users.\n\nThis endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_stream<'a>( @@ -349,7 +317,7 @@ impl Users { .boxed() } - #[doc = "List users with extended information.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List users with extended information.\n\nThis endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn list_extended<'a>( &'a self, @@ -395,7 +363,7 @@ impl Users { } } - #[doc = "List users with extended information.\n\nThis endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] + #[doc = "List users with extended information.\n\nThis endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.\n\n**Parameters:**\n\n- `limit: Option`: Maximum number of items returned by a single call\n- `page_token: Option`: Token returned by previous call to retrieve the subsequent page\n- `sort_by: Option`\n\n```rust,no_run\nuse futures_util::TryStreamExt;\nasync fn example_users_list_extended_stream() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let mut users = client.users();\n let mut stream = users.list_extended_stream(\n Some(4 as u32),\n Some(kittycad::types::CreatedAtSortMode::CreatedAtDescending),\n );\n loop {\n match stream.try_next().await {\n Ok(Some(item)) => {\n println!(\"{:?}\", item);\n }\n Ok(None) => {\n break;\n }\n Err(err) => {\n return Err(err.into());\n }\n }\n }\n\n Ok(())\n}\n```"] #[tracing::instrument] #[cfg(not(feature = "js"))] pub fn list_extended_stream<'a>( @@ -464,9 +432,9 @@ impl Users { #[doc = "Get extended information about a user.\n\nTo 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 \ - KittyCAD user, you must be a KittyCAD employee.\n\n**Parameters:**\n\n- `id: &'astr`: \ - The user ID. (required)\n\n```rust,no_run\nasync fn example_users_get_extended() -> \ + authenticated user, use `/user/extended` endpoint.\nTo get information about any Zoo \ + user, you must be a Zoo employee.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. \ + (required)\n\n```rust,no_run\nasync fn example_users_get_extended() -> \ anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let \ result: kittycad::types::ExtendedUser = \ client.users().get_extended(\"some-string\").await?;\n println!(\"{:?}\", \ @@ -504,7 +472,7 @@ impl Users { } } - #[doc = "Get a user.\n\nTo 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 KittyCAD user, you must be a KittyCAD employee.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. (required)\n\n```rust,no_run\nasync fn example_users_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client.users().get(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] + #[doc = "Get a user.\n\nTo 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.\n\n**Parameters:**\n\n- `id: &'astr`: The user ID. (required)\n\n```rust,no_run\nasync fn example_users_get() -> anyhow::Result<()> {\n let client = kittycad::Client::new_from_env();\n let result: kittycad::types::User = client.users().get(\"some-string\").await?;\n println!(\"{:?}\", result);\n Ok(())\n}\n```"] #[tracing::instrument] pub async fn get<'a>( &'a self, diff --git a/openapitor/tests/types/kittycad.rs.gen b/openapitor/tests/types/kittycad.rs.gen index 1a0c82fa..08cd764a 100644 --- a/openapitor/tests/types/kittycad.rs.gen +++ b/openapitor/tests/types/kittycad.rs.gen @@ -3858,6 +3858,24 @@ impl tabled::Tabled for Discount { } } +#[doc = "The type of distance Distances can vary depending on the objects used as input."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] +#[serde(tag = "type")] +pub enum DistanceType { + #[doc = "Euclidean Distance."] + #[serde(rename = "euclidean")] + Euclidean {}, + #[doc = "The distance between objects along the specified axis"] + #[serde(rename = "on_axis")] + OnAxis { + #[doc = "Global axis"] + axis: GlobalAxis, + }, +} + #[doc = "The body of the form for email authentication."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -3961,6 +3979,42 @@ impl tabled::Tabled for EntityGetChildUuid { } } +#[doc = "The response from the `EntitiesGetDistance` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityGetDistance { + #[doc = "The maximum distance between the input entities."] + pub max_distance: f64, + #[doc = "The minimum distance between the input entities."] + pub min_distance: f64, +} + +impl std::fmt::Display for EntityGetDistance { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +#[cfg(feature = "tabled")] +impl tabled::Tabled for EntityGetDistance { + const LENGTH: usize = 2; + fn fields(&self) -> Vec> { + vec![ + format!("{:?}", self.max_distance).into(), + format!("{:?}", self.min_distance).into(), + ] + } + + fn headers() -> Vec> { + vec!["max_distance".into(), "min_distance".into()] + } +} + #[doc = "The response from the `EntityGetNumChildren` command."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, @@ -4023,6 +4077,37 @@ impl tabled::Tabled for EntityGetParentId { } } +#[doc = "The response from the `EntityLinearPattern` command."] +#[derive( + serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, +)] +pub struct EntityLinearPattern { + #[doc = "The UUIDs of the entities that were created."] + pub entity_ids: Vec, +} + +impl std::fmt::Display for EntityLinearPattern { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> { + write!( + f, + "{}", + serde_json::to_string_pretty(self).map_err(|_| std::fmt::Error)? + ) + } +} + +#[cfg(feature = "tabled")] +impl tabled::Tabled for EntityLinearPattern { + const LENGTH: usize = 1; + fn fields(&self) -> Vec> { + vec![format!("{:?}", self.entity_ids).into()] + } + + fn headers() -> Vec> { + vec!["entity_ids".into()] + } +} + #[doc = "The type of entity"] #[derive( serde :: Serialize, @@ -5427,6 +5512,35 @@ impl tabled::Tabled for GetSketchModePlane { } } +#[doc = "An enum that contains the three global axes."] +#[derive( + serde :: Serialize, + serde :: Deserialize, + PartialEq, + Hash, + Debug, + Clone, + schemars :: JsonSchema, + parse_display :: FromStr, + parse_display :: Display, +)] +#[cfg_attr(feature = "clap", derive(clap::ValueEnum))] +#[cfg_attr(feature = "tabled", derive(tabled::Tabled))] +pub enum GlobalAxis { + #[doc = "The X axis"] + #[serde(rename = "x")] + #[display("x")] + X, + #[doc = "The Y axis"] + #[serde(rename = "y")] + #[display("y")] + Y, + #[doc = "The Z axis"] + #[serde(rename = "z")] + #[display("z")] + Z, +} + #[doc = "Describes the presentation style of the glTF JSON."] #[derive( serde :: Serialize, @@ -5601,7 +5715,7 @@ pub enum ImageFormat { Jpeg, } -#[doc = "File to import into the current model"] +#[doc = "File to import into the current model If you are sending binary data for a file, be sure to send the WebSocketRequest as binary/bson, not text/json."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] @@ -6741,7 +6855,7 @@ pub enum ModelingCmd { entity_ids: Vec, #[doc = "The file format to export to."] format: OutputFormat, - #[doc = "Select the unit interpretation of exported objects.\n\nThis is not the same as the export units. Setting export units is part of the format options."] + #[doc = "Select the unit interpretation of exported objects."] source_unit: UnitLength, }, #[doc = "What is this entity's parent?"] @@ -7179,6 +7293,52 @@ pub enum ModelingCmd { #[doc = "Which curve to constrain."] object_id: uuid::Uuid, }, + #[doc = "Sketch on some entity (e.g. a plane, a face)"] + #[serde(rename = "enable_sketch_mode")] + EnableSketchMode { + #[doc = "Should we animate or snap for the camera transition?"] + animated: bool, + #[doc = "Which entity to sketch on."] + entity_id: uuid::Uuid, + #[doc = "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera."] + ortho: bool, + }, + #[doc = "Set the material properties of an object"] + #[serde(rename = "object_set_material_params_pbr")] + ObjectSetMaterialParamsPbr { + #[doc = "Ambient Occlusion of the new material"] + ambient_occlusion: f64, + #[doc = "Color of the new material"] + color: Color, + #[doc = "Metalness of the new material"] + metalness: f64, + #[doc = "Which object to change"] + object_id: uuid::Uuid, + #[doc = "Roughness of the new material"] + roughness: f64, + }, + #[doc = "What is the distance between these two entities?"] + #[serde(rename = "entity_get_distance")] + EntityGetDistance { + #[doc = "Type of distance to be measured."] + distance_type: DistanceType, + #[doc = "ID of the first entity being queried."] + entity_id1: uuid::Uuid, + #[doc = "ID of the second entity being queried."] + entity_id2: uuid::Uuid, + }, + #[doc = "Duplicate the given entity, evenly spaced along the chosen axis."] + #[serde(rename = "entity_linear_pattern")] + EntityLinearPattern { + #[doc = "Axis along which to make the copites"] + axis: Point3D, + #[doc = "ID of the entity being copied."] + entity_id: uuid::Uuid, + #[doc = "Number of repetitions to make."] + num_repetitions: u32, + #[doc = "Spacing between repetitions."] + spacing: f64, + }, } #[doc = "A graphics command submitted to the KittyCAD engine via the Modeling API."] @@ -7432,181 +7592,193 @@ pub enum OkModelingCmdResponse { #[doc = "An empty response, used for any command that does not explicitly have a response defined here."] #[serde(rename = "empty")] Empty {}, - #[doc = "The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`."] + #[doc = "The response from the ` ` command."] #[serde(rename = "export")] Export { #[doc = "The response from the `Export` endpoint."] data: Export, }, - #[doc = "The response from the `SelectWithPoint` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "select_with_point")] SelectWithPoint { #[doc = "The response from the `SelectWithPoint` command."] data: SelectWithPoint, }, - #[doc = "The response from the `HighlightSetEntity` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "highlight_set_entity")] HighlightSetEntity { #[doc = "The response from the `HighlightSetEntity` command."] data: HighlightSetEntity, }, - #[doc = "The response from the `EntityGetChildUuid` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_child_uuid")] EntityGetChildUuid { #[doc = "The response from the `EntityGetChildUuid` command."] data: EntityGetChildUuid, }, - #[doc = "The response from the `EntityGetNumChildren` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_num_children")] EntityGetNumChildren { #[doc = "The response from the `EntityGetNumChildren` command."] data: EntityGetNumChildren, }, - #[doc = "The response from the `EntityGetParentId` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_parent_id")] EntityGetParentId { #[doc = "The response from the `EntityGetParentId` command."] data: EntityGetParentId, }, - #[doc = "The response from the `EntityGetAllChildUuids` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "entity_get_all_child_uuids")] EntityGetAllChildUuids { #[doc = "The response from the `EntityGetAllChildUuids` command."] data: EntityGetAllChildUuids, }, - #[doc = "The response from the `SelectGet` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "select_get")] SelectGet { #[doc = "The response from the `SelectGet` command."] data: SelectGet, }, - #[doc = "The response from the `GetEntityType` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "get_entity_type")] GetEntityType { #[doc = "The response from the `GetEntityType` command."] data: GetEntityType, }, - #[doc = "The response from the `Solid3dGetAllEdgeFaces` command."] + #[doc = "The response from the ` ` command."] + #[serde(rename = "entity_get_distance")] + EntityGetDistance { + #[doc = "The response from the `EntitiesGetDistance` command."] + data: EntityGetDistance, + }, + #[doc = "The response from the ` ` command."] + #[serde(rename = "entity_linear_pattern")] + EntityLinearPattern { + #[doc = "The response from the `EntityLinearPattern` command."] + data: EntityLinearPattern, + }, + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_all_edge_faces")] Solid3DGetAllEdgeFaces { #[doc = "The response from the `Solid3dGetAllEdgeFaces` command."] data: Solid3DGetAllEdgeFaces, }, - #[doc = "The response from the `Solid3dGetAllOppositeEdges` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_all_opposite_edges")] Solid3DGetAllOppositeEdges { #[doc = "The response from the `Solid3dGetAllOppositeEdges` command."] data: Solid3DGetAllOppositeEdges, }, - #[doc = "The response from the `Solid3dGetOppositeEdge` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_opposite_edge")] Solid3DGetOppositeEdge { #[doc = "The response from the `Solid3dGetOppositeEdge` command."] data: Solid3DGetOppositeEdge, }, - #[doc = "The response from the `Solid3dGetPrevAdjacentEdge` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_prev_adjacent_edge")] Solid3DGetPrevAdjacentEdge { #[doc = "The response from the `Solid3dGetPrevAdjacentEdge` command."] data: Solid3DGetPrevAdjacentEdge, }, - #[doc = "The response from the `Solid3dGetNextAdjacentEdge` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "solid3d_get_next_adjacent_edge")] Solid3DGetNextAdjacentEdge { #[doc = "The response from the `Solid3dGetNextAdjacentEdge` command."] data: Solid3DGetNextAdjacentEdge, }, - #[doc = "The response from the `MouseClick` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "mouse_click")] MouseClick { #[doc = "The response from the `MouseClick` command."] data: MouseClick, }, - #[doc = "The response from the `CurveGetType` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "curve_get_type")] CurveGetType { #[doc = "The response from the `CurveGetType` command."] data: CurveGetType, }, - #[doc = "The response from the `CurveGetControlPoints` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "curve_get_control_points")] CurveGetControlPoints { #[doc = "The response from the `CurveGetControlPoints` command."] data: CurveGetControlPoints, }, - #[doc = "The response from the `Take Snapshot` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "take_snapshot")] TakeSnapshot { #[doc = "The response from the `TakeSnapshot` command."] data: TakeSnapshot, }, - #[doc = "The response from the `Path Get Info` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "path_get_info")] PathGetInfo { #[doc = "The response from the `PathGetInfo` command."] data: PathGetInfo, }, - #[doc = "The response from the `Path Get Curve UUIDs for Vertices` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "path_get_curve_uuids_for_vertices")] PathGetCurveUuidsForVertices { #[doc = "The response from the `PathGetCurveUuidsForVertices` command."] data: PathGetCurveUuidsForVertices, }, - #[doc = "The response from the `Path Get Vertex UUIDs` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "path_get_vertex_uuids")] PathGetVertexUuids { #[doc = "The response from the `PathGetVertexUuids` command."] data: PathGetVertexUuids, }, - #[doc = "The response from the `PlaneIntersectAndProject` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "plane_intersect_and_project")] PlaneIntersectAndProject { #[doc = "Corresponding coordinates of given window coordinates, intersected on given plane."] data: PlaneIntersectAndProject, }, - #[doc = "The response from the `CurveGetEndPoints` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "curve_get_end_points")] CurveGetEndPoints { #[doc = "Endpoints of a curve"] data: CurveGetEndPoints, }, - #[doc = "The response from the `ImportFiles` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "import_files")] ImportFiles { #[doc = "Data from importing the files"] data: ImportFiles, }, - #[doc = "The response from the `Mass` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "mass")] Mass { #[doc = "The mass response."] data: Mass, }, - #[doc = "The response from the `Volume` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "volume")] Volume { #[doc = "The volume response."] data: Volume, }, - #[doc = "The response from the `Density` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "density")] Density { #[doc = "The density response."] data: Density, }, - #[doc = "The response from the `SurfaceArea` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "surface_area")] SurfaceArea { #[doc = "The surface area response."] data: SurfaceArea, }, - #[doc = "The response from the `CenterOfMass` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "center_of_mass")] CenterOfMass { #[doc = "The center of mass response."] data: CenterOfMass, }, - #[doc = "The response from the `GetSketchModePlane` command."] + #[doc = "The response from the ` ` command."] #[serde(rename = "get_sketch_mode_plane")] GetSketchModePlane { #[doc = "The plane for sketch mode."] @@ -7661,13 +7833,19 @@ pub enum OkWebSocketResponseData { serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] pub struct Onboarding { - #[doc = "When the user first called an endpoint from their machine (i.e. not a litterbox execution)"] + #[doc = "When the user first used the modeling app."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_call_from_modeling_app_date: Option, + #[doc = "When the user first used text-to-CAD."] + #[serde(default, skip_serializing_if = "Option::is_none")] + pub first_call_from_text_to_cad_date: Option, + #[doc = "When the user first called an endpoint from their machine (i.e. not a litterbox execution)."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_call_from_their_machine_date: Option, - #[doc = "When the user first used the litterbox"] + #[doc = "When the user first used the litterbox."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_litterbox_execute_date: Option, - #[doc = "When the user created their first token"] + #[doc = "When the user created their first token."] #[serde(default, skip_serializing_if = "Option::is_none")] pub first_token_date: Option, } @@ -7684,9 +7862,20 @@ impl std::fmt::Display for Onboarding { #[cfg(feature = "tabled")] impl tabled::Tabled for Onboarding { - const LENGTH: usize = 3; + const LENGTH: usize = 5; fn fields(&self) -> Vec> { vec![ + if let Some(first_call_from_modeling_app_date) = &self.first_call_from_modeling_app_date + { + format!("{:?}", first_call_from_modeling_app_date).into() + } else { + String::new().into() + }, + if let Some(first_call_from_text_to_cad_date) = &self.first_call_from_text_to_cad_date { + format!("{:?}", first_call_from_text_to_cad_date).into() + } else { + String::new().into() + }, if let Some(first_call_from_their_machine_date) = &self.first_call_from_their_machine_date { @@ -7709,6 +7898,8 @@ impl tabled::Tabled for Onboarding { fn headers() -> Vec> { vec![ + "first_call_from_modeling_app_date".into(), + "first_call_from_text_to_cad_date".into(), "first_call_from_their_machine_date".into(), "first_litterbox_execute_date".into(), "first_token_date".into(), @@ -7775,7 +7966,7 @@ pub enum OutputFormat { #[doc = "Specifies which kind of FBX will be exported."] storage: FbxStorage, }, - #[doc = "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export."] + #[doc = "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ASCII output, you can set that option for the export."] #[serde(rename = "gltf")] Gltf { #[doc = "Specifies how the JSON will be presented."] @@ -8027,20 +8218,16 @@ pub enum PathSegment { #[doc = "A circular arc segment."] #[serde(rename = "arc")] Arc { - #[doc = "End of the arc along circle's perimeter, in degrees. Deprecated: use `end` instead."] - angle_end: f64, - #[doc = "Start of the arc along circle's perimeter, in degrees. Deprecated: use `start` instead."] - angle_start: f64, #[doc = "Center of the circle"] center: Point2D, - #[doc = "End of the arc along circle's perimeter. If not given, this will use `degrees_end` instead."] - end: Option, + #[doc = "End of the arc along circle's perimeter."] + end: Angle, #[doc = "Radius of the circle"] radius: f64, #[doc = "Whether or not this arc is a relative offset"] relative: bool, - #[doc = "Start of the arc along circle's perimeter. If not given, this will use `degrees_start` instead."] - start: Option, + #[doc = "Start of the arc along circle's perimeter."] + start: Angle, }, #[doc = "A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point."] #[serde(rename = "bezier")] @@ -8473,7 +8660,7 @@ impl tabled::Tabled for Pong { } } -#[doc = "A raw file with unencoded contents to be passed over binary websockets."] +#[doc = "A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json."] #[derive( serde :: Serialize, serde :: Deserialize, PartialEq, Debug, Clone, schemars :: JsonSchema, )] diff --git a/spec.json b/spec.json index 048b8a50..7ea78a6e 100644 --- a/spec.json +++ b/spec.json @@ -1,11 +1,11 @@ { "openapi": "3.0.3", "info": { - "title": "KittyCAD API", - "description": "API server for KittyCAD", + "title": "Zoo API", + "description": "API server for Zoo", "contact": { - "url": "https://kittycad.io", - "email": "api@kittycad.io" + "url": "https://zoo.dev", + "email": "api@zoo.dev" }, "version": "0.1.0" }, @@ -138,7 +138,7 @@ "hidden" ], "summary": "Get the metadata about our currently running server.", - "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a KittyCAD employee to perform this request.", + "description": "This includes information on any of our other distributed systems it is connected to.\nYou must be a Zoo employee to perform this request.", "operationId": "get_metadata", "responses": { "200": { @@ -201,7 +201,7 @@ "hidden" ], "summary": "List all AI prompts.", - "description": "For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a KittyCAD employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.", + "description": "For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.\nThis endpoint requires authentication by a Zoo employee.\nThe AI prompts are returned in order of creation, with the most recently created AI prompts first.", "operationId": "list_ai_prompts", "parameters": [ { @@ -296,7 +296,7 @@ "hidden" ], "summary": "Get an AI prompt.", - "description": "This endpoint requires authentication by a KittyCAD employee.", + "description": "This endpoint requires authentication by a Zoo employee.", "operationId": "get_ai_prompt", "parameters": [ { @@ -368,8 +368,7 @@ "post": { "tags": [ "ai", - "beta", - "hidden" + "beta" ], "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.", @@ -520,7 +519,7 @@ "hidden" ], "summary": "Get API call metrics.", - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.", + "description": "This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.", "operationId": "get_api_call_metrics", "parameters": [ { @@ -598,7 +597,7 @@ "hidden" ], "summary": "List API calls.", - "description": "This endpoint requires authentication by a KittyCAD employee. The API calls are returned in order of creation, with the most recently created API calls first.", + "description": "This endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.", "operationId": "list_api_calls", "parameters": [ { @@ -693,7 +692,7 @@ "hidden" ], "summary": "Get details of an API call.", - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly KittyCAD employees can view API calls for other users.", + "description": "This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.\nIf the user is not authenticated to view the specified API call, then it is not returned.\nOnly Zoo employees can view API calls for other users.", "operationId": "get_api_call", "parameters": [ { @@ -768,7 +767,7 @@ "hidden" ], "summary": "Listen for callbacks to GitHub app authentication.", - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", "operationId": "apps_github_callback", "requestBody": { "content": { @@ -832,7 +831,7 @@ "hidden" ], "summary": "Get the consent URL for GitHub app authentication.", - "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos.\nThe user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", + "description": "This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.\nThe user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.", "operationId": "apps_github_consent", "responses": { "200": { @@ -1015,7 +1014,7 @@ "hidden" ], "summary": "List async operations.", - "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a KittyCAD employee.", + "description": "For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.\nThis endpoint requires authentication by a Zoo employee.", "operationId": "list_async_operations", "parameters": [ { @@ -1117,7 +1116,7 @@ "api-calls" ], "summary": "Get an async operation.", - "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly KittyCAD employees with the proper access can view async operations for other users.", + "description": "Get the status and output of an async operation.\nThis endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user.\nIf the user is not authenticated to view the specified async operation, then it is not returned.\nOnly Zoo employees with the proper access can view async operations for other users.", "operationId": "get_async_operation", "parameters": [ { @@ -1883,7 +1882,7 @@ "executor", "hidden" ], - "summary": "Execute a KittyCAD program in a specific language.", + "summary": "Execute a Zoo program in a specific language.", "operationId": "create_file_execution", "parameters": [ { @@ -2568,7 +2567,7 @@ "hidden" ], "summary": "Get an API token for a user by their discord id.", - "description": "This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their KittyCAD Account via oauth2 for this to work.\nYou must be a KittyCAD employee to use this endpoint.", + "description": "This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.\nYou must be a Zoo employee to use this endpoint.", "operationId": "internal_get_api_token_for_discord_user", "parameters": [ { @@ -4661,7 +4660,7 @@ "users" ], "summary": "Update your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.", + "description": "This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.", "operationId": "update_user_self", "requestBody": { "content": { @@ -4731,7 +4730,7 @@ "users" ], "summary": "Delete your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD'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.", + "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": { @@ -4839,7 +4838,7 @@ "api-calls" ], "summary": "List API calls for your user.", - "description": "This endpoint requires authentication by any KittyCAD 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.", + "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": [ { @@ -4933,7 +4932,7 @@ "api-calls" ], "summary": "Get an API call for a user.", - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the 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": [ { @@ -5007,7 +5006,7 @@ "api-tokens" ], "summary": "List API tokens for your user.", - "description": "This endpoint requires authentication by any KittyCAD 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.", + "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": [ { @@ -5099,7 +5098,7 @@ "api-tokens" ], "summary": "Create a new API token for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated 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", "responses": { "201": { @@ -5214,7 +5213,7 @@ "api-tokens" ], "summary": "Get an API token for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the 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": [ { @@ -5286,7 +5285,7 @@ "api-tokens" ], "summary": "Delete an API token for your user.", - "description": "This endpoint requires authentication by any KittyCAD 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.", + "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": [ { @@ -5474,70 +5473,6 @@ } } }, - "/user/front-hash": { - "get": { - "tags": [ - "users", - "hidden" - ], - "summary": "Get your user's front verification hash.", - "description": "This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser", - "operationId": "get_user_front_hash_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": { - "title": "String", - "type": "string" - } - } - } - }, - "4XX": { - "$ref": "#/components/responses/Error" - }, - "5XX": { - "$ref": "#/components/responses/Error" - } - } - } - }, "/user/onboarding": { "get": { "tags": [ @@ -5607,7 +5542,7 @@ "payments" ], "summary": "Get payment info about your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated 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": { @@ -5667,7 +5602,7 @@ "payments" ], "summary": "Update payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated 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": { @@ -5737,7 +5672,7 @@ "payments" ], "summary": "Create payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated 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": { @@ -5807,7 +5742,7 @@ "payments" ], "summary": "Delete payment info for your user.", - "description": "This includes billing address, phone, and name.\nThis endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated 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": { @@ -5915,7 +5850,7 @@ "payments" ], "summary": "Get balance for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated 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": { @@ -5978,7 +5913,7 @@ "hidden" ], "summary": "Create a payment intent for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated 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": { @@ -6093,7 +6028,7 @@ "payments" ], "summary": "List invoices for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.", + "description": "This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.", "operationId": "list_invoices_for_user", "responses": { "200": { @@ -6159,7 +6094,7 @@ "payments" ], "summary": "List payment methods for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated 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": { @@ -6226,7 +6161,7 @@ "hidden" ], "summary": "Delete a payment method for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated 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": [ { @@ -6357,7 +6292,7 @@ "hidden" ], "summary": "Validate a customer's information is correct and valid for automatic tax.", - "description": "This endpoint requires authentication by any KittyCAD 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.", + "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", "responses": { "204": { @@ -6412,7 +6347,7 @@ "users" ], "summary": "Get a session for your user.", - "description": "This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the 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": [ { @@ -6484,11 +6419,10 @@ "get": { "tags": [ "ai", - "beta", - "hidden" + "beta" ], "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 KittyCAD 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.", + "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": [ { @@ -6580,11 +6514,10 @@ "get": { "tags": [ "ai", - "beta", - "hidden" + "beta" ], "summary": "Get a text-to-CAD response.", - "description": "This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model.", + "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": [ { @@ -6654,11 +6587,10 @@ "post": { "tags": [ "ai", - "beta", - "hidden" + "beta" ], "summary": "Give feedback to a specific text-to-CAD response.", - "description": "This endpoint requires authentication by any KittyCAD user. The user must be the owner of the text-to-CAD model, in order to give feedback.", + "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": [ { @@ -6800,7 +6732,7 @@ "hidden" ], "summary": "List users.", - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "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": [ { @@ -6895,7 +6827,7 @@ "hidden" ], "summary": "List users with extended information.", - "description": "This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first.", + "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": [ { @@ -6990,7 +6922,7 @@ "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 KittyCAD user, you must be a KittyCAD employee.", + "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": [ { @@ -7064,7 +6996,7 @@ "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 KittyCAD user, you must be a KittyCAD employee.", + "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": [ { @@ -7138,7 +7070,7 @@ "hidden" ], "summary": "List API calls for a user.", - "description": "This endpoint requires authentication by any KittyCAD 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 KittyCAD 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.", + "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": [ { @@ -10283,6 +10215,50 @@ "coupon" ] }, + "DistanceType": { + "description": "The type of distance Distances can vary depending on the objects used as input.", + "oneOf": [ + { + "description": "Euclidean Distance.", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "euclidean" + ] + } + }, + "required": [ + "type" + ] + }, + { + "description": "The distance between objects along the specified axis", + "type": "object", + "properties": { + "axis": { + "description": "Global axis", + "allOf": [ + { + "$ref": "#/components/schemas/GlobalAxis" + } + ] + }, + "type": { + "type": "string", + "enum": [ + "on_axis" + ] + } + }, + "required": [ + "axis", + "type" + ] + } + ] + }, "EmailAuthenticationForm": { "description": "The body of the form for email authentication.", "type": "object", @@ -10334,6 +10310,26 @@ "entity_id" ] }, + "EntityGetDistance": { + "description": "The response from the `EntitiesGetDistance` command.", + "type": "object", + "properties": { + "max_distance": { + "description": "The maximum distance between the input entities.", + "type": "number", + "format": "double" + }, + "min_distance": { + "description": "The minimum distance between the input entities.", + "type": "number", + "format": "double" + } + }, + "required": [ + "max_distance", + "min_distance" + ] + }, "EntityGetNumChildren": { "description": "The response from the `EntityGetNumChildren` command.", "type": "object", @@ -10363,6 +10359,23 @@ "entity_id" ] }, + "EntityLinearPattern": { + "description": "The response from the `EntityLinearPattern` 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" + ] + }, "EntityType": { "description": "The type of entity", "type": "string", @@ -11503,6 +11516,32 @@ "z_axis" ] }, + "GlobalAxis": { + "description": "An enum that contains the three global axes.", + "oneOf": [ + { + "description": "The X axis", + "type": "string", + "enum": [ + "x" + ] + }, + { + "description": "The Y axis", + "type": "string", + "enum": [ + "y" + ] + }, + { + "description": "The Z axis", + "type": "string", + "enum": [ + "z" + ] + } + ] + }, "GltfPresentation": { "description": "Describes the presentation style of the glTF JSON.", "oneOf": [ @@ -11613,7 +11652,7 @@ ] }, "ImportFile": { - "description": "File to import into the current model", + "description": "File to import into the current model If you are sending binary data for a file, be sure to send the WebSocketRequest as binary/bson, not text/json.", "type": "object", "properties": { "data": { @@ -12843,7 +12882,7 @@ ] }, "source_unit": { - "description": "Select the unit interpretation of exported objects.\n\nThis is not the same as the export units. Setting export units is part of the format options.", + "description": "Select the unit interpretation of exported objects.", "allOf": [ { "$ref": "#/components/schemas/UnitLength" @@ -14492,6 +14531,164 @@ "object_id", "type" ] + }, + { + "description": "Sketch on some entity (e.g. a plane, a face)", + "type": "object", + "properties": { + "animated": { + "description": "Should we animate or snap for the camera transition?", + "type": "boolean" + }, + "entity_id": { + "description": "Which entity to sketch on.", + "type": "string", + "format": "uuid" + }, + "ortho": { + "description": "Should the camera use orthographic projection? In other words, should an object's size in the rendered image stay constant regardless of its distance from the camera.", + "type": "boolean" + }, + "type": { + "type": "string", + "enum": [ + "enable_sketch_mode" + ] + } + }, + "required": [ + "animated", + "entity_id", + "ortho", + "type" + ] + }, + { + "description": "Set the material properties of an object", + "type": "object", + "properties": { + "ambient_occlusion": { + "description": "Ambient Occlusion of the new material", + "type": "number", + "format": "float" + }, + "color": { + "description": "Color of the new material", + "allOf": [ + { + "$ref": "#/components/schemas/Color" + } + ] + }, + "metalness": { + "description": "Metalness of the new material", + "type": "number", + "format": "float" + }, + "object_id": { + "description": "Which object to change", + "type": "string", + "format": "uuid" + }, + "roughness": { + "description": "Roughness of the new material", + "type": "number", + "format": "float" + }, + "type": { + "type": "string", + "enum": [ + "object_set_material_params_pbr" + ] + } + }, + "required": [ + "ambient_occlusion", + "color", + "metalness", + "object_id", + "roughness", + "type" + ] + }, + { + "description": "What is the distance between these two entities?", + "type": "object", + "properties": { + "distance_type": { + "description": "Type of distance to be measured.", + "allOf": [ + { + "$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 copites", + "allOf": [ + { + "$ref": "#/components/schemas/Point3d" + } + ] + }, + "entity_id": { + "description": "ID of the entity being copied.", + "type": "string", + "format": "uuid" + }, + "num_repetitions": { + "description": "Number of repetitions to make.", + "type": "integer", + "format": "uint32", + "minimum": 0 + }, + "spacing": { + "description": "Spacing between repetitions.", + "type": "number", + "format": "double" + }, + "type": { + "type": "string", + "enum": [ + "entity_linear_pattern" + ] + } + }, + "required": [ + "axis", + "entity_id", + "num_repetitions", + "spacing", + "type" + ] } ] }, @@ -14648,7 +14845,7 @@ ] }, { - "description": "The response from the `Export` command. When this is being performed over a websocket, this is sent as binary not JSON. The binary data can be deserialized as `bincode` into a `Vec`.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14667,7 +14864,7 @@ ] }, { - "description": "The response from the `SelectWithPoint` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14686,7 +14883,7 @@ ] }, { - "description": "The response from the `HighlightSetEntity` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14705,7 +14902,7 @@ ] }, { - "description": "The response from the `EntityGetChildUuid` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14724,7 +14921,7 @@ ] }, { - "description": "The response from the `EntityGetNumChildren` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14743,7 +14940,7 @@ ] }, { - "description": "The response from the `EntityGetParentId` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14762,7 +14959,7 @@ ] }, { - "description": "The response from the `EntityGetAllChildUuids` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14781,7 +14978,7 @@ ] }, { - "description": "The response from the `SelectGet` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14800,7 +14997,7 @@ ] }, { - "description": "The response from the `GetEntityType` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14819,7 +15016,45 @@ ] }, { - "description": "The response from the `Solid3dGetAllEdgeFaces` command.", + "description": "The response from the ` ` command.", + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EntityGetDistance" + }, + "type": { + "type": "string", + "enum": [ + "entity_get_distance" + ] + } + }, + "required": [ + "data", + "type" + ] + }, + { + "description": "The response from the ` ` command.", + "type": "object", + "properties": { + "data": { + "$ref": "#/components/schemas/EntityLinearPattern" + }, + "type": { + "type": "string", + "enum": [ + "entity_linear_pattern" + ] + } + }, + "required": [ + "data", + "type" + ] + }, + { + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14838,7 +15073,7 @@ ] }, { - "description": "The response from the `Solid3dGetAllOppositeEdges` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14857,7 +15092,7 @@ ] }, { - "description": "The response from the `Solid3dGetOppositeEdge` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14876,7 +15111,7 @@ ] }, { - "description": "The response from the `Solid3dGetPrevAdjacentEdge` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14895,7 +15130,7 @@ ] }, { - "description": "The response from the `Solid3dGetNextAdjacentEdge` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14914,7 +15149,7 @@ ] }, { - "description": "The response from the `MouseClick` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14933,7 +15168,7 @@ ] }, { - "description": "The response from the `CurveGetType` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14952,7 +15187,7 @@ ] }, { - "description": "The response from the `CurveGetControlPoints` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14971,7 +15206,7 @@ ] }, { - "description": "The response from the `Take Snapshot` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -14990,7 +15225,7 @@ ] }, { - "description": "The response from the `Path Get Info` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15009,7 +15244,7 @@ ] }, { - "description": "The response from the `Path Get Curve UUIDs for Vertices` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15028,7 +15263,7 @@ ] }, { - "description": "The response from the `Path Get Vertex UUIDs` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15047,7 +15282,7 @@ ] }, { - "description": "The response from the `PlaneIntersectAndProject` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15066,7 +15301,7 @@ ] }, { - "description": "The response from the `CurveGetEndPoints` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15085,7 +15320,7 @@ ] }, { - "description": "The response from the `ImportFiles` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15104,7 +15339,7 @@ ] }, { - "description": "The response from the `Mass` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15123,7 +15358,7 @@ ] }, { - "description": "The response from the `Volume` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15142,7 +15377,7 @@ ] }, { - "description": "The response from the `Density` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15161,7 +15396,7 @@ ] }, { - "description": "The response from the `SurfaceArea` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15180,7 +15415,7 @@ ] }, { - "description": "The response from the `CenterOfMass` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15199,7 +15434,7 @@ ] }, { - "description": "The response from the `GetSketchModePlane` command.", + "description": "The response from the ` ` command.", "type": "object", "properties": { "data": { @@ -15405,16 +15640,24 @@ "description": "Onboarding details", "type": "object", "properties": { + "first_call_from_modeling_app_date": { + "description": "When the user first used the modeling app.", + "type": "string" + }, + "first_call_from_text_to_cad_date": { + "description": "When the user first used text-to-CAD.", + "type": "string" + }, "first_call_from_their_machine_date": { - "description": "When the user first called an endpoint from their machine (i.e. not a litterbox execution)", + "description": "When the user first called an endpoint from their machine (i.e. not a litterbox execution).", "type": "string" }, "first_litterbox_execute_date": { - "description": "When the user first used the litterbox", + "description": "When the user first used the litterbox.", "type": "string" }, "first_token_date": { - "description": "When the user created their first token", + "description": "When the user created their first token.", "type": "string" } } @@ -15463,7 +15706,7 @@ ] }, { - "description": "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ascii output, you can set that option for the export.", + "description": "glTF 2.0. We refer to this as glTF since that is how our customers refer to it, although by default it will be in binary format and thus technically (glb). If you prefer ASCII output, you can set that option for the export.", "type": "object", "properties": { "presentation": { @@ -15774,18 +16017,6 @@ "description": "A circular arc segment.", "type": "object", "properties": { - "angle_end": { - "deprecated": true, - "description": "End of the arc along circle's perimeter, in degrees. Deprecated: use `end` instead.", - "type": "number", - "format": "double" - }, - "angle_start": { - "deprecated": true, - "description": "Start of the arc along circle's perimeter, in degrees. Deprecated: use `start` instead.", - "type": "number", - "format": "double" - }, "center": { "description": "Center of the circle", "allOf": [ @@ -15795,8 +16026,7 @@ ] }, "end": { - "nullable": true, - "description": "End of the arc along circle's perimeter. If not given, this will use `degrees_end` instead.", + "description": "End of the arc along circle's perimeter.", "allOf": [ { "$ref": "#/components/schemas/Angle" @@ -15813,8 +16043,7 @@ "type": "boolean" }, "start": { - "nullable": true, - "description": "Start of the arc along circle's perimeter. If not given, this will use `degrees_start` instead.", + "description": "Start of the arc along circle's perimeter.", "allOf": [ { "$ref": "#/components/schemas/Angle" @@ -15829,11 +16058,11 @@ } }, "required": [ - "angle_end", - "angle_start", "center", + "end", "radius", "relative", + "start", "type" ] }, @@ -16172,7 +16401,7 @@ ] }, "RawFile": { - "description": "A raw file with unencoded contents to be passed over binary websockets.", + "description": "A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json.", "type": "object", "properties": { "contents": {