diff --git a/VERSION.txt b/VERSION.txt index 66b2ead..66e8f47 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -v0.2.28 +v0.2.29 diff --git a/examples_test.go b/examples_test.go index 6c24c63..7341fd8 100644 --- a/examples_test.go +++ b/examples_test.go @@ -80,7 +80,7 @@ func ExampleMetaService_GetAiPluginManifest() { // Getdata: Get the metadata about our currently running server. // This includes information on any of our other distributed systems it is connected to. -// You must be a KittyCAD employee to perform this request. +// You must be a Zoo employee to perform this request. func ExampleMetaService_Getdata() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -96,8 +96,60 @@ func ExampleMetaService_Getdata() { } +// ListPrompts: List all AI prompts. +// For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested. +// This endpoint requires authentication by a Zoo employee. +// The AI prompts are returned in order of creation, with the most recently created AI prompts first. +// +// Parameters +// +// - `limit` +// +// - `pageToken` +// +// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// +// Currently, we only support scanning in ascending order. +func ExampleAiService_ListPrompts() { + client, err := kittycad.NewClientFromEnv("your apps user agent") + if err != nil { + panic(err) + } + + result, err := client.Ai.ListPrompts(123, "some-string", "") + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + +} + +// GetPrompt: Get an AI prompt. +// This endpoint requires authentication by a Zoo employee. +// +// Parameters +// +// - `id` +func ExampleAiService_GetPrompt() { + client, err := kittycad.NewClientFromEnv("your apps user agent") + if err != nil { + panic(err) + } + + result, err := client.Ai.GetPrompt(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + +} + // CreateTextToCad: Generate a CAD model from text. +// 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. // This 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. +// One 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`. // This 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. // // Parameters @@ -120,7 +172,7 @@ func ExampleAiService_CreateTextToCad() { } // GetMetrics: Get API call metrics. -// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed. +// This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed. // // Parameters // @@ -141,7 +193,7 @@ func ExampleAPICallService_GetMetrics() { } // List: List API calls. -// 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. +// 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. // // Parameters // @@ -168,9 +220,9 @@ func ExampleAPICallService_List() { } // Get: Get details of an API call. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user. // If the user is not authenticated to view the specified API call, then it is not returned. -// Only KittyCAD employees can view API calls for other users. +// Only Zoo employees can view API calls for other users. // // Parameters // @@ -181,7 +233,7 @@ func ExampleAPICallService_Get() { panic(err) } - result, err := client.APICall.Get("some-string") + result, err := client.APICall.Get(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) if err != nil { panic(err) } @@ -191,8 +243,8 @@ func ExampleAPICallService_Get() { } // GithubCallback: Listen for callbacks to GitHub app authentication. -// This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -// The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. +// This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos. +// The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. // // Parameters // @@ -210,8 +262,8 @@ func ExampleAppService_GithubCallback() { } // GithubConsent: Get the consent URL for GitHub app authentication. -// This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -// The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. +// This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos. +// The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. func ExampleAppService_GithubConsent() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -247,7 +299,7 @@ func ExampleAppService_GithubWebhook() { // ListAsyncOperations: List async operations. // 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. -// This endpoint requires authentication by a KittyCAD employee. +// This endpoint requires authentication by a Zoo employee. // // Parameters // @@ -277,9 +329,9 @@ func ExampleAPICallService_ListAsyncOperations() { // GetAsyncOperation: Get an async operation. // Get the status and output of an async operation. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user. // If the user is not authenticated to view the specified async operation, then it is not returned. -// Only KittyCAD employees with the proper access can view async operations for other users. +// Only Zoo employees with the proper access can view async operations for other users. // // Parameters // @@ -338,7 +390,7 @@ func ExampleHiddenService_AuthEmailCallback() { // CreateCenterOfMass: Get CAD file center of mass. // We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -// This endpoint returns the cartesian co-ordinate in world space measure units. +// This endpoint returns the cartesian coordinate in world space measure units. // In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. // Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. // If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -418,7 +470,7 @@ func ExampleFileService_CreateDensity() { } -// CreateFileExecution: Execute a KittyCAD program in a specific language. +// CreateFileExecution: Execute a Zoo program in a specific language. // Parameters // // - `lang`: The language code is written in. @@ -522,6 +574,28 @@ func ExampleFileService_CreateVolume() { } +// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id. +// 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. +// You must be a Zoo employee to use this endpoint. +// +// Parameters +// +// - `discordId` +func ExampleMetaService_InternalGetAPITokenForDiscordUser() { + client, err := kittycad.NewClientFromEnv("your apps user agent") + if err != nil { + panic(err) + } + + result, err := client.Meta.InternalGetAPITokenForDiscordUser("some-string") + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + +} + // Logout: This endpoint removes the session cookie for a user. // This is used in logout scenarios. func ExampleHiddenService_Logout() { @@ -994,7 +1068,7 @@ func ExampleUserService_GetSelf() { } // UpdateSelf: Update your user. -// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user. +// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user. // // Parameters // @@ -1015,7 +1089,7 @@ func ExampleUserService_UpdateSelf() { } // DeleteSelf: Delete your user. -// This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. +// This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database. // This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. func ExampleUserService_DeleteSelf() { client, err := kittycad.NewClientFromEnv("your apps user agent") @@ -1030,7 +1104,7 @@ func ExampleUserService_DeleteSelf() { } // UserList: List API calls for your user. -// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. +// This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user. // The API calls are returned in order of creation, with the most recently created API calls first. // // Parameters @@ -1058,7 +1132,7 @@ func ExampleAPICallService_UserList() { } // GetForUser: Get an API call for a user. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user. // // Parameters // @@ -1069,7 +1143,7 @@ func ExampleAPICallService_GetForUser() { panic(err) } - result, err := client.APICall.GetForUser("some-string") + result, err := client.APICall.GetForUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) if err != nil { panic(err) } @@ -1079,7 +1153,7 @@ func ExampleAPICallService_GetForUser() { } // ListForUser: List API tokens for your user. -// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. +// This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user. // The API tokens are returned in order of creation, with the most recently created API tokens first. // // Parameters @@ -1107,7 +1181,7 @@ func ExampleAPITokenService_ListForUser() { } // CreateForUser: Create a new API token for your user. -// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user. +// This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user. func ExampleAPITokenService_CreateForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1124,7 +1198,7 @@ func ExampleAPITokenService_CreateForUser() { } // GetForUser: Get an API token for your user. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user. // // Parameters // @@ -1145,7 +1219,7 @@ func ExampleAPITokenService_GetForUser() { } // DeleteForUser: Delete an API token for your user. -// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. +// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user. // 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. // // Parameters @@ -1181,23 +1255,6 @@ func ExampleUserService_GetSelfExtended() { } -// GetFrontHashSelf: Get your user's front verification hash. -// This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser -func ExampleUserService_GetFrontHashSelf() { - client, err := kittycad.NewClientFromEnv("your apps user agent") - if err != nil { - panic(err) - } - - result, err := client.User.GetFrontHashSelf() - if err != nil { - panic(err) - } - - fmt.Printf("%#v", result) - -} - // GetOnboardingSelf: Get your user's onboarding status. // Checks key part of their api usage to determine their onboarding progress func ExampleUserService_GetOnboardingSelf() { @@ -1217,7 +1274,7 @@ func ExampleUserService_GetOnboardingSelf() { // GetInformationForUser: Get payment info about your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user. func ExamplePaymentService_GetInformationForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1235,7 +1292,7 @@ func ExamplePaymentService_GetInformationForUser() { // CreateInformationForUser: Create payment info for your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user. // // Parameters // @@ -1246,7 +1303,7 @@ func ExamplePaymentService_CreateInformationForUser() { panic(err) } - result, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", UserID: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"}) + result, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", UserID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"}) if err != nil { panic(err) } @@ -1257,7 +1314,7 @@ func ExamplePaymentService_CreateInformationForUser() { // UpdateInformationForUser: Update payment info for your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user. // // Parameters // @@ -1268,7 +1325,7 @@ func ExamplePaymentService_UpdateInformationForUser() { panic(err) } - result, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", UserID: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"}) + result, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", UserID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"}) if err != nil { panic(err) } @@ -1279,7 +1336,7 @@ func ExamplePaymentService_UpdateInformationForUser() { // DeleteInformationForUser: Delete payment info for your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user. func ExamplePaymentService_DeleteInformationForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1293,7 +1350,7 @@ func ExamplePaymentService_DeleteInformationForUser() { } // GetBalanceForUser: Get balance for your user. -// This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user. func ExamplePaymentService_GetBalanceForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1310,7 +1367,7 @@ func ExamplePaymentService_GetBalanceForUser() { } // CreateIntentForUser: Create a payment intent for your user. -// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user. +// This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user. func ExamplePaymentService_CreateIntentForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1327,7 +1384,7 @@ func ExamplePaymentService_CreateIntentForUser() { } // ListInvoicesForUser: List invoices for your user. -// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user. +// This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user. func ExamplePaymentService_ListInvoicesForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1344,7 +1401,7 @@ func ExamplePaymentService_ListInvoicesForUser() { } // ListMethodsForUser: List payment methods for your user. -// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user. +// This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user. func ExamplePaymentService_ListMethodsForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1361,7 +1418,7 @@ func ExamplePaymentService_ListMethodsForUser() { } // DeleteMethodForUser: Delete a payment method for your user. -// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user. +// This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user. // // Parameters // @@ -1379,7 +1436,7 @@ func ExamplePaymentService_DeleteMethodForUser() { } // ValidateCustomerTaxInformationForUser: Validate a customer's information is correct and valid for automatic tax. -// 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. +// 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. func ExamplePaymentService_ValidateCustomerTaxInformationForUser() { client, err := kittycad.NewClientFromEnv("your apps user agent") if err != nil { @@ -1393,7 +1450,7 @@ func ExamplePaymentService_ValidateCustomerTaxInformationForUser() { } // GetSessionFor: Get a session for your user. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user. // // Parameters // @@ -1414,7 +1471,8 @@ func ExampleUserService_GetSessionFor() { } // ListTextToCadModelsForUser: List text-to-CAD models you've generated. -// This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user. +// This will always return the STEP file contents as well as the format the user originally requested. +// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user. // The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first. // // Parameters @@ -1441,8 +1499,29 @@ func ExampleAiService_ListTextToCadModelsForUser() { } +// GetTextToCadModelForUser: Get a text-to-CAD response. +// This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model. +// +// Parameters +// +// - `id` +func ExampleAiService_GetTextToCadModelForUser() { + client, err := kittycad.NewClientFromEnv("your apps user agent") + if err != nil { + panic(err) + } + + result, err := client.Ai.GetTextToCadModelForUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")) + if err != nil { + panic(err) + } + + fmt.Printf("%#v", result) + +} + // CreateTextToCadModelFeedback: Give feedback to a specific text-to-CAD response. -// 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. +// 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. // // Parameters // @@ -1461,7 +1540,7 @@ func ExampleAiService_CreateTextToCadModelFeedback() { } // List: List users. -// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. +// This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first. // // Parameters // @@ -1488,7 +1567,7 @@ func ExampleUserService_List() { } // ListExtended: List users with extended information. -// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. +// This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first. // // Parameters // @@ -1517,7 +1596,7 @@ func ExampleUserService_ListExtended() { // GetExtended: Get extended information about a user. // 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. // Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. -// To get information about any KittyCAD user, you must be a KittyCAD employee. +// To get information about any Zoo user, you must be a Zoo employee. // // Parameters // @@ -1540,7 +1619,7 @@ func ExampleUserService_GetExtended() { // Get: Get a user. // To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user. // Alternatively, to get information about the authenticated user, use `/user` endpoint. -// To get information about any KittyCAD user, you must be a KittyCAD employee. +// To get information about any Zoo user, you must be a Zoo employee. // // Parameters // @@ -1561,9 +1640,9 @@ func ExampleUserService_Get() { } // ListForUser: List API calls for a user. -// 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. +// 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. // Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. -// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. +// If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id. // The API calls are returned in order of creation, with the most recently created API calls first. // // Parameters diff --git a/kittycad.go.patch.json b/kittycad.go.patch.json index 810eaad..4ed3ceb 100644 --- a/kittycad.go.patch.json +++ b/kittycad.go.patch.json @@ -25,7 +25,7 @@ }, { "value": { - "example": "// Getdata: 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.\n// \n// Getdata: Get the metadata about our currently running server.\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.\nfunc ExampleMetaService_Getdata() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.Getdata()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// Getdata: 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.\n// \n// Getdata: Get the metadata about our currently running server.\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.\nfunc ExampleMetaService_Getdata() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.Getdata()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.Getdata" }, "op": "add", @@ -33,7 +33,23 @@ }, { "value": { - "example": "// CreateTextToCad: Generate a CAD model from text.\n// \n// This 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.\n// This 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.\n// \n// \n// Parameters\n// \n// \t- `outputFormat`: The valid types of output file formats.\n// \t- `body`: Body for generating models from text.\n// \n// CreateTextToCad: Generate a CAD model from text.\n// This 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.\n// This 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.\n//\n// Parameters\n//\n// - `outputFormat`: The valid types of output file formats.\n// - `body`: Body for generating models from text.\nfunc ExampleAiService_CreateTextToCad() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.CreateTextToCad(\"\", kittycad.TextToCadCreateBody{Prompt: \"some-string\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListPrompts: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListPrompts: List all AI prompts.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAiService_ListPrompts() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.ListPrompts(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.ListPrompts" + }, + "op": "add", + "path": "/paths/~1ai-prompts/get/x-go" + }, + { + "value": { + "example": "// GetPrompt: Get an AI prompt.\n// \n// This endpoint requires authentication by a Zoo employee.\n// \n// \n// Parameters\n// \n// \t- `id`\n// \n// GetPrompt: Get an AI prompt.\n// This endpoint requires authentication by a Zoo employee.\n//\n// Parameters\n//\n// - `id`\nfunc ExampleAiService_GetPrompt() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.GetPrompt(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.GetPrompt" + }, + "op": "add", + "path": "/paths/~1ai-prompts~1{id}/get/x-go" + }, + { + "value": { + "example": "// CreateTextToCad: Generate a CAD model from text.\n// \n// 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.\n// This 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.\n// One 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`.\n// This 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.\n// \n// \n// Parameters\n// \n// \t- `outputFormat`: The valid types of output file formats.\n// \t- `body`: Body for generating models from text.\n// \n// CreateTextToCad: Generate a CAD model from text.\n// 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.\n// This 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.\n// One 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`.\n// This 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.\n//\n// Parameters\n//\n// - `outputFormat`: The valid types of output file formats.\n// - `body`: Body for generating models from text.\nfunc ExampleAiService_CreateTextToCad() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.CreateTextToCad(\"\", kittycad.TextToCadCreateBody{Prompt: \"some-string\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.CreateTextToCad" }, "op": "add", @@ -41,7 +57,7 @@ }, { "value": { - "example": "// GetMetrics: 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// \n// Parameters\n// \n// \t- `groupBy`: The field of an API call to group by.\n// \n// GetMetrics: Get API call metrics.\n// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed.\n//\n// Parameters\n//\n// - `groupBy`: The field of an API call to group by.\nfunc ExampleAPICallService_GetMetrics() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.GetMetrics(\"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetMetrics: 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// \n// Parameters\n// \n// \t- `groupBy`: The field of an API call to group by.\n// \n// GetMetrics: Get API call metrics.\n// This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.\n//\n// Parameters\n//\n// - `groupBy`: The field of an API call to group by.\nfunc ExampleAPICallService_GetMetrics() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.GetMetrics(\"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetMetrics" }, "op": "add", @@ -49,7 +65,7 @@ }, { "value": { - "example": "// List: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// List: List API calls.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPICallService_List() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.List(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// List: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// List: List API calls.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPICallService_List() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.List(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.List" }, "op": "add", @@ -57,7 +73,7 @@ }, { "value": { - "example": "// Get: 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// \n// Parameters\n// \n// \t- `id`\n// \n// Get: Get details of an API call.\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`\nfunc ExampleAPICallService_Get() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.Get(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// Get: 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// \n// Parameters\n// \n// \t- `id`\n// \n// Get: Get details of an API call.\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`\nfunc ExampleAPICallService_Get() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.Get(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.Get" }, "op": "add", @@ -65,7 +81,7 @@ }, { "value": { - "example": "// GithubCallback: 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.\n// \n// \n// Parameters\n// \n// \t- `body`\n// \n// GithubCallback: Listen for callbacks to GitHub app authentication.\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.\n//\n// Parameters\n//\n// - `body`\nfunc ExampleAppService_GithubCallback() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.App.GithubCallback(\"\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// GithubCallback: 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.\n// \n// \n// Parameters\n// \n// \t- `body`\n// \n// GithubCallback: Listen for callbacks to GitHub app authentication.\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.\n//\n// Parameters\n//\n// - `body`\nfunc ExampleAppService_GithubCallback() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.App.GithubCallback(\"\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AppService.GithubCallback" }, "op": "add", @@ -73,7 +89,7 @@ }, { "value": { - "example": "// GithubConsent: 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.\n// \n// GithubConsent: Get the consent URL for GitHub app authentication.\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.\nfunc ExampleAppService_GithubConsent() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.App.GithubConsent()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GithubConsent: 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.\n// \n// GithubConsent: Get the consent URL for GitHub app authentication.\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.\nfunc ExampleAppService_GithubConsent() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.App.GithubConsent()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AppService.GithubConsent" }, "op": "add", @@ -89,7 +105,7 @@ }, { "value": { - "example": "// ListAsyncOperations: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \t- `status`: The status of an async API call.\n// \n// ListAsyncOperations: List async operations.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\n//\n// - `status`: The status of an async API call.\nfunc ExampleAPICallService_ListAsyncOperations() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.ListAsyncOperations(123, \"some-string\", \"\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListAsyncOperations: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \t- `status`: The status of an async API call.\n// \n// ListAsyncOperations: List async operations.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\n//\n// - `status`: The status of an async API call.\nfunc ExampleAPICallService_ListAsyncOperations() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.ListAsyncOperations(123, \"some-string\", \"\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListAsyncOperations" }, "op": "add", @@ -97,7 +113,7 @@ }, { "value": { - "example": "// GetAsyncOperation: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetAsyncOperation: Get an async operation.\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`\nfunc ExampleAPICallService_GetAsyncOperation() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.GetAsyncOperation(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetAsyncOperation: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetAsyncOperation: Get an async operation.\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`\nfunc ExampleAPICallService_GetAsyncOperation() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.GetAsyncOperation(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetAsyncOperation" }, "op": "add", @@ -121,7 +137,7 @@ }, { "value": { - "example": "// CreateCenterOfMass: Get CAD file center of mass.\n// \n// We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\n// This endpoint returns the cartesian co-ordinate in world space measure units.\n// In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\n// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n// \n// \n// Parameters\n// \n// \t- `outputUnit`: The valid types of length units.\n// \t- `srcFormat`: The valid types of source file formats.\n// \t- `body`\n// \n// CreateCenterOfMass: Get CAD file center of mass.\n// We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\n// This endpoint returns the cartesian co-ordinate in world space measure units.\n// In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\n// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters\n//\n// - `outputUnit`: The valid types of length units.\n// - `srcFormat`: The valid types of source file formats.\n// - `body`\nfunc ExampleFileService_CreateCenterOfMass() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.File.CreateCenterOfMass(\"\", \"\", []byte(\"some-binary\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// CreateCenterOfMass: Get CAD file center of mass.\n// \n// We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\n// This endpoint returns the cartesian coordinate in world space measure units.\n// In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\n// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n// \n// \n// Parameters\n// \n// \t- `outputUnit`: The valid types of length units.\n// \t- `srcFormat`: The valid types of source file formats.\n// \t- `body`\n// \n// CreateCenterOfMass: Get CAD file center of mass.\n// We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.\n// This endpoint returns the cartesian coordinate in world space measure units.\n// In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.\n// Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.\n// If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.\n//\n// Parameters\n//\n// - `outputUnit`: The valid types of length units.\n// - `srcFormat`: The valid types of source file formats.\n// - `body`\nfunc ExampleFileService_CreateCenterOfMass() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.File.CreateCenterOfMass(\"\", \"\", []byte(\"some-binary\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#FileService.CreateCenterOfMass" }, "op": "add", @@ -145,7 +161,7 @@ }, { "value": { - "example": "// CreateFileExecution: Execute a KittyCAD program in a specific language.\n// \n// \n// Parameters\n// \n// \t- `lang`: The language code is written in.\n// \t- `output`\n// \t- `body`\n// \n// CreateFileExecution: Execute a KittyCAD program in a specific language.\n// Parameters\n//\n// - `lang`: The language code is written in.\n// - `output`\n// - `body`\nfunc ExampleExecutorService_CreateFileExecution() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Executor.CreateFileExecution(\"\", \"some-string\", []byte(\"some-binary\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// CreateFileExecution: Execute a Zoo program in a specific language.\n// \n// \n// Parameters\n// \n// \t- `lang`: The language code is written in.\n// \t- `output`\n// \t- `body`\n// \n// CreateFileExecution: Execute a Zoo program in a specific language.\n// Parameters\n//\n// - `lang`: The language code is written in.\n// - `output`\n// - `body`\nfunc ExampleExecutorService_CreateFileExecution() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Executor.CreateFileExecution(\"\", \"some-string\", []byte(\"some-binary\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#ExecutorService.CreateFileExecution" }, "op": "add", @@ -175,6 +191,14 @@ "op": "add", "path": "/paths/~1file~1volume/post/x-go" }, + { + "value": { + "example": "// InternalGetAPITokenForDiscordUser: 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// \n// Parameters\n// \n// \t- `discordId`\n// \n// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id.\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// - `discordId`\nfunc ExampleMetaService_InternalGetAPITokenForDiscordUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Meta.InternalGetAPITokenForDiscordUser(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#MetaService.InternalGetAPITokenForDiscordUser" + }, + "op": "add", + "path": "/paths/~1internal~1discord~1api-token~1{discord_id}/get/x-go" + }, { "value": { "example": "// Logout: This endpoint removes the session cookie for a user.\n// \n// This is used in logout scenarios.\n// \n// Logout: This endpoint removes the session cookie for a user.\n// This is used in logout scenarios.\nfunc ExampleHiddenService_Logout() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Hidden.Logout(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", @@ -353,7 +377,7 @@ }, { "value": { - "example": "// DeleteSelf: 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.\n// \n// DeleteSelf: Delete your user.\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.\nfunc ExampleUserService_DeleteSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.User.DeleteSelf(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// DeleteSelf: 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.\n// \n// DeleteSelf: Delete your user.\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.\nfunc ExampleUserService_DeleteSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.User.DeleteSelf(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.DeleteSelf" }, "op": "add", @@ -369,7 +393,7 @@ }, { "value": { - "example": "// UpdateSelf: Update your user.\n// \n// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The user-modifiable parts of a User.\n// \n// UpdateSelf: Update your user.\n// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user.\n//\n// Parameters\n//\n// - `body`: The user-modifiable parts of a User.\nfunc ExampleUserService_UpdateSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.UpdateSelf(kittycad.UpdateUser{Company: \"some-string\", Discord: \"some-string\", FirstName: \"some-string\", Github: \"some-string\", LastName: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// UpdateSelf: Update your user.\n// \n// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n// \n// \n// Parameters\n// \n// \t- `body`: The user-modifiable parts of a User.\n// \n// UpdateSelf: Update your user.\n// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.\n//\n// Parameters\n//\n// - `body`: The user-modifiable parts of a User.\nfunc ExampleUserService_UpdateSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.UpdateSelf(kittycad.UpdateUser{Company: \"some-string\", Discord: \"some-string\", FirstName: \"some-string\", Github: \"some-string\", LastName: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.UpdateSelf" }, "op": "add", @@ -377,7 +401,7 @@ }, { "value": { - "example": "// UserList: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// UserList: List API calls for your user.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPICallService_UserList() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.UserList(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// UserList: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// UserList: List API calls for your user.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPICallService_UserList() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.UserList(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.UserList" }, "op": "add", @@ -385,7 +409,7 @@ }, { "value": { - "example": "// GetForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetForUser: Get an API call for a user.\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`\nfunc ExampleAPICallService_GetForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.GetForUser(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetForUser: Get an API call for a user.\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`\nfunc ExampleAPICallService_GetForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.GetForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.GetForUser" }, "op": "add", @@ -393,7 +417,7 @@ }, { "value": { - "example": "// ListForUser: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListForUser: List API tokens for your user.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPITokenService_ListForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.ListForUser(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListForUser: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListForUser: List API tokens for your user.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPITokenService_ListForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.ListForUser(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.ListForUser" }, "op": "add", @@ -401,7 +425,7 @@ }, { "value": { - "example": "// CreateForUser: 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.\n// \n// CreateForUser: Create a new API token for your user.\n// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user.\nfunc ExampleAPITokenService_CreateForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.CreateForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// CreateForUser: 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.\n// \n// CreateForUser: Create a new API token for your user.\n// This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.\nfunc ExampleAPITokenService_CreateForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.CreateForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.CreateForUser" }, "op": "add", @@ -409,7 +433,7 @@ }, { "value": { - "example": "// DeleteForUser: 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// \n// Parameters\n// \n// \t- `token`\n// \n// DeleteForUser: Delete an API token for your user.\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`\nfunc ExampleAPITokenService_DeleteForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.APIToken.DeleteForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// DeleteForUser: 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// \n// Parameters\n// \n// \t- `token`\n// \n// DeleteForUser: Delete an API token for your user.\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`\nfunc ExampleAPITokenService_DeleteForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.APIToken.DeleteForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\")); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.DeleteForUser" }, "op": "add", @@ -417,7 +441,7 @@ }, { "value": { - "example": "// GetForUser: 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// \n// Parameters\n// \n// \t- `token`\n// \n// GetForUser: Get an API token for your user.\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`\nfunc ExampleAPITokenService_GetForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.GetForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetForUser: 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// \n// Parameters\n// \n// \t- `token`\n// \n// GetForUser: Get an API token for your user.\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`\nfunc ExampleAPITokenService_GetForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APIToken.GetForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APITokenService.GetForUser" }, "op": "add", @@ -431,14 +455,6 @@ "op": "add", "path": "/paths/~1user~1extended/get/x-go" }, - { - "value": { - "example": "// GetFrontHashSelf: 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\n// \n// GetFrontHashSelf: Get your user's front verification hash.\n// This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser\nfunc ExampleUserService_GetFrontHashSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetFrontHashSelf()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", - "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetFrontHashSelf" - }, - "op": "add", - "path": "/paths/~1user~1front-hash/get/x-go" - }, { "value": { "example": "// GetOnboardingSelf: Get your user's onboarding status.\n// \n// Checks key part of their api usage to determine their onboarding progress\n// \n// GetOnboardingSelf: Get your user's onboarding status.\n// Checks key part of their api usage to determine their onboarding progress\nfunc ExampleUserService_GetOnboardingSelf() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetOnboardingSelf()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", @@ -449,7 +465,7 @@ }, { "value": { - "example": "// DeleteInformationForUser: 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.\n// \n// DeleteInformationForUser: Delete payment info for your user.\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.\nfunc ExamplePaymentService_DeleteInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Payment.DeleteInformationForUser(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// DeleteInformationForUser: 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.\n// \n// DeleteInformationForUser: Delete payment info for your user.\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.\nfunc ExamplePaymentService_DeleteInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Payment.DeleteInformationForUser(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteInformationForUser" }, "op": "add", @@ -457,7 +473,7 @@ }, { "value": { - "example": "// GetInformationForUser: 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.\n// \n// GetInformationForUser: Get payment info about your user.\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.\nfunc ExamplePaymentService_GetInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.GetInformationForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetInformationForUser: 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.\n// \n// GetInformationForUser: Get payment info about your user.\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.\nfunc ExamplePaymentService_GetInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.GetInformationForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.GetInformationForUser" }, "op": "add", @@ -465,7 +481,7 @@ }, { "value": { - "example": "// CreateInformationForUser: 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.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// CreateInformationForUser: Create payment info for your user.\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.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_CreateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"some-string\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: \"some-string\", Zip: \"some-string\"}, Name: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// CreateInformationForUser: 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.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// CreateInformationForUser: Create payment info for your user.\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.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_CreateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"some-string\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), Zip: \"some-string\"}, Name: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateInformationForUser" }, "op": "add", @@ -473,7 +489,7 @@ }, { "value": { - "example": "// UpdateInformationForUser: 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.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// UpdateInformationForUser: Update payment info for your user.\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.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_UpdateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"some-string\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: \"some-string\", Zip: \"some-string\"}, Name: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// UpdateInformationForUser: 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.\n// \n// \n// Parameters\n// \n// \t- `body`: The billing information for payments.\n// \n// UpdateInformationForUser: Update payment info for your user.\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.\n//\n// Parameters\n//\n// - `body`: The billing information for payments.\nfunc ExamplePaymentService_UpdateInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.NewAddress{City: \"some-string\", Country: \"some-string\", State: \"some-string\", Street1: \"some-string\", Street2: \"some-string\", UserID: kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), Zip: \"some-string\"}, Name: \"some-string\", Phone: \"+1-555-555-555\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.UpdateInformationForUser" }, "op": "add", @@ -481,7 +497,7 @@ }, { "value": { - "example": "// GetBalanceForUser: Get balance for your user.\n// \n// This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.\n// \n// GetBalanceForUser: Get balance for your user.\n// This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user.\nfunc ExamplePaymentService_GetBalanceForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.GetBalanceForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetBalanceForUser: Get balance for your user.\n// \n// This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.\n// \n// GetBalanceForUser: Get balance for your user.\n// This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.\nfunc ExamplePaymentService_GetBalanceForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.GetBalanceForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.GetBalanceForUser" }, "op": "add", @@ -489,7 +505,7 @@ }, { "value": { - "example": "// CreateIntentForUser: 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.\n// \n// CreateIntentForUser: Create a payment intent for your user.\n// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user.\nfunc ExamplePaymentService_CreateIntentForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateIntentForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// CreateIntentForUser: 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.\n// \n// CreateIntentForUser: Create a payment intent for your user.\n// This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.\nfunc ExamplePaymentService_CreateIntentForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.CreateIntentForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.CreateIntentForUser" }, "op": "add", @@ -497,7 +513,7 @@ }, { "value": { - "example": "// ListInvoicesForUser: List invoices for your user.\n// \n// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\n// \n// ListInvoicesForUser: List invoices for your user.\n// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user.\nfunc ExamplePaymentService_ListInvoicesForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.ListInvoicesForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListInvoicesForUser: List invoices for your user.\n// \n// This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.\n// \n// ListInvoicesForUser: List invoices for your user.\n// This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.\nfunc ExamplePaymentService_ListInvoicesForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.ListInvoicesForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListInvoicesForUser" }, "op": "add", @@ -505,7 +521,7 @@ }, { "value": { - "example": "// ListMethodsForUser: List payment methods for your user.\n// \n// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\n// \n// ListMethodsForUser: List payment methods for your user.\n// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user.\nfunc ExamplePaymentService_ListMethodsForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.ListMethodsForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListMethodsForUser: List payment methods for your user.\n// \n// This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.\n// \n// ListMethodsForUser: List payment methods for your user.\n// This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.\nfunc ExamplePaymentService_ListMethodsForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Payment.ListMethodsForUser()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ListMethodsForUser" }, "op": "add", @@ -513,7 +529,7 @@ }, { "value": { - "example": "// DeleteMethodForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \n// DeleteMethodForUser: Delete a payment method for your user.\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`\nfunc ExamplePaymentService_DeleteMethodForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Payment.DeleteMethodForUser(\"some-string\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// DeleteMethodForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \n// DeleteMethodForUser: Delete a payment method for your user.\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`\nfunc ExamplePaymentService_DeleteMethodForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Payment.DeleteMethodForUser(\"some-string\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.DeleteMethodForUser" }, "op": "add", @@ -521,7 +537,7 @@ }, { "value": { - "example": "// ValidateCustomerTaxInformationForUser: 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.\n// \n// ValidateCustomerTaxInformationForUser: Validate a customer's information is correct and valid for automatic tax.\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.\nfunc ExamplePaymentService_ValidateCustomerTaxInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Payment.ValidateCustomerTaxInformationForUser(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// ValidateCustomerTaxInformationForUser: 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.\n// \n// ValidateCustomerTaxInformationForUser: Validate a customer's information is correct and valid for automatic tax.\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.\nfunc ExamplePaymentService_ValidateCustomerTaxInformationForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Payment.ValidateCustomerTaxInformationForUser(); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#PaymentService.ValidateCustomerTaxInformationForUser" }, "op": "add", @@ -529,7 +545,7 @@ }, { "value": { - "example": "// GetSessionFor: 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// \n// Parameters\n// \n// \t- `token`\n// \n// GetSessionFor: Get a session for your user.\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`\nfunc ExampleUserService_GetSessionFor() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetSessionFor(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetSessionFor: 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// \n// Parameters\n// \n// \t- `token`\n// \n// GetSessionFor: Get a session for your user.\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`\nfunc ExampleUserService_GetSessionFor() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetSessionFor(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetSessionFor" }, "op": "add", @@ -537,7 +553,7 @@ }, { "value": { - "example": "// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\n// \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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAiService_ListTextToCadModelsForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.ListTextToCadModelsForUser(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListTextToCadModelsForUser: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListTextToCadModelsForUser: List text-to-CAD models you've generated.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAiService_ListTextToCadModelsForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.ListTextToCadModelsForUser(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.ListTextToCadModelsForUser" }, "op": "add", @@ -545,7 +561,15 @@ }, { "value": { - "example": "// CreateTextToCadModelFeedback: 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// \n// Parameters\n// \n// \t- `id`\n// \t- `feedback`: Human feedback on an AI response.\n// \n// CreateTextToCadModelFeedback: Give feedback to a specific text-to-CAD response.\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// - `id`\n// - `feedback`: Human feedback on an AI response.\nfunc ExampleAiService_CreateTextToCadModelFeedback() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Ai.CreateTextToCadModelFeedback(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), \"\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", + "example": "// GetTextToCadModelForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetTextToCadModelForUser: Get a text-to-CAD response.\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`\nfunc ExampleAiService_GetTextToCadModelForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.Ai.GetTextToCadModelForUser(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"))\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.GetTextToCadModelForUser" + }, + "op": "add", + "path": "/paths/~1user~1text-to-cad~1{id}/get/x-go" + }, + { + "value": { + "example": "// CreateTextToCadModelFeedback: 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// \n// Parameters\n// \n// \t- `id`\n// \t- `feedback`: Human feedback on an AI response.\n// \n// CreateTextToCadModelFeedback: Give feedback to a specific text-to-CAD response.\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// - `id`\n// - `feedback`: Human feedback on an AI response.\nfunc ExampleAiService_CreateTextToCadModelFeedback() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tif err := client.Ai.CreateTextToCadModelFeedback(kittycad.ParseUUID(\"6ba7b810-9dad-11d1-80b4-00c04fd430c8\"), \"\"); err != nil {\n\t\tpanic(err)\n\t}\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#AiService.CreateTextToCadModelFeedback" }, "op": "add", @@ -553,7 +577,7 @@ }, { "value": { - "example": "// List: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// List: List users.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleUserService_List() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.List(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// List: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// List: List users.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleUserService_List() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.List(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.List" }, "op": "add", @@ -561,7 +585,7 @@ }, { "value": { - "example": "// ListExtended: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListExtended: List users with extended information.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleUserService_ListExtended() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.ListExtended(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListExtended: 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// \n// Parameters\n// \n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListExtended: List users with extended information.\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`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleUserService_ListExtended() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.ListExtended(123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.ListExtended" }, "op": "add", @@ -569,7 +593,7 @@ }, { "value": { - "example": "// GetExtended: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetExtended: Get extended information about a user.\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`\nfunc ExampleUserService_GetExtended() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetExtended(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// GetExtended: 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// \n// Parameters\n// \n// \t- `id`\n// \n// GetExtended: Get extended information about a user.\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`\nfunc ExampleUserService_GetExtended() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.GetExtended(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.GetExtended" }, "op": "add", @@ -577,7 +601,7 @@ }, { "value": { - "example": "// Get: 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// \n// Parameters\n// \n// \t- `id`\n// \n// Get: Get a user.\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`\nfunc ExampleUserService_Get() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.Get(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// Get: 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// \n// Parameters\n// \n// \t- `id`\n// \n// Get: Get a user.\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`\nfunc ExampleUserService_Get() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.User.Get(\"some-string\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#UserService.Get" }, "op": "add", @@ -585,7 +609,7 @@ }, { "value": { - "example": "// ListForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListForUser: List API calls for a user.\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`\n//\n// - `limit`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPICallService_ListForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.ListForUser(\"some-string\", 123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", + "example": "// ListForUser: 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// \n// Parameters\n// \n// \t- `id`\n// \t- `limit`\n// \t- `pageToken`\n// \t- `sortBy`: Supported set of sort modes for scanning by created_at only.\n// \t\t\n// \t\tCurrently, we only support scanning in ascending order.\n// \n// ListForUser: List API calls for a user.\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`\n//\n// - `limit`\n//\n// - `pageToken`\n//\n// - `sortBy`: Supported set of sort modes for scanning by created_at only.\n//\n// Currently, we only support scanning in ascending order.\nfunc ExampleAPICallService_ListForUser() {\n\tclient, err := kittycad.NewClientFromEnv(\"your apps user agent\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tresult, err := client.APICall.ListForUser(\"some-string\", 123, \"some-string\", \"\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Printf(\"%#v\", result)\n\n}\n", "libDocsLink": "https://pkg.go.dev/github.com/kittycad/kittycad.go/#APICallService.ListForUser" }, "op": "add", diff --git a/lib_test.go b/lib_test.go index 65d77d9..d0593f4 100644 --- a/lib_test.go +++ b/lib_test.go @@ -16,13 +16,10 @@ func getClient(t *testing.T) *Client { func TestGetSession(t *testing.T) { client := getClient(t) - session, err := client.User.GetSelf() + _, err := client.User.GetSelf() if err != nil { t.Fatalf("getting the session failed: %v", err) } - if session.ID == "" { - t.Fatalf("the session ID is empty") - } } func TestPing(t *testing.T) { diff --git a/paths.go b/paths.go index b6420c6..05289d0 100644 --- a/paths.go +++ b/paths.go @@ -85,7 +85,7 @@ func (s *MetaService) GetAiPluginManifest() (*AiPluginManifest, error) { // Getdata: Get the metadata about our currently running server. // This includes information on any of our other distributed systems it is connected to. -// You must be a KittyCAD employee to perform this request. +// You must be a Zoo employee to perform this request. func (s *MetaService) Getdata() (*Metadata, error) { // Create the url. path := "/_meta/info" @@ -123,8 +123,120 @@ func (s *MetaService) Getdata() (*Metadata, error) { } +// ListPrompts: List all AI prompts. +// For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested. +// This endpoint requires authentication by a Zoo employee. +// The AI prompts are returned in order of creation, with the most recently created AI prompts first. +// +// Parameters +// +// - `limit` +// +// - `pageToken` +// +// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// +// Currently, we only support scanning in ascending order. +func (s *AiService) ListPrompts(limit int, pageToken string, sortBy CreatedAtSortMode) (*AiPromptResultsPage, error) { + // Create the url. + path := "/ai-prompts" + uri := resolveRelative(s.client.server, path) + + // Create the request. + req, err := http.NewRequest("GET", uri, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %v", err) + } + + // Add the parameters to the url. + if err := expandURL(req.URL, map[string]string{ + "limit": strconv.Itoa(limit), + "page_token": pageToken, + "sort_by": string(sortBy), + }); err != nil { + return nil, fmt.Errorf("expanding URL with parameters failed: %v", err) + } + + // Send the request. + resp, err := s.client.client.Do(req) + if err != nil { + return nil, fmt.Errorf("error sending request: %v", err) + } + defer resp.Body.Close() + + // Check the response. + if err := checkResponse(resp); err != nil { + return nil, err + } + + // Decode the body from the response. + if resp.Body == nil { + return nil, errors.New("request returned an empty body in the response") + } + var decoded AiPromptResultsPage + if err := json.NewDecoder(resp.Body).Decode(&decoded); err != nil { + return nil, fmt.Errorf("error decoding response body: %v", err) + } + + // Return the response. + return &decoded, nil + +} + +// GetPrompt: Get an AI prompt. +// This endpoint requires authentication by a Zoo employee. +// +// Parameters +// +// - `id` +func (s *AiService) GetPrompt(id UUID) (*AiPrompt, error) { + // Create the url. + path := "/ai-prompts/{{.id}}" + uri := resolveRelative(s.client.server, path) + + // Create the request. + req, err := http.NewRequest("GET", uri, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %v", err) + } + + // Add the parameters to the url. + if err := expandURL(req.URL, map[string]string{ + "id": id.String(), + }); err != nil { + return nil, fmt.Errorf("expanding URL with parameters failed: %v", err) + } + + // Send the request. + resp, err := s.client.client.Do(req) + if err != nil { + return nil, fmt.Errorf("error sending request: %v", err) + } + defer resp.Body.Close() + + // Check the response. + if err := checkResponse(resp); err != nil { + return nil, err + } + + // Decode the body from the response. + if resp.Body == nil { + return nil, errors.New("request returned an empty body in the response") + } + var decoded AiPrompt + if err := json.NewDecoder(resp.Body).Decode(&decoded); err != nil { + return nil, fmt.Errorf("error decoding response body: %v", err) + } + + // Return the response. + return &decoded, nil + +} + // CreateTextToCad: Generate a CAD model from text. +// 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. // This 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. +// One 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`. // This 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. // // Parameters @@ -185,7 +297,7 @@ func (s *AiService) CreateTextToCad(outputFormat FileExportFormat, body TextToCa } // GetMetrics: Get API call metrics. -// This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed. +// This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed. // // Parameters // @@ -235,7 +347,7 @@ func (s *APICallService) GetMetrics(groupBy APICallQueryGroupBy) (*[]APICallQuer } // List: List API calls. -// 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. +// 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. // // Parameters // @@ -293,14 +405,14 @@ func (s *APICallService) List(limit int, pageToken string, sortBy CreatedAtSortM } // Get: Get details of an API call. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user. // If the user is not authenticated to view the specified API call, then it is not returned. -// Only KittyCAD employees can view API calls for other users. +// Only Zoo employees can view API calls for other users. // // Parameters // // - `id` -func (s *APICallService) Get(id string) (*APICallWithPrice, error) { +func (s *APICallService) Get(id UUID) (*APICallWithPrice, error) { // Create the url. path := "/api-calls/{{.id}}" uri := resolveRelative(s.client.server, path) @@ -313,7 +425,7 @@ func (s *APICallService) Get(id string) (*APICallWithPrice, error) { // Add the parameters to the url. if err := expandURL(req.URL, map[string]string{ - "id": id, + "id": id.String(), }); err != nil { return nil, fmt.Errorf("expanding URL with parameters failed: %v", err) } @@ -345,8 +457,8 @@ func (s *APICallService) Get(id string) (*APICallWithPrice, error) { } // GithubCallback: Listen for callbacks to GitHub app authentication. -// This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -// The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. +// This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos. +// The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. // // Parameters // @@ -389,8 +501,8 @@ func (s *AppService) GithubCallback(body any) error { } // GithubConsent: Get the consent URL for GitHub app authentication. -// This is different than OAuth 2.0 authentication for users. This endpoint grants access for KittyCAD to access user's repos. -// The user doesn't need KittyCAD OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. +// This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos. +// The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos. func (s *AppService) GithubConsent() (*AppClientInfo, error) { // Create the url. path := "/apps/github/consent" @@ -469,7 +581,7 @@ func (s *AppService) GithubWebhook(body []byte) error { // ListAsyncOperations: List async operations. // 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. -// This endpoint requires authentication by a KittyCAD employee. +// This endpoint requires authentication by a Zoo employee. // // Parameters // @@ -531,9 +643,9 @@ func (s *APICallService) ListAsyncOperations(limit int, pageToken string, sortBy // GetAsyncOperation: Get an async operation. // Get the status and output of an async operation. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested async operation for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested async operation for the user. // If the user is not authenticated to view the specified async operation, then it is not returned. -// Only KittyCAD employees with the proper access can view async operations for other users. +// Only Zoo employees with the proper access can view async operations for other users. // // Parameters // @@ -677,7 +789,7 @@ func (s *HiddenService) AuthEmailCallback(callbackUrl URL, email string, token s // CreateCenterOfMass: Get CAD file center of mass. // We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. -// This endpoint returns the cartesian co-ordinate in world space measure units. +// This endpoint returns the cartesian coordinate in world space measure units. // In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported. // Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously. // If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint. @@ -864,7 +976,7 @@ func (s *FileService) CreateDensity(materialMass float64, materialMassUnit UnitM } -// CreateFileExecution: Execute a KittyCAD program in a specific language. +// CreateFileExecution: Execute a Zoo program in a specific language. // Parameters // // - `lang`: The language code is written in. @@ -1110,6 +1222,57 @@ func (s *FileService) CreateVolume(outputUnit UnitVolume, srcFormat FileImportFo } +// InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id. +// 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. +// You must be a Zoo employee to use this endpoint. +// +// Parameters +// +// - `discordId` +func (s *MetaService) InternalGetAPITokenForDiscordUser(discordId string) (*APIToken, error) { + // Create the url. + path := "/internal/discord/api-token/{{.discord_id}}" + uri := resolveRelative(s.client.server, path) + + // Create the request. + req, err := http.NewRequest("GET", uri, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %v", err) + } + + // Add the parameters to the url. + if err := expandURL(req.URL, map[string]string{ + "discord_id": discordId, + }); err != nil { + return nil, fmt.Errorf("expanding URL with parameters failed: %v", err) + } + + // Send the request. + resp, err := s.client.client.Do(req) + if err != nil { + return nil, fmt.Errorf("error sending request: %v", err) + } + defer resp.Body.Close() + + // Check the response. + if err := checkResponse(resp); err != nil { + return nil, err + } + + // Decode the body from the response. + if resp.Body == nil { + return nil, errors.New("request returned an empty body in the response") + } + var decoded APIToken + if err := json.NewDecoder(resp.Body).Decode(&decoded); err != nil { + return nil, fmt.Errorf("error decoding response body: %v", err) + } + + // Return the response. + return &decoded, nil + +} + // Logout: This endpoint removes the session cookie for a user. // This is used in logout scenarios. func (s *HiddenService) Logout() error { @@ -2220,7 +2383,7 @@ func (s *UserService) GetSelf() (*User, error) { } // UpdateSelf: Update your user. -// This endpoint requires authentication by any KittyCAD user. It updates information about the authenticated user. +// This endpoint requires authentication by any Zoo user. It updates information about the authenticated user. // // Parameters // @@ -2272,7 +2435,7 @@ func (s *UserService) UpdateSelf(body UpdateUser) (*User, error) { } // DeleteSelf: Delete your user. -// This endpoint requires authentication by any KittyCAD user. It deletes the authenticated user from KittyCAD's database. +// This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database. // This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance. func (s *UserService) DeleteSelf() error { // Create the url. @@ -2303,7 +2466,7 @@ func (s *UserService) DeleteSelf() error { } // UserList: List API calls for your user. -// This endpoint requires authentication by any KittyCAD user. It returns the API calls for the authenticated user. +// This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user. // The API calls are returned in order of creation, with the most recently created API calls first. // // Parameters @@ -2362,12 +2525,12 @@ func (s *APICallService) UserList(limit int, pageToken string, sortBy CreatedAtS } // GetForUser: Get an API call for a user. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API call for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user. // // Parameters // // - `id` -func (s *APICallService) GetForUser(id string) (*APICallWithPrice, error) { +func (s *APICallService) GetForUser(id UUID) (*APICallWithPrice, error) { // Create the url. path := "/user/api-calls/{{.id}}" uri := resolveRelative(s.client.server, path) @@ -2380,7 +2543,7 @@ func (s *APICallService) GetForUser(id string) (*APICallWithPrice, error) { // Add the parameters to the url. if err := expandURL(req.URL, map[string]string{ - "id": id, + "id": id.String(), }); err != nil { return nil, fmt.Errorf("expanding URL with parameters failed: %v", err) } @@ -2412,7 +2575,7 @@ func (s *APICallService) GetForUser(id string) (*APICallWithPrice, error) { } // ListForUser: List API tokens for your user. -// This endpoint requires authentication by any KittyCAD user. It returns the API tokens for the authenticated user. +// This endpoint requires authentication by any Zoo user. It returns the API tokens for the authenticated user. // The API tokens are returned in order of creation, with the most recently created API tokens first. // // Parameters @@ -2471,7 +2634,7 @@ func (s *APITokenService) ListForUser(limit int, pageToken string, sortBy Create } // CreateForUser: Create a new API token for your user. -// This endpoint requires authentication by any KittyCAD user. It creates a new API token for the authenticated user. +// This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user. func (s *APITokenService) CreateForUser() (*APIToken, error) { // Create the url. path := "/user/api-tokens" @@ -2510,7 +2673,7 @@ func (s *APITokenService) CreateForUser() (*APIToken, error) { } // GetForUser: Get an API token for your user. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user. // // Parameters // @@ -2560,7 +2723,7 @@ func (s *APITokenService) GetForUser(token UUID) (*APIToken, error) { } // DeleteForUser: Delete an API token for your user. -// This endpoint requires authentication by any KittyCAD user. It deletes the requested API token for the user. +// This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user. // 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. // // Parameters @@ -2641,45 +2804,6 @@ func (s *UserService) GetSelfExtended() (*ExtendedUser, error) { } -// GetFrontHashSelf: Get your user's front verification hash. -// This info is sent to front when initialing the front chat, it prevents impersonations using js hacks in the browser -func (s *UserService) GetFrontHashSelf() (*string, error) { - // Create the url. - path := "/user/front-hash" - uri := resolveRelative(s.client.server, path) - - // Create the request. - req, err := http.NewRequest("GET", uri, nil) - if err != nil { - return nil, fmt.Errorf("error creating request: %v", err) - } - - // Send the request. - resp, err := s.client.client.Do(req) - if err != nil { - return nil, fmt.Errorf("error sending request: %v", err) - } - defer resp.Body.Close() - - // Check the response. - if err := checkResponse(resp); err != nil { - return nil, err - } - - // Decode the body from the response. - if resp.Body == nil { - return nil, errors.New("request returned an empty body in the response") - } - var decoded string - if err := json.NewDecoder(resp.Body).Decode(&decoded); err != nil { - return nil, fmt.Errorf("error decoding response body: %v", err) - } - - // Return the response. - return &decoded, nil - -} - // GetOnboardingSelf: Get your user's onboarding status. // Checks key part of their api usage to determine their onboarding progress func (s *UserService) GetOnboardingSelf() (*Onboarding, error) { @@ -2721,7 +2845,7 @@ func (s *UserService) GetOnboardingSelf() (*Onboarding, error) { // GetInformationForUser: Get payment info about your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It gets the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user. func (s *PaymentService) GetInformationForUser() (*Customer, error) { // Create the url. path := "/user/payment" @@ -2761,7 +2885,7 @@ func (s *PaymentService) GetInformationForUser() (*Customer, error) { // CreateInformationForUser: Create payment info for your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It creates the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user. // // Parameters // @@ -2814,7 +2938,7 @@ func (s *PaymentService) CreateInformationForUser(body BillingInfo) (*Customer, // UpdateInformationForUser: Update payment info for your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It updates the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user. // // Parameters // @@ -2867,7 +2991,7 @@ func (s *PaymentService) UpdateInformationForUser(body BillingInfo) (*Customer, // DeleteInformationForUser: Delete payment info for your user. // This includes billing address, phone, and name. -// This endpoint requires authentication by any KittyCAD user. It deletes the payment information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user. func (s *PaymentService) DeleteInformationForUser() error { // Create the url. path := "/user/payment" @@ -2897,7 +3021,7 @@ func (s *PaymentService) DeleteInformationForUser() error { } // GetBalanceForUser: Get balance for your user. -// This endpoint requires authentication by any KittyCAD user. It gets the balance information for the authenticated user. +// This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user. func (s *PaymentService) GetBalanceForUser() (*CustomerBalance, error) { // Create the url. path := "/user/payment/balance" @@ -2936,7 +3060,7 @@ func (s *PaymentService) GetBalanceForUser() (*CustomerBalance, error) { } // CreateIntentForUser: Create a payment intent for your user. -// This endpoint requires authentication by any KittyCAD user. It creates a new payment intent for the authenticated user. +// This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user. func (s *PaymentService) CreateIntentForUser() (*PaymentIntent, error) { // Create the url. path := "/user/payment/intent" @@ -2975,7 +3099,7 @@ func (s *PaymentService) CreateIntentForUser() (*PaymentIntent, error) { } // ListInvoicesForUser: List invoices for your user. -// This endpoint requires authentication by any KittyCAD user. It lists invoices for the authenticated user. +// This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user. func (s *PaymentService) ListInvoicesForUser() (*[]Invoice, error) { // Create the url. path := "/user/payment/invoices" @@ -3014,7 +3138,7 @@ func (s *PaymentService) ListInvoicesForUser() (*[]Invoice, error) { } // ListMethodsForUser: List payment methods for your user. -// This endpoint requires authentication by any KittyCAD user. It lists payment methods for the authenticated user. +// This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user. func (s *PaymentService) ListMethodsForUser() (*[]PaymentMethod, error) { // Create the url. path := "/user/payment/methods" @@ -3053,7 +3177,7 @@ func (s *PaymentService) ListMethodsForUser() (*[]PaymentMethod, error) { } // DeleteMethodForUser: Delete a payment method for your user. -// This endpoint requires authentication by any KittyCAD user. It deletes the specified payment method for the authenticated user. +// This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user. // // Parameters // @@ -3094,7 +3218,7 @@ func (s *PaymentService) DeleteMethodForUser(id string) error { } // ValidateCustomerTaxInformationForUser: Validate a customer's information is correct and valid for automatic tax. -// 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. +// 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. func (s *PaymentService) ValidateCustomerTaxInformationForUser() error { // Create the url. path := "/user/payment/tax" @@ -3124,7 +3248,7 @@ func (s *PaymentService) ValidateCustomerTaxInformationForUser() error { } // GetSessionFor: Get a session for your user. -// This endpoint requires authentication by any KittyCAD user. It returns details of the requested API token for the user. +// This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user. // // Parameters // @@ -3174,7 +3298,8 @@ func (s *UserService) GetSessionFor(token UUID) (*Session, error) { } // ListTextToCadModelsForUser: List text-to-CAD models you've generated. -// This endpoint requires authentication by any KittyCAD user. It returns the text-to-CAD models for the authenticated user. +// This will always return the STEP file contents as well as the format the user originally requested. +// This endpoint requires authentication by any Zoo user. It returns the text-to-CAD models for the authenticated user. // The text-to-CAD models are returned in order of creation, with the most recently created text-to-CAD models first. // // Parameters @@ -3232,8 +3357,58 @@ func (s *AiService) ListTextToCadModelsForUser(limit int, pageToken string, sort } +// GetTextToCadModelForUser: Get a text-to-CAD response. +// This endpoint requires authentication by any Zoo user. The user must be the owner of the text-to-CAD model. +// +// Parameters +// +// - `id` +func (s *AiService) GetTextToCadModelForUser(id UUID) (*TextToCad, error) { + // Create the url. + path := "/user/text-to-cad/{{.id}}" + uri := resolveRelative(s.client.server, path) + + // Create the request. + req, err := http.NewRequest("GET", uri, nil) + if err != nil { + return nil, fmt.Errorf("error creating request: %v", err) + } + + // Add the parameters to the url. + if err := expandURL(req.URL, map[string]string{ + "id": id.String(), + }); err != nil { + return nil, fmt.Errorf("expanding URL with parameters failed: %v", err) + } + + // Send the request. + resp, err := s.client.client.Do(req) + if err != nil { + return nil, fmt.Errorf("error sending request: %v", err) + } + defer resp.Body.Close() + + // Check the response. + if err := checkResponse(resp); err != nil { + return nil, err + } + + // Decode the body from the response. + if resp.Body == nil { + return nil, errors.New("request returned an empty body in the response") + } + var decoded TextToCad + if err := json.NewDecoder(resp.Body).Decode(&decoded); err != nil { + return nil, fmt.Errorf("error decoding response body: %v", err) + } + + // Return the response. + return &decoded, nil + +} + // CreateTextToCadModelFeedback: Give feedback to a specific text-to-CAD response. -// 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. +// 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. // // Parameters // @@ -3276,7 +3451,7 @@ func (s *AiService) CreateTextToCadModelFeedback(id UUID, feedback AiFeedback) e } // List: List users. -// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. +// This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first. // // Parameters // @@ -3334,7 +3509,7 @@ func (s *UserService) List(limit int, pageToken string, sortBy CreatedAtSortMode } // ListExtended: List users with extended information. -// This endpoint required authentication by a KittyCAD employee. The users are returned in order of creation, with the most recently created users first. +// This endpoint required authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first. // // Parameters // @@ -3394,7 +3569,7 @@ func (s *UserService) ListExtended(limit int, pageToken string, sortBy CreatedAt // GetExtended: Get extended information about a user. // 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. // Alternatively, to get information about the authenticated user, use `/user/extended` endpoint. -// To get information about any KittyCAD user, you must be a KittyCAD employee. +// To get information about any Zoo user, you must be a Zoo employee. // // Parameters // @@ -3446,7 +3621,7 @@ func (s *UserService) GetExtended(id string) (*ExtendedUser, error) { // Get: Get a user. // To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user. // Alternatively, to get information about the authenticated user, use `/user` endpoint. -// To get information about any KittyCAD user, you must be a KittyCAD employee. +// To get information about any Zoo user, you must be a Zoo employee. // // Parameters // @@ -3496,9 +3671,9 @@ func (s *UserService) Get(id string) (*User, error) { } // ListForUser: List API calls for a user. -// 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. +// 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. // Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user. -// If the authenticated user is a KittyCAD employee, then the API calls are returned for the user specified by the user id. +// If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id. // The API calls are returned in order of creation, with the most recently created API calls first. // // Parameters diff --git a/types.go b/types.go index bdf5d0e..038acfa 100755 --- a/types.go +++ b/types.go @@ -63,7 +63,7 @@ type APICallWithPrice struct { IPAddress IP `json:"ip_address" yaml:"ip_address" schema:"ip_address"` // Litterbox: If the API call was spawned from the litterbox or not. Litterbox bool `json:"litterbox" yaml:"litterbox" schema:"litterbox"` - // Method: The HTTP method requsted by the API call. + // Method: The HTTP method requested by the API call. Method Method `json:"method" yaml:"method" schema:"method,required"` // Minutes: The number of minutes the API call was billed for. Minutes int `json:"minutes" yaml:"minutes" schema:"minutes"` @@ -90,7 +90,7 @@ type APICallWithPrice struct { // UserAgent: The user agent of the request. UserAgent string `json:"user_agent" yaml:"user_agent" schema:"user_agent,required"` // UserID: The ID of the user that made the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // APICallWithPriceResultsPage: A single page of results @@ -115,7 +115,7 @@ type APIToken struct { // CreatedAt: The date and time the API token was created. CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"` // ID: The unique identifier for the API token. - ID string `json:"id" yaml:"id" schema:"id"` + ID UUID `json:"id" yaml:"id" schema:"id,required"` // IsValid: If the token is valid. We never delete API tokens, but we can mark them as invalid. We save them for ever to preserve the history of the API token. IsValid bool `json:"is_valid" yaml:"is_valid" schema:"is_valid,required"` // Token: The API token itself. @@ -123,7 +123,7 @@ type APIToken struct { // UpdatedAt: The date and time the API token was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The ID of the user that owns the API token. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // APITokenResultsPage: A single page of results @@ -138,6 +138,8 @@ type APITokenResultsPage struct { type AccountProvider string const ( + // AccountProviderDiscord: The Discord account provider. + AccountProviderDiscord AccountProvider = "discord" // AccountProviderGoogle: The Google account provider. AccountProviderGoogle AccountProvider = "google" // AccountProviderGithub: The GitHub account provider. @@ -229,6 +231,54 @@ type AiPluginManifest struct { SchemaVersion string `json:"schema_version" yaml:"schema_version" schema:"schema_version"` } +// AiPrompt: An AI prompt. +type AiPrompt struct { + // CompletedAt: When the prompt was completed. + CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"` + // CreatedAt: The date and time the AI prompt was created. + CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"` + // Error: The error message if the prompt failed. + Error string `json:"error" yaml:"error" schema:"error"` + // Feedback: Feedback from the user, if any. + Feedback AiFeedback `json:"feedback" yaml:"feedback" schema:"feedback"` + // ID: The unique identifier for the AI Prompt. + ID UUID `json:"id" yaml:"id" schema:"id,required"` + // Metadata: The metadata for the prompt. + Metadata any `json:"metadata" yaml:"metadata" schema:"metadata"` + // ModelVersion: The version of the model. + ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"` + // OutputFile: The output file. In the case of TextToCad this is a link to a file in a GCP bucket. + OutputFile string `json:"output_file" yaml:"output_file" schema:"output_file"` + // Prompt: The prompt. + Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"` + // StartedAt: When the prompt was started. + StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"` + // Status: The status of the prompt. + Status APICallStatus `json:"status" yaml:"status" schema:"status,required"` + // Type: The type of prompt. + Type AiPromptType `json:"type" yaml:"type" schema:"type,required"` + // UpdatedAt: The date and time the AI prompt was last updated. + UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` + // UserID: The user ID of the user who created the AI Prompt. + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` +} + +// AiPromptResultsPage: A single page of results +type AiPromptResultsPage struct { + // Items: list of items on this page of results + Items []AiPrompt `json:"items" yaml:"items" schema:"items,required"` + // NextPage: token used to fetch the next page of results (if any) + NextPage string `json:"next_page" yaml:"next_page" schema:"next_page"` +} + +// AiPromptType: A type of AI prompt. +type AiPromptType string + +const ( + // AiPromptTypeTextToCad: Text to CAD. + AiPromptTypeTextToCad AiPromptType = "text_to_cad" +) + // Angle: An angle, with a specific unit. type Angle struct { // Unit: What unit is the measurement? @@ -269,7 +319,7 @@ type AnnotationOptions struct { Text AnnotationTextOptions `json:"text" yaml:"text" schema:"text"` } -// AnnotationTextAlignmentX: Horizontal Text aligment +// AnnotationTextAlignmentX: Horizontal Text alignment type AnnotationTextAlignmentX string const ( @@ -281,7 +331,7 @@ const ( AnnotationTextAlignmentXRight AnnotationTextAlignmentX = "right" ) -// AnnotationTextAlignmentY: Vertical Text aligment +// AnnotationTextAlignmentY: Vertical Text alignment type AnnotationTextAlignmentY string const ( @@ -346,7 +396,7 @@ type AsyncAPICall struct { // UpdatedAt: The time and date the async API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the async API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` // Worker: The worker node that is performing or performed the async API call. Worker string `json:"worker" yaml:"worker" schema:"worker"` } @@ -382,7 +432,7 @@ type AsyncAPICallOutputCompletedAt struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // AsyncAPICallOutputCreatedAt: File center of mass. @@ -412,7 +462,7 @@ type AsyncAPICallOutputCreatedAt struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // AsyncAPICallOutputError: A file mass. @@ -446,7 +496,7 @@ type AsyncAPICallOutputError struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // AsyncAPICallOutputID: A file volume. @@ -474,7 +524,7 @@ type AsyncAPICallOutputID struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` // Volume: The resulting volume. Volume float64 `json:"volume" yaml:"volume" schema:"volume"` } @@ -510,7 +560,7 @@ type AsyncAPICallOutputOutputFormat struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // AsyncAPICallOutputOutputFormatOptions: A file surface area. @@ -540,7 +590,7 @@ type AsyncAPICallOutputOutputFormatOptions struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // AsyncAPICallOutputOutputs: Text to CAD. @@ -574,7 +624,7 @@ type AsyncAPICallOutputOutputs struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // AsyncAPICallResultsPage: A single page of results @@ -957,7 +1007,7 @@ type CustomerBalance struct { // UpdatedAt: The date and time the balance was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID the balance belongs to. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // Data is the type definition for a Data. @@ -1012,6 +1062,20 @@ type Discount struct { Coupon Coupon `json:"coupon" yaml:"coupon" schema:"coupon,required"` } +// DistanceTypeAxis: The distance between objects along the specified axis +type DistanceTypeAxis struct { + // Axis: Global axis + Axis GlobalAxi `json:"axis" yaml:"axis" schema:"axis,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// DistanceTypeEuclidean: Euclidean Distance. +type DistanceTypeEuclidean struct { + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + // EmailAuthenticationForm: The body of the form for email authentication. type EmailAuthenticationForm struct { // CallbackUrl: The URL to redirect back to after we have authenticated. @@ -1032,6 +1096,14 @@ type EntityGetChildUuid struct { EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` } +// EntityGetDistance: The response from the `EntitiesGetDistance` command. +type EntityGetDistance struct { + // MaxDistance: The maximum distance between the input entities. + MaxDistance float64 `json:"max_distance" yaml:"max_distance" schema:"max_distance,required"` + // MinDistance: The minimum distance between the input entities. + MinDistance float64 `json:"min_distance" yaml:"min_distance" schema:"min_distance,required"` +} + // EntityGetNumChildren: The response from the `EntityGetNumChildren` command. type EntityGetNumChildren struct { // Num: The number of children the entity has. @@ -1044,6 +1116,12 @@ type EntityGetParentID struct { EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` } +// EntityLinearPattern: The response from the `EntityLinearPattern` command. +type EntityLinearPattern struct { + // EntityIds: The UUIDs of the entities that were created. + EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` +} + // EntityType: The type of entity type EntityType string @@ -1148,7 +1226,7 @@ type ExtendedUser struct { // Github: The user's GitHub handle. Github string `json:"github" yaml:"github" schema:"github"` // ID: The unique identifier for the user. - ID string `json:"id" yaml:"id" schema:"id"` + ID UUID `json:"id" yaml:"id" schema:"id,required"` // Image: The image avatar for the user. This is a URL. Image URL `json:"image" yaml:"image" schema:"image,required"` // LastName: The user's last name. @@ -1218,7 +1296,7 @@ type FileCenterOfMass struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // FileConversion: A file conversion. @@ -1250,7 +1328,7 @@ type FileConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // FileDensity: A file density result. @@ -1282,7 +1360,7 @@ type FileDensity struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // FileExportFormat: The valid types of output file formats. @@ -1364,7 +1442,7 @@ type FileMass struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // FileSurfaceArea: A file surface area result. @@ -1392,7 +1470,7 @@ type FileSurfaceArea struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // FileSystemMetadata: Metadata about our file system. @@ -1425,7 +1503,7 @@ type FileVolume struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` // Volume: The resulting volume. Volume float64 `json:"volume" yaml:"volume" schema:"volume"` } @@ -1460,6 +1538,18 @@ type GetSketchModePlane struct { ZAxis Point3D `json:"z_axis" yaml:"z_axis" schema:"z_axis,required"` } +// GlobalAxi: An enum that contains the three global axes. +type GlobalAxi string + +const ( + // GlobalAxiX: The X axis + GlobalAxiX GlobalAxi = "x" + // GlobalAxiY: The Y axis + GlobalAxiY GlobalAxi = "y" + // GlobalAxiZ: The Z axis + GlobalAxiZ GlobalAxi = "z" +) + // GltfPresentation: Describes the presentation style of the glTF JSON. type GltfPresentation string @@ -1520,7 +1610,7 @@ const ( ImageFormatJpeg ImageFormat = "jpeg" ) -// ImportFile: File to import into the current model +// ImportFile: 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 ImportFile struct { // Data: The raw bytes of the file Data []int `json:"data" yaml:"data" schema:"data,required"` @@ -1832,31 +1922,43 @@ const ( MethodExtension Method = "EXTENSION" ) -// ModelingCmdAnimated: Hide or show an object +// ModelingCmdAnimated: Update an annotation type ModelingCmdAnimated struct { - // Hidden: Whether or not the object should be hidden. - Hidden bool `json:"hidden" yaml:"hidden" schema:"hidden,required"` - // ObjectID: Which object to change - ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` + // AnnotationID: Which annotation to update + AnnotationID UUID `json:"annotation_id" yaml:"annotation_id" schema:"annotation_id,required"` + // Options: If any of these fields are set, they will overwrite the previous options for the annotation. + Options AnnotationOptions `json:"options" yaml:"options" schema:"options,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdCameraDragEnd: Adds one or more entities (by UUID) to the selection. +// ModelingCmdAnnotationType: Sketch on some entity (e.g. a plane, a face) +type ModelingCmdAnnotationType struct { + // Animated: Should we animate or snap for the camera transition? + Animated bool `json:"animated" yaml:"animated" schema:"animated,required"` + // EntityID: Which entity to sketch on. + EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` + // Ortho: 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 `json:"ortho" yaml:"ortho" schema:"ortho,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdCameraDragEnd: Clear the selection type ModelingCmdCameraDragEnd struct { - // Entities: Which entities to select - Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdCameraDragMove: Exit edit mode +// ModelingCmdCameraDragMove: Enter edit mode type ModelingCmdCameraDragMove struct { + // Target: The edit target + Target UUID `json:"target" yaml:"target" schema:"target,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdCameraDragStart: How many children does the entity have? +// ModelingCmdCameraDragStart: What is this entity's parent? type ModelingCmdCameraDragStart struct { // EntityID: ID of the entity being queried. EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` @@ -1874,37 +1976,53 @@ type ModelingCmdCap struct { Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdCenter: Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd. +// ModelingCmdCenter: Removes one or more entities (by UUID) from the selection. type ModelingCmdCenter struct { - // Entities: Which entities to select + // Entities: Which entities to unselect Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdChildIndex: Send a mouse click event. Updates modified/selected entities. +// ModelingCmdChildIndex: Enable sketch mode on the given plane. type ModelingCmdChildIndex struct { + // Animated: Animate the transition to sketch mode. + Animated bool `json:"animated" yaml:"animated" schema:"animated,required"` + // DisableCameraWithPlane: Disable the camera entirely for sketch mode and sketch on a plane (this would be the normal of that plane). + DisableCameraWithPlane Point3D `json:"disable_camera_with_plane" yaml:"disable_camera_with_plane" schema:"disable_camera_with_plane"` + // Ortho: Use an orthographic camera. + Ortho bool `json:"ortho" yaml:"ortho" schema:"ortho,required"` + // PlaneID: Sketch on this plane. + PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdClobber: Set the material properties of an object +type ModelingCmdClobber struct { + // AmbientOcclusion: Ambient Occlusion of the new material + AmbientOcclusion float64 `json:"ambient_occlusion" yaml:"ambient_occlusion" schema:"ambient_occlusion,required"` + // Color: Color of the new material + Color Color `json:"color" yaml:"color" schema:"color,required"` + // Metalness: Metalness of the new material + Metalness float64 `json:"metalness" yaml:"metalness" schema:"metalness,required"` + // ObjectID: Which object to change + ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` + // Roughness: Roughness of the new material + Roughness float64 `json:"roughness" yaml:"roughness" schema:"roughness,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` - // Window: Where the mouse is - Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdClosePath: Export the scene to a file. +// ModelingCmdClosePath: Focus default camera on object. type ModelingCmdClosePath struct { - // EntityIds: IDs of the entities to be exported. If this is empty, then all entities are exported. - EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` - // Format: The file format to export to. - Format any `json:"format" yaml:"format" schema:"format,required"` - // SourceUnit: Select the unit interpretation of exported objects. - // - // This is not the same as the export units. Setting export units is part of the format options. - SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` + // Uuid: UUID of object to focus on. + Uuid UUID `json:"uuid" yaml:"uuid" schema:"uuid,required"` } -// ModelingCmdDefaultCameraDisableSketchMode: Gets the next adjacent edge for the given edge, along the given face. +// ModelingCmdDefaultCameraDisableSketchMode: Gets the edge opposite the given edge, along the given face. type ModelingCmdDefaultCameraDisableSketchMode struct { // EdgeID: Which edge you want the opposite of. EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"` @@ -1916,27 +2034,43 @@ type ModelingCmdDefaultCameraDisableSketchMode struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdDefaultCameraEnableSketchMode: Gets all faces which use the given edge. +// ModelingCmdDefaultCameraEnableSketchMode: Add a hole to a Solid2d object before extruding it. type ModelingCmdDefaultCameraEnableSketchMode struct { - // EdgeID: Which edge you want the faces of. + // HoleID: The id of the path to use as the inner profile (hole). + HoleID UUID `json:"hole_id" yaml:"hole_id" schema:"hole_id,required"` + // ObjectID: Which object to add the hole to. + ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdDefaultCameraFocusOn: Gets the next adjacent edge for the given edge, along the given face. +type ModelingCmdDefaultCameraFocusOn struct { + // EdgeID: Which edge you want the opposite of. EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"` + // FaceID: Which face is used to figure out the opposite edge? + FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"` // ObjectID: Which object is being queried. ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdDefaultCameraLookAt: Find all IDs of selected entities +// ModelingCmdDefaultCameraLookAt: Replaces the current selection with these new entities (by UUID). Equivalent to doing SelectClear then SelectAdd. type ModelingCmdDefaultCameraLookAt struct { + // Entities: Which entities to select + Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdDefaultCameraZoom: Update an annotation +// ModelingCmdDefaultCameraZoom: Create a new annotation type ModelingCmdDefaultCameraZoom struct { - // AnnotationID: Which annotation to update - AnnotationID UUID `json:"annotation_id" yaml:"annotation_id" schema:"annotation_id,required"` - // Options: If any of these fields are set, they will overwrite the previous options for the annotation. + // AnnotationType: What type of annotation to create. + AnnotationType AnnotationType `json:"annotation_type" yaml:"annotation_type" schema:"annotation_type,required"` + // Clobber: If true, any existing drawables within the obj will be replaced (the object will be reset) + Clobber bool `json:"clobber" yaml:"clobber" schema:"clobber,required"` + // Options: What should the annotation contain? Options AnnotationOptions `json:"options" yaml:"options" schema:"options,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` @@ -1954,66 +2088,76 @@ type ModelingCmdDistance struct { Vantage Point3D `json:"vantage" yaml:"vantage" schema:"vantage,required"` } -// ModelingCmdDistanceToPlane: Bring an object to the front of the scene +// ModelingCmdDistanceToPlane: Hide or show an object type ModelingCmdDistanceToPlane struct { + // Hidden: Whether or not the object should be hidden. + Hidden bool `json:"hidden" yaml:"hidden" schema:"hidden,required"` // ObjectID: Which object to change ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdEditModeEnter: Add a gizmo showing the axes. +// ModelingCmdEditModeEnter: Query the given path type ModelingCmdEditModeEnter struct { - // Clobber: If true, any existing drawables within the obj will be replaced (the object will be reset) - Clobber bool `json:"clobber" yaml:"clobber" schema:"clobber,required"` - // GizmoMode: If true, axes gizmo will be placed in the corner of the screen. If false, it will be placed at the origin of the scene. - GizmoMode bool `json:"gizmo_mode" yaml:"gizmo_mode" schema:"gizmo_mode,required"` + // PathID: Which path to query + PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdEditModeExit: Query the given path +// ModelingCmdEditModeExit: Get curves for vertices within a path type ModelingCmdEditModeExit struct { // PathID: Which path to query PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` + // VertexIds: IDs of the vertices for which to obtain curve ids from + VertexIds []UUID `json:"vertex_ids" yaml:"vertex_ids" schema:"vertex_ids,required"` } -// ModelingCmdEntities: Stop dragging mouse. +// ModelingCmdEntities: Remove scene objects. type ModelingCmdEntities struct { + // ObjectIds: Objects to remove. + ObjectIds []UUID `json:"object_ids" yaml:"object_ids" schema:"object_ids,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` - // Window: The mouse position. - Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdEntityGetAllChildUuids: Get control points of a given curve. +// ModelingCmdEntityGetAllChildUuids: Take a snapshot. type ModelingCmdEntityGetAllChildUuids struct { - // CurveID: Which curve to query. - CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id,required"` + // Format: What image format to return. + Format ImageFormat `json:"format" yaml:"format" schema:"format,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdEntityGetChildUuid: Disable sketch mode. +// ModelingCmdEntityGetChildUuid: Get type of a given curve. type ModelingCmdEntityGetChildUuid struct { + // CurveID: Which curve to query. + CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdEntityGetNumChildren: Send a mouse move event. +// ModelingCmdEntityGetNumChildren: Send a mouse click event. Updates modified/selected entities. type ModelingCmdEntityGetNumChildren struct { - // Sequence: Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events. - Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` // Window: Where the mouse is Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdEntityGetParentID: Set the plane's color. +// ModelingCmdEntityGetParentID: Set the active tool. type ModelingCmdEntityGetParentID struct { + // Tool: What tool should be active. + Tool SceneToolType `json:"tool" yaml:"tool" schema:"tool,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdEntityID: Set the plane's color. +type ModelingCmdEntityID struct { // Color: What color it should be. Color Color `json:"color" yaml:"color" schema:"color,required"` // PlaneID: Which plane is being changed. @@ -2022,8 +2166,18 @@ type ModelingCmdEntityGetParentID struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdEntityID: Make a plane. -type ModelingCmdEntityID struct { +// ModelingCmdEntityIds: Sends object to front or back. +type ModelingCmdEntityIds struct { + // Front: Bring to front = true, send to back = false. + Front bool `json:"front" yaml:"front" schema:"front,required"` + // ObjectID: Which object is being changed. + ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdExport: Make a plane. +type ModelingCmdExport struct { // Clobber: If true, any existing drawables within the obj will be replaced (the object will be reset) Clobber bool `json:"clobber" yaml:"clobber" schema:"clobber,required"` // Hide: If true, the plane will be created but hidden initially. @@ -2040,30 +2194,6 @@ type ModelingCmdEntityID struct { YAxis Point3D `json:"y_axis" yaml:"y_axis" schema:"y_axis,required"` } -// ModelingCmdEntityIds: Gets the previous adjacent edge for the given edge, along the given face. -type ModelingCmdEntityIds struct { - // EdgeID: Which edge you want the opposite of. - EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"` - // FaceID: Which face is used to figure out the opposite edge? - FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"` - // ObjectID: Which object is being queried. - ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` - // Type: - Type string `json:"type" yaml:"type" schema:"type,required"` -} - -// ModelingCmdExport: Fade the entity in or out. -type ModelingCmdExport struct { - // DurationSeconds: How many seconds the animation should take. - DurationSeconds float64 `json:"duration_seconds" yaml:"duration_seconds" schema:"duration_seconds"` - // EntityID: Which entity is being changed. - EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` - // FadeIn: Fade in = true, fade out = false. - FadeIn bool `json:"fade_in" yaml:"fade_in" schema:"fade_in,required"` - // Type: - Type string `json:"type" yaml:"type" schema:"type,required"` -} - // ModelingCmdExtendPath: Camera drag continued. type ModelingCmdExtendPath struct { // Interaction: The type of camera drag interaction. @@ -2094,67 +2224,67 @@ type ModelingCmdExtrude struct { YAxis Point3D `json:"y_axis" yaml:"y_axis" schema:"y_axis,required"` } -// ModelingCmdFormat: Sends object to front or back. +// ModelingCmdFormat: Set opacity of the entity. type ModelingCmdFormat struct { - // Front: Bring to front = true, send to back = false. - Front bool `json:"front" yaml:"front" schema:"front,required"` - // ObjectID: Which object is being changed. - ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` + // EntityID: Which entity is being changed. + EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` + // Opacity: How transparent should it be? 0 or lower is totally transparent. 1 or greater is totally opaque. + Opacity float64 `json:"opacity" yaml:"opacity" schema:"opacity,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdHighlightSetEntities: Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane. +// ModelingCmdHighlightSetEntities: Constrain a curve. type ModelingCmdHighlightSetEntities struct { + // ConstraintBound: Which constraint to apply. + ConstraintBound PathComponentConstraintBound `json:"constraint_bound" yaml:"constraint_bound" schema:"constraint_bound,required"` + // ConstraintType: What part of the curve should be constrained. + ConstraintType PathComponentConstraintType `json:"constraint_type" yaml:"constraint_type" schema:"constraint_type,required"` + // ObjectID: Which curve to constrain. + ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdHighlightSetEntity: Get the center of mass of entities in the scene or the default scene. +// ModelingCmdHighlightSetEntity: Get the surface area of entities in the scene or the default scene. type ModelingCmdHighlightSetEntity struct { - // EntityIds: IDs of the entities to get the center of mass of. If this is empty, then the default scene is included in the center of mass. + // EntityIds: IDs of the entities to get the surface area of. If this is empty, then the default scene is included in the surface area. EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` - // OutputUnit: The output unit for the center of mass. - OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` + // OutputUnit: The output unit for the surface area. + OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` // SourceUnit: Select the unit interpretation of distances in the scene. SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdInteraction: What is this entity's parent? +// ModelingCmdInteraction: Export the scene to a file. type ModelingCmdInteraction struct { - // EntityID: ID of the entity being queried. - EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` + // EntityIds: IDs of the entities to be exported. If this is empty, then all entities are exported. + EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` + // Format: The file format to export to. + Format any `json:"format" yaml:"format" schema:"format,required"` + // SourceUnit: Select the unit interpretation of exported objects. + SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdMagnitude: Create a new annotation +// ModelingCmdMagnitude: Changes the current highlighted entity to these entities. type ModelingCmdMagnitude struct { - // AnnotationType: What type of annotation to create. - AnnotationType AnnotationType `json:"annotation_type" yaml:"annotation_type" schema:"annotation_type,required"` - // Clobber: If true, any existing drawables within the obj will be replaced (the object will be reset) - Clobber bool `json:"clobber" yaml:"clobber" schema:"clobber,required"` - // Options: What should the annotation contain? - Options AnnotationOptions `json:"options" yaml:"options" schema:"options,required"` + // Entities: Highlight these entities. + Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdEntities: Get the surface area of entities in the scene or the default scene. +// ModelingCmdModelingCmdEntities: Get the plane of the sketch mode. This is useful for getting the normal of the plane after a user selects a plane. type ModelingCmdModelingCmdEntities struct { - // EntityIds: IDs of the entities to get the surface area of. If this is empty, then the default scene is included in the surface area. - EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` - // OutputUnit: The output unit for the surface area. - OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` - // SourceUnit: Select the unit interpretation of distances in the scene. - SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdEntityID: Get type of a given curve. +// ModelingCmdModelingCmdEntityID: Get control points of a given curve. type ModelingCmdModelingCmdEntityID struct { // CurveID: Which curve to query. CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id,required"` @@ -2162,8 +2292,12 @@ type ModelingCmdModelingCmdEntityID struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdInteraction: Clear the selection +// ModelingCmdModelingCmdInteraction: Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected. type ModelingCmdModelingCmdInteraction struct { + // SelectedAtWindow: Where in the window was selected + SelectedAtWindow Point2D `json:"selected_at_window" yaml:"selected_at_window" schema:"selected_at_window,required"` + // SelectionType: What entity was selected? + SelectionType SceneSelectionType `json:"selection_type" yaml:"selection_type" schema:"selection_type,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } @@ -2176,45 +2310,43 @@ type ModelingCmdModelingCmdPath struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdSelectedAtWindow: Get the density of entities in the scene or the default scene. +// ModelingCmdModelingCmdSelectedAtWindow: Get the volume of entities in the scene or the default scene. type ModelingCmdModelingCmdSelectedAtWindow struct { - // EntityIds: IDs of the entities to get the density of. If this is empty, then the default scene is included in the density. + // EntityIds: IDs of the entities to get the volume of. If this is empty, then the default scene is included in the volume. EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` - // MaterialMass: The material mass. - MaterialMass float64 `json:"material_mass" yaml:"material_mass" schema:"material_mass,required"` - // MaterialMassUnit: The material mass unit. - MaterialMassUnit UnitMas `json:"material_mass_unit" yaml:"material_mass_unit" schema:"material_mass_unit,required"` - // OutputUnit: The output unit for the density. - OutputUnit UnitDensity `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` + // OutputUnit: The output unit for the volume. + OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` // SourceUnit: Select the unit interpretation of distances in the scene. SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdSequence: Get the volume of entities in the scene or the default scene. +// ModelingCmdModelingCmdSequence: Get the center of mass of entities in the scene or the default scene. type ModelingCmdModelingCmdSequence struct { - // EntityIds: IDs of the entities to get the volume of. If this is empty, then the default scene is included in the volume. + // EntityIds: IDs of the entities to get the center of mass of. If this is empty, then the default scene is included in the center of mass. EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` - // OutputUnit: The output unit for the volume. - OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` + // OutputUnit: The output unit for the center of mass. + OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` // SourceUnit: Select the unit interpretation of distances in the scene. SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdTarget: Take a snapshot. +// ModelingCmdModelingCmdTarget: Add a gizmo showing the axes. type ModelingCmdModelingCmdTarget struct { - // Format: What image format to return. - Format ImageFormat `json:"format" yaml:"format" schema:"format,required"` + // Clobber: If true, any existing drawables within the obj will be replaced (the object will be reset) + Clobber bool `json:"clobber" yaml:"clobber" schema:"clobber,required"` + // GizmoMode: If true, axes gizmo will be placed in the corner of the screen. If false, it will be placed at the origin of the scene. + GizmoMode bool `json:"gizmo_mode" yaml:"gizmo_mode" schema:"gizmo_mode,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdModelingCmdWindow: Removes one or more entities (by UUID) from the selection. +// ModelingCmdModelingCmdWindow: Adds one or more entities (by UUID) to the selection. type ModelingCmdModelingCmdWindow struct { - // Entities: Which entities to unselect + // Entities: Which entities to select Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` @@ -2232,24 +2364,48 @@ type ModelingCmdMovePathPen struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdOrigin: What type of entity is this? -type ModelingCmdOrigin struct { - // EntityID: ID of the entity being queried. +// ModelingCmdNewAnnotation: Duplicate the given entity, evenly spaced along the chosen axis. +type ModelingCmdNewAnnotation struct { + // Axis: Axis along which to make the copites + Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"` + // EntityID: ID of the entity being copied. EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` + // NumRepetitions: Number of repetitions to make. + NumRepetitions int `json:"num_repetitions" yaml:"num_repetitions" schema:"num_repetitions,required"` + // Spacing: Spacing between repetitions. + Spacing float64 `json:"spacing" yaml:"spacing" schema:"spacing,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdOrtho: Add a hole to a Solid2d object before extruding it. -type ModelingCmdOrtho struct { - // HoleID: The id of the path to use as the inner profile (hole). - HoleID UUID `json:"hole_id" yaml:"hole_id" schema:"hole_id,required"` - // ObjectID: Which object to add the hole to. +// ModelingCmdOptions: What is the distance between these two entities? +type ModelingCmdOptions struct { + // DistanceType: Type of distance to be measured. + DistanceType any `json:"distance_type" yaml:"distance_type" schema:"distance_type,required"` + // EntityId1: ID of the first entity being queried. + EntityId1 UUID `json:"entity_id1" yaml:"entity_id1" schema:"entity_id1,required"` + // EntityId2: ID of the second entity being queried. + EntityId2 UUID `json:"entity_id2" yaml:"entity_id2" schema:"entity_id2,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdOrigin: Bring an object to the front of the scene +type ModelingCmdOrigin struct { + // ObjectID: Which object to change ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } +// ModelingCmdOrtho: What type of entity is this? +type ModelingCmdOrtho struct { + // EntityID: ID of the entity being queried. + EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + // ModelingCmdPath: Move the path's "pen". type ModelingCmdPath struct { // Path: The ID of the command which created the path. @@ -2284,96 +2440,110 @@ type ModelingCmdSegment struct { Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdSelectAdd: Remove scene objects. +// ModelingCmdSelectAdd: Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates. type ModelingCmdSelectAdd struct { - // ObjectIds: Objects to remove. - ObjectIds []UUID `json:"object_ids" yaml:"object_ids" schema:"object_ids,required"` + // PlaneID: The plane you're intersecting against. + PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` + // Window: Window coordinates where the ray cast should be aimed. + Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdSelectClear: Continue dragging mouse. +// ModelingCmdSelectClear: Stop dragging mouse. type ModelingCmdSelectClear struct { - // Sequence: Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events. - Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` // Window: The mouse position. Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdSelectGet: Get the mass of entities in the scene or the default scene. +// ModelingCmdSelectGet: Get the density of entities in the scene or the default scene. type ModelingCmdSelectGet struct { - // EntityIds: IDs of the entities to get the mass of. If this is empty, then the default scene is included in the mass. + // EntityIds: IDs of the entities to get the density of. If this is empty, then the default scene is included in the density. EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` - // MaterialDensity: The material density. - MaterialDensity float64 `json:"material_density" yaml:"material_density" schema:"material_density,required"` - // MaterialDensityUnit: The material density unit. - MaterialDensityUnit UnitDensity `json:"material_density_unit" yaml:"material_density_unit" schema:"material_density_unit,required"` - // OutputUnit: The output unit for the mass. - OutputUnit UnitMas `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` + // MaterialMass: The material mass. + MaterialMass float64 `json:"material_mass" yaml:"material_mass" schema:"material_mass,required"` + // MaterialMassUnit: The material mass unit. + MaterialMassUnit UnitMas `json:"material_mass_unit" yaml:"material_mass_unit" schema:"material_mass_unit,required"` + // OutputUnit: The output unit for the density. + OutputUnit UnitDensity `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` // SourceUnit: Select the unit interpretation of distances in the scene. SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdSelectRemove: Find the start and end of a curve. +// ModelingCmdSelectRemove: Reconfigure the stream. type ModelingCmdSelectRemove struct { - // CurveID: ID of the curve being queried. - CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id,required"` + // Fps: Frames per second. + Fps int `json:"fps" yaml:"fps" schema:"fps,required"` + // Height: Height of the stream. + Height int `json:"height" yaml:"height" schema:"height,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` + // Width: Width of the stream. + Width int `json:"width" yaml:"width" schema:"width,required"` } -// ModelingCmdSelectReplace: Import files to the current model. +// ModelingCmdSelectReplace: Get the mass of entities in the scene or the default scene. type ModelingCmdSelectReplace struct { - // Files: Files to import - Files []ImportFile `json:"files" yaml:"files" schema:"files,required"` + // EntityIds: IDs of the entities to get the mass of. If this is empty, then the default scene is included in the mass. + EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"` + // MaterialDensity: The material density. + MaterialDensity float64 `json:"material_density" yaml:"material_density" schema:"material_density,required"` + // MaterialDensityUnit: The material density unit. + MaterialDensityUnit UnitDensity `json:"material_density_unit" yaml:"material_density_unit" schema:"material_density_unit,required"` + // OutputUnit: The output unit for the mass. + OutputUnit UnitMas `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"` + // SourceUnit: Select the unit interpretation of distances in the scene. + SourceUnit UnitLength `json:"source_unit" yaml:"source_unit" schema:"source_unit,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdSelectWithPoint: Start dragging mouse. +// ModelingCmdSelectWithPoint: Continue dragging mouse. type ModelingCmdSelectWithPoint struct { + // Sequence: Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events. + Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` // Window: The mouse position. Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdSelectedAtWindow: Get curves for vertices within a path +// ModelingCmdSelectedAtWindow: Get vertices within a path type ModelingCmdSelectedAtWindow struct { // PathID: Which path to query PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` - // VertexIds: IDs of the vertices for which to obtain curve ids from - VertexIds []UUID `json:"vertex_ids" yaml:"vertex_ids" schema:"vertex_ids,required"` } -// ModelingCmdSelectionType: Get vertices within a path +// ModelingCmdSelectionType: Start dragging mouse. type ModelingCmdSelectionType struct { - // PathID: Which path to query - PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` + // Window: The mouse position. + Window Point2D `json:"window" yaml:"window" schema:"window,required"` } -// ModelingCmdSequence: Enter edit mode +// ModelingCmdSequence: What are all UUIDs of this entity's children? type ModelingCmdSequence struct { - // Target: The edit target - Target UUID `json:"target" yaml:"target" schema:"target,required"` + // EntityID: ID of the entity being queried. + EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdSourceUnit: Set opacity of the entity. +// ModelingCmdSourceUnit: Fade the entity in or out. type ModelingCmdSourceUnit struct { + // DurationSeconds: How many seconds the animation should take. + DurationSeconds float64 `json:"duration_seconds" yaml:"duration_seconds" schema:"duration_seconds"` // EntityID: Which entity is being changed. EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` - // Opacity: How transparent should it be? 0 or lower is totally transparent. 1 or greater is totally opaque. - Opacity float64 `json:"opacity" yaml:"opacity" schema:"opacity,required"` + // FadeIn: Fade in = true, fade out = false. + FadeIn bool `json:"fade_in" yaml:"fade_in" schema:"fade_in,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } @@ -2402,39 +2572,45 @@ type ModelingCmdTo struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdUp: Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight. +// ModelingCmdUp: Find all IDs of selected entities type ModelingCmdUp struct { - // SelectedAtWindow: Coordinates of the window being clicked - SelectedAtWindow Point2D `json:"selected_at_window" yaml:"selected_at_window" schema:"selected_at_window,required"` - // Sequence: Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events. - Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdVantage: Changes the current highlighted entity to these entities. +// ModelingCmdUuid: Gets the previous adjacent edge for the given edge, along the given face. +type ModelingCmdUuid struct { + // EdgeID: Which edge you want the opposite of. + EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"` + // FaceID: Which face is used to figure out the opposite edge? + FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"` + // ObjectID: Which object is being queried. + ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// ModelingCmdVantage: Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight. type ModelingCmdVantage struct { - // Entities: Highlight these entities. - Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"` + // SelectedAtWindow: Coordinates of the window being clicked + SelectedAtWindow Point2D `json:"selected_at_window" yaml:"selected_at_window" schema:"selected_at_window,required"` + // Sequence: Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events. + Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdWindow: What is the UUID of this entity's n-th child? +// ModelingCmdWindow: How many children does the entity have? type ModelingCmdWindow struct { - // ChildIndex: Index into the entity's list of children. - ChildIndex int `json:"child_index" yaml:"child_index" schema:"child_index,required"` // EntityID: ID of the entity being queried. EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdXaxis: Gets all edges which are opposite the given edge, across all possible faces. +// ModelingCmdXaxis: Gets all faces which use the given edge. type ModelingCmdXaxis struct { - // AlongVector: If given, ohnly faces parallel to this vector will be considered. - AlongVector Point3D `json:"along_vector" yaml:"along_vector" schema:"along_vector"` - // EdgeID: Which edge you want the opposites of. + // EdgeID: Which edge you want the faces of. EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"` // ObjectID: Which object is being queried. ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` @@ -2442,12 +2618,12 @@ type ModelingCmdXaxis struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// ModelingCmdYaxis: Gets the edge opposite the given edge, along the given face. +// ModelingCmdYaxis: Gets all edges which are opposite the given edge, across all possible faces. type ModelingCmdYaxis struct { - // EdgeID: Which edge you want the opposite of. + // AlongVector: If given, ohnly faces parallel to this vector will be considered. + AlongVector Point3D `json:"along_vector" yaml:"along_vector" schema:"along_vector"` + // EdgeID: Which edge you want the opposites of. EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"` - // FaceID: Which face is used to figure out the opposite edge? - FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"` // ObjectID: Which object is being queried. ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"` // Type: @@ -2475,7 +2651,7 @@ type NewAddress struct { // Street2: The second street component. Street2 string `json:"street2" yaml:"street2" schema:"street2"` // UserID: The user ID that this address belongs to. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` // Zip: The zip component. Zip string `json:"zip" yaml:"zip" schema:"zip"` } @@ -2498,7 +2674,7 @@ const ( Oauth2GrantTypeUrnietfparamsoauthgrantTypedeviceCode Oauth2GrantType = "urn:ietf:params:oauth:grant-type:device_code" ) -// OkModelingCmdResponseData: 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`. +// OkModelingCmdResponseData: The response from the ` ` command. type OkModelingCmdResponseData struct { // Data: The response from the `Export` endpoint. Data Export `json:"data" yaml:"data" schema:"data,required"` @@ -2512,15 +2688,15 @@ type OkModelingCmdResponseEmpty struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseEntityGetAllChildUuids: The response from the `Solid3dGetNextAdjacentEdge` command. +// OkModelingCmdResponseEntityGetAllChildUuids: The response from the ` ` command. type OkModelingCmdResponseEntityGetAllChildUuids struct { - // Data: The response from the `Solid3dGetNextAdjacentEdge` command. - Data Solid3DGetNextAdjacentEdge `json:"data" yaml:"data" schema:"data,required"` + // Data: The response from the `Solid3dGetOppositeEdge` command. + Data Solid3DGetOppositeEdge `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseEntityGetChildUuid: The response from the `SelectGet` command. +// OkModelingCmdResponseEntityGetChildUuid: The response from the ` ` command. type OkModelingCmdResponseEntityGetChildUuid struct { // Data: The response from the `SelectGet` command. Data SelectGet `json:"data" yaml:"data" schema:"data,required"` @@ -2528,23 +2704,39 @@ type OkModelingCmdResponseEntityGetChildUuid struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseEntityGetNumChildren: The response from the `Solid3dGetAllEdgeFaces` command. +// OkModelingCmdResponseEntityGetDistance: The response from the ` ` command. +type OkModelingCmdResponseEntityGetDistance struct { + // Data: The response from the `TakeSnapshot` command. + Data TakeSnapshot `json:"data" yaml:"data" schema:"data,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// OkModelingCmdResponseEntityGetNumChildren: The response from the ` ` command. type OkModelingCmdResponseEntityGetNumChildren struct { + // Data: The response from the `EntitiesGetDistance` command. + Data EntityGetDistance `json:"data" yaml:"data" schema:"data,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// OkModelingCmdResponseEntityGetParentID: The response from the ` ` command. +type OkModelingCmdResponseEntityGetParentID struct { // Data: The response from the `Solid3dGetAllEdgeFaces` command. Data Solid3DGetAllEdgeFaces `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseEntityGetParentID: The response from the `Solid3dGetOppositeEdge` command. -type OkModelingCmdResponseEntityGetParentID struct { - // Data: The response from the `Solid3dGetOppositeEdge` command. - Data Solid3DGetOppositeEdge `json:"data" yaml:"data" schema:"data,required"` +// OkModelingCmdResponseEntityLinearPattern: The response from the ` ` command. +type OkModelingCmdResponseEntityLinearPattern struct { + // Data: The response from the `PathGetCurveUuidsForVertices` command. + Data PathGetCurveUuidsForVertices `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseExport: The response from the `SelectWithPoint` command. +// OkModelingCmdResponseExport: The response from the ` ` command. type OkModelingCmdResponseExport struct { // Data: The response from the `SelectWithPoint` command. Data SelectWithPoint `json:"data" yaml:"data" schema:"data,required"` @@ -2552,15 +2744,15 @@ type OkModelingCmdResponseExport struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseGetEntityType: The response from the `Take Snapshot` command. +// OkModelingCmdResponseGetEntityType: The response from the ` ` command. type OkModelingCmdResponseGetEntityType struct { - // Data: The response from the `TakeSnapshot` command. - Data TakeSnapshot `json:"data" yaml:"data" schema:"data,required"` + // Data: The response from the `CurveGetType` command. + Data CurveGetType `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseHighlightSetEntity: The response from the `EntityGetParentId` command. +// OkModelingCmdResponseHighlightSetEntity: The response from the ` ` command. type OkModelingCmdResponseHighlightSetEntity struct { // Data: The response from the `EntityGetParentId` command. Data EntityGetParentID `json:"data" yaml:"data" schema:"data,required"` @@ -2568,15 +2760,7 @@ type OkModelingCmdResponseHighlightSetEntity struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseMouseClick: The response from the `GetSketchModePlane` command. -type OkModelingCmdResponseMouseClick struct { - // Data: The plane for sketch mode. - Data GetSketchModePlane `json:"data" yaml:"data" schema:"data,required"` - // Type: - Type string `json:"type" yaml:"type" schema:"type,required"` -} - -// OkModelingCmdResponseOkModelingCmdResponseData: The response from the `CenterOfMass` command. +// OkModelingCmdResponseOkModelingCmdResponseData: The response from the ` ` command. type OkModelingCmdResponseOkModelingCmdResponseData struct { // Data: The center of mass response. Data CenterOfMass `json:"data" yaml:"data" schema:"data,required"` @@ -2584,15 +2768,15 @@ type OkModelingCmdResponseOkModelingCmdResponseData struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSelectGet: The response from the `CurveGetType` command. +// OkModelingCmdResponseSelectGet: The response from the ` ` command. type OkModelingCmdResponseSelectGet struct { - // Data: The response from the `CurveGetType` command. - Data CurveGetType `json:"data" yaml:"data" schema:"data,required"` + // Data: The response from the `Solid3dGetNextAdjacentEdge` command. + Data Solid3DGetNextAdjacentEdge `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSelectWithPoint: The response from the `EntityGetChildUuid` command. +// OkModelingCmdResponseSelectWithPoint: The response from the ` ` command. type OkModelingCmdResponseSelectWithPoint struct { // Data: The response from the `EntityGetChildUuid` command. Data EntityGetChildUuid `json:"data" yaml:"data" schema:"data,required"` @@ -2600,42 +2784,42 @@ type OkModelingCmdResponseSelectWithPoint struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSolid3DgetAllEdgeFaces: The response from the `Path Get Curve UUIDs for Vertices` command. +// OkModelingCmdResponseSolid3DgetAllEdgeFaces: The response from the ` ` command. type OkModelingCmdResponseSolid3DgetAllEdgeFaces struct { - // Data: The response from the `PathGetCurveUuidsForVertices` command. - Data PathGetCurveUuidsForVertices `json:"data" yaml:"data" schema:"data,required"` + // Data: Corresponding coordinates of given window coordinates, intersected on given plane. + Data PlaneIntersectAndProject `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSolid3DgetAllOppositeEdges: The response from the `PlaneIntersectAndProject` command. +// OkModelingCmdResponseSolid3DgetAllOppositeEdges: The response from the ` ` command. type OkModelingCmdResponseSolid3DgetAllOppositeEdges struct { - // Data: Corresponding coordinates of given window coordinates, intersected on given plane. - Data PlaneIntersectAndProject `json:"data" yaml:"data" schema:"data,required"` + // Data: Data from importing the files + Data ImportFiles `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSolid3DgetNextAdjacentEdge: The response from the `SurfaceArea` command. +// OkModelingCmdResponseSolid3DgetNextAdjacentEdge: The response from the ` ` command. type OkModelingCmdResponseSolid3DgetNextAdjacentEdge struct { - // Data: The surface area response. - Data SurfaceArea `json:"data" yaml:"data" schema:"data,required"` + // Data: The plane for sketch mode. + Data GetSketchModePlane `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSolid3DgetOppositeEdge: The response from the `ImportFiles` command. +// OkModelingCmdResponseSolid3DgetOppositeEdge: The response from the ` ` command. type OkModelingCmdResponseSolid3DgetOppositeEdge struct { - // Data: Data from importing the files - Data ImportFiles `json:"data" yaml:"data" schema:"data,required"` + // Data: The volume response. + Data Volume `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } -// OkModelingCmdResponseSolid3DgetPrevAdjacentEdge: The response from the `Volume` command. +// OkModelingCmdResponseSolid3DgetPrevAdjacentEdge: The response from the ` ` command. type OkModelingCmdResponseSolid3DgetPrevAdjacentEdge struct { - // Data: The volume response. - Data Volume `json:"data" yaml:"data" schema:"data,required"` + // Data: The surface area response. + Data SurfaceArea `json:"data" yaml:"data" schema:"data,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } @@ -2682,11 +2866,15 @@ type OkWebSocketResponseDataTrickleIce struct { // Onboarding: Onboarding details type Onboarding struct { - // FirstCallFromTheirMachineDate: When the user first called an endpoint from their machine (i.e. not a litterbox execution) + // FirstCallFromModelingAppDate: When the user first used the modeling app. + FirstCallFromModelingAppDate string `json:"first_call_from_modeling_app_date" yaml:"first_call_from_modeling_app_date" schema:"first_call_from_modeling_app_date"` + // FirstCallFromTextToCadDate: When the user first used text-to-CAD. + FirstCallFromTextToCadDate string `json:"first_call_from_text_to_cad_date" yaml:"first_call_from_text_to_cad_date" schema:"first_call_from_text_to_cad_date"` + // FirstCallFromTheirMachineDate: When the user first called an endpoint from their machine (i.e. not a litterbox execution). FirstCallFromTheirMachineDate string `json:"first_call_from_their_machine_date" yaml:"first_call_from_their_machine_date" schema:"first_call_from_their_machine_date"` - // FirstLitterboxExecuteDate: When the user first used the litterbox + // FirstLitterboxExecuteDate: When the user first used the litterbox. FirstLitterboxExecuteDate string `json:"first_litterbox_execute_date" yaml:"first_litterbox_execute_date" schema:"first_litterbox_execute_date"` - // FirstTokenDate: When the user created their first token + // FirstTokenDate: When the user created their first token. FirstTokenDate string `json:"first_token_date" yaml:"first_token_date" schema:"first_token_date"` } @@ -2706,6 +2894,8 @@ type OutputFormatCoords struct { // // [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html Coords System `json:"coords" yaml:"coords" schema:"coords,required"` + // Selection: Export selection. + Selection any `json:"selection" yaml:"selection" schema:"selection,required"` // Storage: Export storage. Storage StlStorage `json:"storage" yaml:"storage" schema:"storage,required"` // Type: @@ -2716,7 +2906,7 @@ type OutputFormatCoords struct { Units UnitLength `json:"units" yaml:"units" schema:"units,required"` } -// OutputFormatFbx: 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. +// OutputFormatFbx: 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 OutputFormatFbx struct { // Presentation: Specifies how the JSON will be presented. Presentation GltfPresentation `json:"presentation" yaml:"presentation" schema:"presentation,required"` @@ -2746,10 +2936,16 @@ type OutputFormatOutputFormatStorage struct { // // [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html Coords System `json:"coords" yaml:"coords" schema:"coords,required"` + // Selection: Export selection. + Selection any `json:"selection" yaml:"selection" schema:"selection,required"` // Storage: The storage for the output PLY file. Storage PlyStorage `json:"storage" yaml:"storage" schema:"storage,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` + // Units: Export length unit. + // + // Defaults to meters. + Units UnitLength `json:"units" yaml:"units" schema:"units,required"` } // OutputFormatPresentation: Wavefront OBJ format. @@ -2792,6 +2988,36 @@ const ( PathCommandAddArc PathCommand = "add_arc" ) +// PathComponentConstraintBound: The path component constraint bounds type +type PathComponentConstraintBound string + +const ( + // PathComponentConstraintBoundUnconstrained represents the PathComponentConstraintBound `"unconstrained"`. + PathComponentConstraintBoundUnconstrained PathComponentConstraintBound = "unconstrained" + // PathComponentConstraintBoundPartiallyConstrained represents the PathComponentConstraintBound `"partially_constrained"`. + PathComponentConstraintBoundPartiallyConstrained PathComponentConstraintBound = "partially_constrained" + // PathComponentConstraintBoundFullyConstrained represents the PathComponentConstraintBound `"fully_constrained"`. + PathComponentConstraintBoundFullyConstrained PathComponentConstraintBound = "fully_constrained" +) + +// PathComponentConstraintType: The path component constraint type +type PathComponentConstraintType string + +const ( + // PathComponentConstraintTypeUnconstrained represents the PathComponentConstraintType `"unconstrained"`. + PathComponentConstraintTypeUnconstrained PathComponentConstraintType = "unconstrained" + // PathComponentConstraintTypeVertical represents the PathComponentConstraintType `"vertical"`. + PathComponentConstraintTypeVertical PathComponentConstraintType = "vertical" + // PathComponentConstraintTypeHorizontal represents the PathComponentConstraintType `"horizontal"`. + PathComponentConstraintTypeHorizontal PathComponentConstraintType = "horizontal" + // PathComponentConstraintTypeEqualLength represents the PathComponentConstraintType `"equal_length"`. + PathComponentConstraintTypeEqualLength PathComponentConstraintType = "equal_length" + // PathComponentConstraintTypeParallel represents the PathComponentConstraintType `"parallel"`. + PathComponentConstraintTypeParallel PathComponentConstraintType = "parallel" + // PathComponentConstraintTypeAngleBetween represents the PathComponentConstraintType `"angle_between"`. + PathComponentConstraintTypeAngleBetween PathComponentConstraintType = "angle_between" +) + // PathGetCurveUuidsForVertices: The response from the `PathGetCurveUuidsForVertices` command. type PathGetCurveUuidsForVertices struct { // CurveIds: The UUIDs of the curve entities. @@ -2810,8 +3036,8 @@ type PathGetVertexUuids struct { VertexIds []UUID `json:"vertex_ids" yaml:"vertex_ids" schema:"vertex_ids,required"` } -// PathSegmentAngleEnd: Adds a tangent arc from current pen position with the given radius and angle. -type PathSegmentAngleEnd struct { +// PathSegmentCenter: Adds a tangent arc from current pen position with the given radius and angle. +type PathSegmentCenter struct { // Offset: Offset of the arc. Offset Angle `json:"offset" yaml:"offset" schema:"offset,required"` // Radius: Radius of the arc. Not to be confused with Raiders of the Lost Ark. @@ -2820,16 +3046,6 @@ type PathSegmentAngleEnd struct { Type string `json:"type" yaml:"type" schema:"type,required"` } -// PathSegmentAngleStart: Adds a tangent arc from current pen position to the new position. -type PathSegmentAngleStart struct { - // AngleSnapIncrement: 0 will be interpreted as none/null. - AngleSnapIncrement Angle `json:"angle_snap_increment" yaml:"angle_snap_increment" schema:"angle_snap_increment"` - // To: Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position. - To Point3D `json:"to" yaml:"to" schema:"to,required"` - // Type: - Type string `json:"type" yaml:"type" schema:"type,required"` -} - // PathSegmentEnd: A straight line segment. Goes from the current path "pen" to the given endpoint. type PathSegmentEnd struct { // End: End point of the line. @@ -2864,26 +3080,28 @@ type PathSegmentLine struct { Type string `json:"type" yaml:"type" schema:"type,required"` } +// PathSegmentPathSegmentEnd: Adds a tangent arc from current pen position to the new position. +type PathSegmentPathSegmentEnd struct { + // AngleSnapIncrement: 0 will be interpreted as none/null. + AngleSnapIncrement Angle `json:"angle_snap_increment" yaml:"angle_snap_increment" schema:"angle_snap_increment"` + // To: Where the arc should end. Must lie in the same plane as the current path pen position. Must not be colinear with current path pen position. + To Point3D `json:"to" yaml:"to" schema:"to,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + // PathSegmentRelative: A circular arc segment. type PathSegmentRelative struct { - // AngleEnd: End of the arc along circle's perimeter, in degrees. Deprecated: use `end` instead. - // - // Deprecated: AngleEnd is deprecated. - AngleEnd float64 `json:"angle_end" yaml:"angle_end" schema:"angle_end,required"` - // AngleStart: Start of the arc along circle's perimeter, in degrees. Deprecated: use `start` instead. - // - // Deprecated: AngleStart is deprecated. - AngleStart float64 `json:"angle_start" yaml:"angle_start" schema:"angle_start,required"` // Center: Center of the circle Center Point2D `json:"center" yaml:"center" schema:"center,required"` - // End: End of the arc along circle's perimeter. If not given, this will use `degrees_end` instead. - End Angle `json:"end" yaml:"end" schema:"end"` + // End: End of the arc along circle's perimeter. + End Angle `json:"end" yaml:"end" schema:"end,required"` // Radius: Radius of the circle Radius float64 `json:"radius" yaml:"radius" schema:"radius,required"` // Relative: Whether or not this arc is a relative offset Relative bool `json:"relative" yaml:"relative" schema:"relative,required"` - // Start: Start of the arc along circle's perimeter. If not given, this will use `degrees_start` instead. - Start Angle `json:"start" yaml:"start" schema:"start"` + // Start: Start of the arc along circle's perimeter. + Start Angle `json:"start" yaml:"start" schema:"start,required"` // Type: Type string `json:"type" yaml:"type" schema:"type,required"` } @@ -2970,7 +3188,7 @@ type Pong struct { Message string `json:"message" yaml:"message" schema:"message,required"` } -// RawFile: A raw file with unencoded contents to be passed over binary websockets. +// RawFile: 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 RawFile struct { // Contents: The contents of the file. Contents []int `json:"contents" yaml:"contents" schema:"contents,required"` @@ -3068,6 +3286,44 @@ type SelectWithPoint struct { EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"` } +// SelectionDefaultScene: Visit the default scene. +type SelectionDefaultScene struct { + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// SelectionIndex: Visit the indexed scene. +type SelectionIndex struct { + // Index: The index. + Index int `json:"index" yaml:"index" schema:"index,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// SelectionName: Visit the indexed mesh. +type SelectionName struct { + // Index: The index. + Index int `json:"index" yaml:"index" schema:"index,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// SelectionSceneByIndex: Visit the first scene with the given name. +type SelectionSceneByIndex struct { + // Name: The name. + Name string `json:"name" yaml:"name" schema:"name,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + +// SelectionSceneByName: Visit the first mesh with the given name. +type SelectionSceneByName struct { + // Name: The name. + Name string `json:"name" yaml:"name" schema:"name,required"` + // Type: + Type string `json:"type" yaml:"type" schema:"type,required"` +} + // Session: An authentication session. // For our UIs, these are automatically created by Next.js. type Session struct { @@ -3076,13 +3332,13 @@ type Session struct { // Expires: The date and time the session expires. Expires Time `json:"expires" yaml:"expires" schema:"expires,required"` // ID: The unique identifier for the session. - ID string `json:"id" yaml:"id" schema:"id"` + ID UUID `json:"id" yaml:"id" schema:"id,required"` // SessionToken: The session token. SessionToken UUID `json:"session_token" yaml:"session_token" schema:"session_token,required"` // UpdatedAt: The date and time the session was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user that the session belongs to. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // Solid3DGetAllEdgeFaces: The response from the `Solid3dGetAllEdgeFaces` command. @@ -3193,7 +3449,7 @@ type TextToCad struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // TextToCadCreateBody: Body for generating models from text. @@ -3247,7 +3503,7 @@ type UnitAngleConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitArea: The valid types of area units. @@ -3299,7 +3555,7 @@ type UnitAreaConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitCurrent: The valid types of current units. @@ -3343,7 +3599,7 @@ type UnitCurrentConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitDensity: The valid types for density units. @@ -3401,7 +3657,7 @@ type UnitEnergyConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitForce: The valid types of force units. @@ -3451,7 +3707,7 @@ type UnitForceConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitFrequency: The valid types of frequency units. @@ -3503,7 +3759,7 @@ type UnitFrequencyConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitLength: The valid types of length units. @@ -3551,7 +3807,7 @@ type UnitLengthConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitMas: The valid types of mass units. @@ -3593,7 +3849,7 @@ type UnitMassConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitPower: The valid types of power units. @@ -3643,7 +3899,7 @@ type UnitPowerConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitPressure: The valid types of pressure units. @@ -3693,7 +3949,7 @@ type UnitPressureConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitTemperature: The valid types of temperature units. @@ -3737,7 +3993,7 @@ type UnitTemperatureConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitTorque: The valid types of torque units. @@ -3777,7 +4033,7 @@ type UnitTorqueConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UnitVolume: The valid types of volume units. @@ -3831,7 +4087,7 @@ type UnitVolumeConversion struct { // UpdatedAt: The time and date the API call was last updated. UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"` // UserID: The user ID of the user who created the API call. - UserID string `json:"user_id" yaml:"user_id" schema:"user_id"` + UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"` } // UpdateUser: The user-modifiable parts of a User. @@ -3867,7 +4123,7 @@ type User struct { // Github: The user's GitHub handle. Github string `json:"github" yaml:"github" schema:"github"` // ID: The unique identifier for the user. - ID string `json:"id" yaml:"id" schema:"id"` + ID UUID `json:"id" yaml:"id" schema:"id,required"` // Image: The image avatar for the user. This is a URL. Image URL `json:"image" yaml:"image" schema:"image,required"` // LastName: The user's last name. @@ -3896,7 +4152,7 @@ type VerificationToken struct { // Expires: The date and time the verification token expires. Expires Time `json:"expires" yaml:"expires" schema:"expires,required"` // ID: The token used for verification. This is used as the id for the table since it is unique per record. - ID string `json:"id" yaml:"id" schema:"id"` + ID UUID `json:"id" yaml:"id" schema:"id,required"` // Identifier: The identifier for the user. This is typically the user's email address since that is what we are verifying. Identifier string `json:"identifier" yaml:"identifier" schema:"identifier"` // UpdatedAt: The date and time the verification token was last updated.