diff --git a/paths.go b/paths.go index d817716..4ec88a6 100644 --- a/paths.go +++ b/paths.go @@ -16,7 +16,6 @@ import ( ) // GetSchema: Get OpenAPI schema. -// func (s *MetaService) GetSchema() error { // Create the url. path := "/" @@ -46,7 +45,6 @@ func (s *MetaService) GetSchema() error { } // GetAiPluginManifest: Get AI plugin manifest. -// func (s *MetaService) GetAiPluginManifest() (*AiPluginManifest, error) { // Create the url. path := "/.well-known/ai-plugin.json" @@ -85,10 +83,8 @@ 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. -// func (s *MetaService) Getdata() (*Metadata, error) { // Create the url. path := "/_meta/info" @@ -127,14 +123,11 @@ func (s *MetaService) Getdata() (*Metadata, error) { } // CreateImageTo3D: Generate a 3D model from an image. -// -// // Parameters // -// - `inputFormat`: An enumeration. -// - `outputFormat`: The valid types of output file formats. -// - `body` -// +// - `inputFormat`: An enumeration. +// - `outputFormat`: The valid types of output file formats. +// - `body` func (s *AiService) CreateImageTo3D(inputFormat ImageType, outputFormat FileExportFormat, body []byte) (*Mesh, error) { // Create the url. path := "/ai/image-to-3d/{{.input_format}}/{{.output_format}}" @@ -186,13 +179,10 @@ func (s *AiService) CreateImageTo3D(inputFormat ImageType, outputFormat FileExpo } // CreateTextTo3D: Generate a 3D model from text. -// -// // Parameters // -// - `outputFormat`: The valid types of output file formats. -// - `prompt` -// +// - `outputFormat`: The valid types of output file formats. +// - `prompt` func (s *AiService) CreateTextTo3D(outputFormat FileExportFormat, prompt string) (*Mesh, error) { // Create the url. path := "/ai/text-to-3d/{{.output_format}}" @@ -239,14 +229,11 @@ func (s *AiService) CreateTextTo3D(outputFormat FileExportFormat, prompt string) } // GetMetrics: Get API call metrics. -// // This endpoint requires authentication by a KittyCAD employee. The API calls are grouped by the parameter passed. // -// // Parameters // -// - `groupBy`: The field of an API call to group by. -// +// - `groupBy`: The field of an API call to group by. func (s *APICallService) GetMetrics(groupBy APICallQueryGroupBy) (*[]APICallQueryGroup, error) { // Create the url. path := "/api-call-metrics" @@ -292,18 +279,17 @@ 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. // -// // Parameters // -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `limit` +// +// - `pageToken` // -// Currently, we only support scanning in ascending order. +// - `sortBy`: Supported set of sort modes for scanning by created_at only. // +// Currently, we only support scanning in ascending order. func (s *APICallService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error) { // Create the url. path := "/api-calls" @@ -351,16 +337,13 @@ 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. // 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. // -// // Parameters // -// - `id` -// +// - `id` func (s *APICallService) Get(id string) (*APICallWithPrice, error) { // Create the url. path := "/api-calls/{{.id}}" @@ -406,15 +389,12 @@ 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. // -// // Parameters // -// - `body` -// +// - `body` func (s *AppService) GithubCallback(body any) error { // Create the url. path := "/apps/github/callback" @@ -453,10 +433,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. -// func (s *AppService) GithubConsent() (*AppClientInfo, error) { // Create the url. path := "/apps/github/consent" @@ -495,14 +473,11 @@ func (s *AppService) GithubConsent() (*AppClientInfo, error) { } // GithubWebhook: Listen for GitHub webhooks. -// // These come from the GitHub app. // -// // Parameters // -// - `body` -// +// - `body` func (s *AppService) GithubWebhook(body []byte) error { // Create the url. path := "/apps/github/webhook" @@ -537,20 +512,20 @@ 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. // -// // Parameters // -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `limit` +// +// - `pageToken` // -// Currently, we only support scanning in ascending order. -// - `status`: The status of an async API call. +// - `sortBy`: Supported set of sort modes for scanning by created_at only. // +// Currently, we only support scanning in ascending order. +// +// - `status`: The status of an async API call. func (s *APICallService) ListAsyncOperations(limit int, pageToken string, sortBy CreatedAtSortMode, status APICallStatus) (*AsyncAPICallResultsPage, error) { // Create the url. path := "/async/operations" @@ -599,17 +574,14 @@ 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. // 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. // -// // Parameters // -// - `id` -// +// - `id` func (s *APICallService) GetAsyncOperation(id string) (*any, error) { // Create the url. path := "/async/operations/{{.id}}" @@ -655,12 +627,9 @@ func (s *APICallService) GetAsyncOperation(id string) (*any, error) { } // AuthEmail: Create an email verification request for a user. -// -// // Parameters // -// - `body`: The body of the form for email authentication. -// +// - `body`: The body of the form for email authentication. func (s *HiddenService) AuthEmail(body EmailAuthenticationForm) (*VerificationToken, error) { // Create the url. path := "/auth/email" @@ -708,14 +677,11 @@ func (s *HiddenService) AuthEmail(body EmailAuthenticationForm) (*VerificationTo } // AuthEmailCallback: Listen for callbacks for email verification for users. -// -// // Parameters // -// - `callbackUrl` -// - `email` -// - `token` -// +// - `callbackUrl` +// - `email` +// - `token` func (s *HiddenService) AuthEmailCallback(callbackUrl URL, email string, token string) error { // Create the url. path := "/auth/email/callback" @@ -754,12 +720,9 @@ func (s *HiddenService) AuthEmailCallback(callbackUrl URL, email string, token s } // GetPhysics: Get a physics constant. -// -// // Parameters // -// - `constant`: The valid types of phys constant names. -// +// - `constant`: The valid types of phys constant names. func (s *ConstantService) GetPhysics(constant PhysicsConstantName) (*PhysicsConstant, error) { // Create the url. path := "/constant/physics/{{.constant}}" @@ -805,18 +768,15 @@ func (s *ConstantService) GetPhysics(constant PhysicsConstantName) (*PhysicsCons } // Create2DVectorConversion: Convert 2D Vector file. -// // Convert a 2D Vector file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. // If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. // 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. // -// // Parameters // -// - `outputFormat`: The valid types of Vector output file formats. -// - `srcFormat`: The valid types of Vector source file formats. -// - `body` -// +// - `outputFormat`: The valid types of Vector output file formats. +// - `srcFormat`: The valid types of Vector source file formats. +// - `body` func (s *FileService) Create2DVectorConversion(outputFormat File2DVectorExportFormat, srcFormat File2DVectorImportFormat, body []byte) (*File2DVectorConversion, error) { // Create the url. path := "/file/2d/vector/conversion/{{.src_format}}/{{.output_format}}" @@ -868,18 +828,15 @@ func (s *FileService) Create2DVectorConversion(outputFormat File2DVectorExportFo } // Create3DConversion: Convert 3D file. -// // Convert a 3D file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. // If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. // 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. // -// // Parameters // -// - `outputFormat`: The valid types of 3d output file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `body` -// +// - `outputFormat`: The valid types of 3d output file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `body` func (s *FileService) Create3DConversion(outputFormat File3DExportFormat, srcFormat File3DImportFormat, body []byte) (*File3DConversion, error) { // Create the url. path := "/file/3d/conversion/{{.src_format}}/{{.output_format}}" @@ -931,16 +888,13 @@ func (s *FileService) Create3DConversion(outputFormat File3DExportFormat, srcFor } // CreateCenterOfMass: Get CAD file center of mass. -// // 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. // -// // Parameters // -// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `body` -// +// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `body` func (s *FileService) CreateCenterOfMass(srcFormat File3DImportFormat, body []byte) (*FileCenterOfMass, error) { // Create the url. path := "/file/center-of-mass" @@ -991,18 +945,15 @@ func (s *FileService) CreateCenterOfMass(srcFormat File3DImportFormat, body []by } // CreateConversion: Convert CAD file. -// // Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously. // If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string. // 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. // -// // Parameters // -// - `outputFormat`: The valid types of output file formats. -// - `srcFormat`: The valid types of source file formats. -// - `body` -// +// - `outputFormat`: The valid types of output file formats. +// - `srcFormat`: The valid types of source file formats. +// - `body` func (s *FileService) CreateConversion(outputFormat FileExportFormat, srcFormat FileImportFormat, body []byte) (*FileConversion, error) { // Create the url. path := "/file/conversion/{{.src_format}}/{{.output_format}}" @@ -1054,17 +1005,14 @@ func (s *FileService) CreateConversion(outputFormat FileExportFormat, srcFormat } // GetConversion: Get a file conversion. -// // Get the status and output of an async file conversion. // This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. // If the user is not authenticated to view the specified file conversion, then it is not returned. // Only KittyCAD employees with the proper access can view file conversions for other users. // -// // Parameters // -// - `id` -// +// - `id` func (s *FileService) GetConversion(id string) (*any, error) { // Create the url. path := "/file/conversions/{{.id}}" @@ -1110,17 +1058,14 @@ func (s *FileService) GetConversion(id string) (*any, error) { } // CreateDensity: Get CAD file density. -// // Get the density 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. // -// // Parameters // -// - `materialMass` -// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `body` -// +// - `materialMass` +// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `body` func (s *FileService) CreateDensity(materialMass float64, srcFormat File3DImportFormat, body []byte) (*FileDensity, error) { // Create the url. path := "/file/density" @@ -1172,14 +1117,11 @@ func (s *FileService) CreateDensity(materialMass float64, srcFormat File3DImport } // CreateExecution: Execute a KittyCAD program in a specific language. -// -// // Parameters // -// - `lang`: The language code is written in. -// - `output` -// - `body` -// +// - `lang`: The language code is written in. +// - `output` +// - `body` func (s *FileService) CreateExecution(lang CodeLanguage, output string, body []byte) (*CodeOutput, error) { // Create the url. path := "/file/execute/{{.lang}}" @@ -1231,17 +1173,14 @@ func (s *FileService) CreateExecution(lang CodeLanguage, output string, body []b } // CreateMass: Get CAD file mass. -// // Get the 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. // -// // Parameters // -// - `materialDensity` -// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `body` -// +// - `materialDensity` +// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `body` func (s *FileService) CreateMass(materialDensity float64, srcFormat File3DImportFormat, body []byte) (*FileMass, error) { // Create the url. path := "/file/mass" @@ -1293,16 +1232,13 @@ func (s *FileService) CreateMass(materialDensity float64, srcFormat File3DImport } // CreateSurfaceArea: Get CAD file surface area. -// // Get the surface area 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. // -// // Parameters // -// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `body` -// +// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `body` func (s *FileService) CreateSurfaceArea(srcFormat File3DImportFormat, body []byte) (*FileSurfaceArea, error) { // Create the url. path := "/file/surface-area" @@ -1353,16 +1289,13 @@ func (s *FileService) CreateSurfaceArea(srcFormat File3DImportFormat, body []byt } // CreateVolume: Get CAD file volume. -// // Get the volume 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. // -// // Parameters // -// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. -// - `body` -// +// - `srcFormat`: The valid types of 3d source file formats, can include formats that use suplimentary files. For example, the OBJ format can use a MTL file. +// - `body` func (s *FileService) CreateVolume(srcFormat File3DImportFormat, body []byte) (*FileVolume, error) { // Create the url. path := "/file/volume" @@ -1413,9 +1346,7 @@ func (s *FileService) CreateVolume(srcFormat File3DImportFormat, body []byte) (* } // Logout: This endpoint removes the session cookie for a user. -// // This is used in logout scenarios. -// func (s *HiddenService) Logout() error { // Create the url. path := "/logout" @@ -1445,14 +1376,11 @@ func (s *HiddenService) Logout() error { } // DeviceAuthRequest: Start an OAuth 2.0 Device Authorization Grant. -// // This endpoint is designed to be accessed from an *unauthenticated* API client. It generates and records a `device_code` and `user_code` which must be verified and confirmed prior to a token being granted. // -// // Parameters // -// - `body`: The request parameters for the OAuth 2.0 Device Authorization Grant flow. -// +// - `body`: The request parameters for the OAuth 2.0 Device Authorization Grant flow. func (s *Oauth2Service) DeviceAuthRequest(body DeviceAuthRequestForm) error { // Create the url. path := "/oauth2/device/auth" @@ -1494,14 +1422,11 @@ func (s *Oauth2Service) DeviceAuthRequest(body DeviceAuthRequestForm) error { } // DeviceAuthConfirm: Confirm an OAuth 2.0 Device Authorization Grant. -// // This endpoint is designed to be accessed by the user agent (browser), not the client requesting the token. So we do not actually return the token here; it will be returned in response to the poll on `/oauth2/device/token`. // -// // Parameters // -// - `body`: The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant. -// +// - `body`: The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant. func (s *Oauth2Service) DeviceAuthConfirm(body DeviceAuthVerifyParams) error { // Create the url. path := "/oauth2/device/confirm" @@ -1540,14 +1465,11 @@ func (s *Oauth2Service) DeviceAuthConfirm(body DeviceAuthVerifyParams) error { } // DeviceAccessToken: Request a device access token. -// // This endpoint should be polled by the client until the user code is verified and the grant is confirmed. // -// // Parameters // -// - `body`: The form for a device access token request. -// +// - `body`: The form for a device access token request. func (s *Oauth2Service) DeviceAccessToken(body DeviceAccessTokenRequestForm) error { // Create the url. path := "/oauth2/device/token" @@ -1589,14 +1511,11 @@ func (s *Oauth2Service) DeviceAccessToken(body DeviceAccessTokenRequestForm) err } // DeviceAuthVerify: Verify an OAuth 2.0 Device Authorization Grant. -// // This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website. // -// // Parameters // -// - `userCode` -// +// - `userCode` func (s *Oauth2Service) DeviceAuthVerify(userCode string) error { // Create the url. path := "/oauth2/device/verify" @@ -1633,14 +1552,11 @@ func (s *Oauth2Service) DeviceAuthVerify(userCode string) error { } // ProviderCallback: Listen for callbacks for the OAuth 2.0 provider. -// -// // Parameters // -// - `provider`: An account provider. -// - `code` -// - `state` -// +// - `provider`: An account provider. +// - `code` +// - `state` func (s *Oauth2Service) ProviderCallback(provider AccountProvider, code string, state string) error { // Create the url. path := "/oauth2/provider/{{.provider}}/callback" @@ -1679,13 +1595,10 @@ func (s *Oauth2Service) ProviderCallback(provider AccountProvider, code string, } // ProviderConsent: Get the consent URL and other information for the OAuth 2.0 provider. -// -// // Parameters // -// - `provider`: An account provider. -// - `callbackUrl` -// +// - `provider`: An account provider. +// - `callbackUrl` func (s *Oauth2Service) ProviderConsent(provider AccountProvider, callbackUrl string) (*OAuth2ClientInfo, error) { // Create the url. path := "/oauth2/provider/{{.provider}}/consent" @@ -1732,7 +1645,6 @@ func (s *Oauth2Service) ProviderConsent(provider AccountProvider, callbackUrl st } // Ping: Return pong. -// func (s *MetaService) Ping() (*Pong, error) { // Create the url. path := "/ping" @@ -1771,16 +1683,13 @@ func (s *MetaService) Ping() (*Pong, error) { } // GetAccelerationConversion: Convert acceleration units. -// // Convert an acceleration unit value to another acceleration unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of acceleration unit formats. -// - `srcFormat`: The valid types of acceleration unit formats. -// - `value` -// +// - `outputFormat`: The valid types of acceleration unit formats. +// - `srcFormat`: The valid types of acceleration unit formats. +// - `value` func (s *UnitService) GetAccelerationConversion(outputFormat UnitAccelerationFormat, srcFormat UnitAccelerationFormat, value float64) (*UnitAccelerationConversion, error) { // Create the url. path := "/unit/conversion/acceleration/{{.src_format}}/{{.output_format}}" @@ -1828,16 +1737,13 @@ func (s *UnitService) GetAccelerationConversion(outputFormat UnitAccelerationFor } // GetAngleConversion: Convert angle units. -// // Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of angle formats. -// - `srcFormat`: The valid types of angle formats. -// - `value` -// +// - `outputFormat`: The valid types of angle formats. +// - `srcFormat`: The valid types of angle formats. +// - `value` func (s *UnitService) GetAngleConversion(outputFormat UnitAngleFormat, srcFormat UnitAngleFormat, value float64) (*UnitAngleConversion, error) { // Create the url. path := "/unit/conversion/angle/{{.src_format}}/{{.output_format}}" @@ -1885,16 +1791,13 @@ func (s *UnitService) GetAngleConversion(outputFormat UnitAngleFormat, srcFormat } // GetAngularVelocityConversion: Convert angular velocity units. -// // Convert an angular velocity unit value to another angular velocity unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of angular velocity unit formats. -// - `srcFormat`: The valid types of angular velocity unit formats. -// - `value` -// +// - `outputFormat`: The valid types of angular velocity unit formats. +// - `srcFormat`: The valid types of angular velocity unit formats. +// - `value` func (s *UnitService) GetAngularVelocityConversion(outputFormat UnitAngularVelocityFormat, srcFormat UnitAngularVelocityFormat, value float64) (*UnitAngularVelocityConversion, error) { // Create the url. path := "/unit/conversion/angular-velocity/{{.src_format}}/{{.output_format}}" @@ -1942,16 +1845,13 @@ func (s *UnitService) GetAngularVelocityConversion(outputFormat UnitAngularVeloc } // GetAreaConversion: Convert area units. -// // Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of area unit formats. -// - `srcFormat`: The valid types of area unit formats. -// - `value` -// +// - `outputFormat`: The valid types of area unit formats. +// - `srcFormat`: The valid types of area unit formats. +// - `value` func (s *UnitService) GetAreaConversion(outputFormat UnitAreaFormat, srcFormat UnitAreaFormat, value float64) (*UnitAreaConversion, error) { // Create the url. path := "/unit/conversion/area/{{.src_format}}/{{.output_format}}" @@ -1999,16 +1899,13 @@ func (s *UnitService) GetAreaConversion(outputFormat UnitAreaFormat, srcFormat U } // GetChargeConversion: Convert charge units. -// // Convert a charge unit value to another charge unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of charge unit formats. -// - `srcFormat`: The valid types of charge unit formats. -// - `value` -// +// - `outputFormat`: The valid types of charge unit formats. +// - `srcFormat`: The valid types of charge unit formats. +// - `value` func (s *UnitService) GetChargeConversion(outputFormat UnitChargeFormat, srcFormat UnitChargeFormat, value float64) (*UnitChargeConversion, error) { // Create the url. path := "/unit/conversion/charge/{{.src_format}}/{{.output_format}}" @@ -2056,16 +1953,13 @@ func (s *UnitService) GetChargeConversion(outputFormat UnitChargeFormat, srcForm } // GetConcentrationConversion: Convert concentration units. -// // Convert a concentration unit value to another concentration unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of concentration unit formats. -// - `srcFormat`: The valid types of concentration unit formats. -// - `value` -// +// - `outputFormat`: The valid types of concentration unit formats. +// - `srcFormat`: The valid types of concentration unit formats. +// - `value` func (s *UnitService) GetConcentrationConversion(outputFormat UnitConcentrationFormat, srcFormat UnitConcentrationFormat, value float64) (*UnitConcentrationConversion, error) { // Create the url. path := "/unit/conversion/concentration/{{.src_format}}/{{.output_format}}" @@ -2113,16 +2007,13 @@ func (s *UnitService) GetConcentrationConversion(outputFormat UnitConcentrationF } // GetDataTransferRateConversion: Convert data transfer rate units. -// // Convert a data transfer rate unit value to another data transfer rate unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of data transfer unit formats. -// - `srcFormat`: The valid types of data transfer unit formats. -// - `value` -// +// - `outputFormat`: The valid types of data transfer unit formats. +// - `srcFormat`: The valid types of data transfer unit formats. +// - `value` func (s *UnitService) GetDataTransferRateConversion(outputFormat UnitDataTransferRateFormat, srcFormat UnitDataTransferRateFormat, value float64) (*UnitDataTransferRateConversion, error) { // Create the url. path := "/unit/conversion/data-transfer-rate/{{.src_format}}/{{.output_format}}" @@ -2170,16 +2061,13 @@ func (s *UnitService) GetDataTransferRateConversion(outputFormat UnitDataTransfe } // GetDataConversion: Convert data units. -// // Convert a data unit value to another data unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of data unit formats. -// - `srcFormat`: The valid types of data unit formats. -// - `value` -// +// - `outputFormat`: The valid types of data unit formats. +// - `srcFormat`: The valid types of data unit formats. +// - `value` func (s *UnitService) GetDataConversion(outputFormat UnitDataFormat, srcFormat UnitDataFormat, value float64) (*UnitDataConversion, error) { // Create the url. path := "/unit/conversion/data/{{.src_format}}/{{.output_format}}" @@ -2227,16 +2115,13 @@ func (s *UnitService) GetDataConversion(outputFormat UnitDataFormat, srcFormat U } // GetDensityConversion: Convert density units. -// // Convert a density unit value to another density unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of density unit formats. -// - `srcFormat`: The valid types of density unit formats. -// - `value` -// +// - `outputFormat`: The valid types of density unit formats. +// - `srcFormat`: The valid types of density unit formats. +// - `value` func (s *UnitService) GetDensityConversion(outputFormat UnitDensityFormat, srcFormat UnitDensityFormat, value float64) (*UnitDensityConversion, error) { // Create the url. path := "/unit/conversion/density/{{.src_format}}/{{.output_format}}" @@ -2284,16 +2169,13 @@ func (s *UnitService) GetDensityConversion(outputFormat UnitDensityFormat, srcFo } // GetEnergyConversion: Convert energy units. -// // Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of energy unit formats. -// - `srcFormat`: The valid types of energy unit formats. -// - `value` -// +// - `outputFormat`: The valid types of energy unit formats. +// - `srcFormat`: The valid types of energy unit formats. +// - `value` func (s *UnitService) GetEnergyConversion(outputFormat UnitEnergyFormat, srcFormat UnitEnergyFormat, value float64) (*UnitEnergyConversion, error) { // Create the url. path := "/unit/conversion/energy/{{.src_format}}/{{.output_format}}" @@ -2341,16 +2223,13 @@ func (s *UnitService) GetEnergyConversion(outputFormat UnitEnergyFormat, srcForm } // GetForceConversion: Convert force units. -// // Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of force unit formats. -// - `srcFormat`: The valid types of force unit formats. -// - `value` -// +// - `outputFormat`: The valid types of force unit formats. +// - `srcFormat`: The valid types of force unit formats. +// - `value` func (s *UnitService) GetForceConversion(outputFormat UnitForceFormat, srcFormat UnitForceFormat, value float64) (*UnitForceConversion, error) { // Create the url. path := "/unit/conversion/force/{{.src_format}}/{{.output_format}}" @@ -2398,16 +2277,13 @@ func (s *UnitService) GetForceConversion(outputFormat UnitForceFormat, srcFormat } // GetIlluminanceConversion: Convert illuminance units. -// // Convert a illuminance unit value to another illuminance unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of illuminance unit formats. -// - `srcFormat`: The valid types of illuminance unit formats. -// - `value` -// +// - `outputFormat`: The valid types of illuminance unit formats. +// - `srcFormat`: The valid types of illuminance unit formats. +// - `value` func (s *UnitService) GetIlluminanceConversion(outputFormat UnitIlluminanceFormat, srcFormat UnitIlluminanceFormat, value float64) (*UnitIlluminanceConversion, error) { // Create the url. path := "/unit/conversion/illuminance/{{.src_format}}/{{.output_format}}" @@ -2455,16 +2331,13 @@ func (s *UnitService) GetIlluminanceConversion(outputFormat UnitIlluminanceForma } // GetLengthConversion: Convert length units. -// // Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of length unit formats. -// - `srcFormat`: The valid types of length unit formats. -// - `value` -// +// - `outputFormat`: The valid types of length unit formats. +// - `srcFormat`: The valid types of length unit formats. +// - `value` func (s *UnitService) GetLengthConversion(outputFormat UnitLengthFormat, srcFormat UnitLengthFormat, value float64) (*UnitLengthConversion, error) { // Create the url. path := "/unit/conversion/length/{{.src_format}}/{{.output_format}}" @@ -2512,16 +2385,13 @@ func (s *UnitService) GetLengthConversion(outputFormat UnitLengthFormat, srcForm } // GetMagneticFieldStrengthConversion: Convert magnetic field strength units. -// // Convert a magnetic field strength unit value to another magnetic field strength unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of magnetic field strength unit formats. -// - `srcFormat`: The valid types of magnetic field strength unit formats. -// - `value` -// +// - `outputFormat`: The valid types of magnetic field strength unit formats. +// - `srcFormat`: The valid types of magnetic field strength unit formats. +// - `value` func (s *UnitService) GetMagneticFieldStrengthConversion(outputFormat UnitMagneticFieldStrengthFormat, srcFormat UnitMagneticFieldStrengthFormat, value float64) (*UnitMagneticFieldStrengthConversion, error) { // Create the url. path := "/unit/conversion/magnetic-field-strength/{{.src_format}}/{{.output_format}}" @@ -2569,16 +2439,13 @@ func (s *UnitService) GetMagneticFieldStrengthConversion(outputFormat UnitMagnet } // GetMagneticFluxConversion: Convert magnetic flux units. -// // Convert a magnetic flux unit value to another magnetic flux unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of magnetic flux unit formats. -// - `srcFormat`: The valid types of magnetic flux unit formats. -// - `value` -// +// - `outputFormat`: The valid types of magnetic flux unit formats. +// - `srcFormat`: The valid types of magnetic flux unit formats. +// - `value` func (s *UnitService) GetMagneticFluxConversion(outputFormat UnitMagneticFluxFormat, srcFormat UnitMagneticFluxFormat, value float64) (*UnitMagneticFluxConversion, error) { // Create the url. path := "/unit/conversion/magnetic-flux/{{.src_format}}/{{.output_format}}" @@ -2626,16 +2493,13 @@ func (s *UnitService) GetMagneticFluxConversion(outputFormat UnitMagneticFluxFor } // GetMassConversion: Convert mass units. -// // Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of mass unit formats. -// - `srcFormat`: The valid types of mass unit formats. -// - `value` -// +// - `outputFormat`: The valid types of mass unit formats. +// - `srcFormat`: The valid types of mass unit formats. +// - `value` func (s *UnitService) GetMassConversion(outputFormat UnitMassFormat, srcFormat UnitMassFormat, value float64) (*UnitMassConversion, error) { // Create the url. path := "/unit/conversion/mass/{{.src_format}}/{{.output_format}}" @@ -2683,16 +2547,13 @@ func (s *UnitService) GetMassConversion(outputFormat UnitMassFormat, srcFormat U } // GetMetricPowerCubedConversion: Convert metric cubed units. -// // Convert a metric cubed unit value to another metric cubed unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of metric unit formats. -// - `srcFormat`: The valid types of metric unit formats. -// - `value` -// +// - `outputFormat`: The valid types of metric unit formats. +// - `srcFormat`: The valid types of metric unit formats. +// - `value` func (s *UnitService) GetMetricPowerCubedConversion(outputFormat UnitMetricPower, srcFormat UnitMetricPower, value float64) (*UnitMetricPowerCubedConversion, error) { // Create the url. path := "/unit/conversion/metric/cubed/{{.src_format}}/{{.output_format}}" @@ -2740,16 +2601,13 @@ func (s *UnitService) GetMetricPowerCubedConversion(outputFormat UnitMetricPower } // GetMetricPowerConversion: Convert metric units. -// // Convert a metric unit value to another metric unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of metric unit formats. -// - `srcFormat`: The valid types of metric unit formats. -// - `value` -// +// - `outputFormat`: The valid types of metric unit formats. +// - `srcFormat`: The valid types of metric unit formats. +// - `value` func (s *UnitService) GetMetricPowerConversion(outputFormat UnitMetricPower, srcFormat UnitMetricPower, value float64) (*UnitMetricPowerConversion, error) { // Create the url. path := "/unit/conversion/metric/power/{{.src_format}}/{{.output_format}}" @@ -2797,16 +2655,13 @@ func (s *UnitService) GetMetricPowerConversion(outputFormat UnitMetricPower, src } // GetMetricPowerSquaredConversion: Convert metric squared units. -// // Convert a metric squared unit value to another metric squared unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of metric unit formats. -// - `srcFormat`: The valid types of metric unit formats. -// - `value` -// +// - `outputFormat`: The valid types of metric unit formats. +// - `srcFormat`: The valid types of metric unit formats. +// - `value` func (s *UnitService) GetMetricPowerSquaredConversion(outputFormat UnitMetricPower, srcFormat UnitMetricPower, value float64) (*UnitMetricPowerSquaredConversion, error) { // Create the url. path := "/unit/conversion/metric/squared/{{.src_format}}/{{.output_format}}" @@ -2854,16 +2709,13 @@ func (s *UnitService) GetMetricPowerSquaredConversion(outputFormat UnitMetricPow } // GetPowerConversion: Convert power units. -// // Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of power unit formats. -// - `srcFormat`: The valid types of power unit formats. -// - `value` -// +// - `outputFormat`: The valid types of power unit formats. +// - `srcFormat`: The valid types of power unit formats. +// - `value` func (s *UnitService) GetPowerConversion(outputFormat UnitPowerFormat, srcFormat UnitPowerFormat, value float64) (*UnitPowerConversion, error) { // Create the url. path := "/unit/conversion/power/{{.src_format}}/{{.output_format}}" @@ -2911,16 +2763,13 @@ func (s *UnitService) GetPowerConversion(outputFormat UnitPowerFormat, srcFormat } // GetPressureConversion: Convert pressure units. -// // Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of pressure unit formats. -// - `srcFormat`: The valid types of pressure unit formats. -// - `value` -// +// - `outputFormat`: The valid types of pressure unit formats. +// - `srcFormat`: The valid types of pressure unit formats. +// - `value` func (s *UnitService) GetPressureConversion(outputFormat UnitPressureFormat, srcFormat UnitPressureFormat, value float64) (*UnitPressureConversion, error) { // Create the url. path := "/unit/conversion/pressure/{{.src_format}}/{{.output_format}}" @@ -2968,16 +2817,13 @@ func (s *UnitService) GetPressureConversion(outputFormat UnitPressureFormat, src } // GetRadiationConversion: Convert radiation units. -// // Convert a radiation unit value to another radiation unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of radiation unit formats. These describe the radiation energy absorbed by a mass or material and/or how it affects the relative damage to the human body. -// - `srcFormat`: The valid types of radiation unit formats. These describe the radiation energy absorbed by a mass or material and/or how it affects the relative damage to the human body. -// - `value` -// +// - `outputFormat`: The valid types of radiation unit formats. These describe the radiation energy absorbed by a mass or material and/or how it affects the relative damage to the human body. +// - `srcFormat`: The valid types of radiation unit formats. These describe the radiation energy absorbed by a mass or material and/or how it affects the relative damage to the human body. +// - `value` func (s *UnitService) GetRadiationConversion(outputFormat UnitRadiationFormat, srcFormat UnitRadiationFormat, value float64) (*UnitRadiationConversion, error) { // Create the url. path := "/unit/conversion/radiation/{{.src_format}}/{{.output_format}}" @@ -3025,16 +2871,13 @@ func (s *UnitService) GetRadiationConversion(outputFormat UnitRadiationFormat, s } // GetRadioactivityConversion: Convert radioactivity units. -// // Convert a radioactivity unit value to another radioactivity unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of radioactivity unit formats. These describe the amount of radiation emitted by a radioactive material. -// - `srcFormat`: The valid types of radioactivity unit formats. These describe the amount of radiation emitted by a radioactive material. -// - `value` -// +// - `outputFormat`: The valid types of radioactivity unit formats. These describe the amount of radiation emitted by a radioactive material. +// - `srcFormat`: The valid types of radioactivity unit formats. These describe the amount of radiation emitted by a radioactive material. +// - `value` func (s *UnitService) GetRadioactivityConversion(outputFormat UnitRadioactivityFormat, srcFormat UnitRadioactivityFormat, value float64) (*UnitRadioactivityConversion, error) { // Create the url. path := "/unit/conversion/radioactivity/{{.src_format}}/{{.output_format}}" @@ -3082,16 +2925,13 @@ func (s *UnitService) GetRadioactivityConversion(outputFormat UnitRadioactivityF } // GetSolidAngleConversion: Convert solid angle units. -// // Convert a solid angle unit value to another solid angle unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of solid angle unit formats. -// - `srcFormat`: The valid types of solid angle unit formats. -// - `value` -// +// - `outputFormat`: The valid types of solid angle unit formats. +// - `srcFormat`: The valid types of solid angle unit formats. +// - `value` func (s *UnitService) GetSolidAngleConversion(outputFormat UnitSolidAngleFormat, srcFormat UnitSolidAngleFormat, value float64) (*UnitSolidAngleConversion, error) { // Create the url. path := "/unit/conversion/solid-angle/{{.src_format}}/{{.output_format}}" @@ -3139,16 +2979,13 @@ func (s *UnitService) GetSolidAngleConversion(outputFormat UnitSolidAngleFormat, } // GetTemperatureConversion: Convert temperature units. -// // Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of temperature unit formats. -// - `srcFormat`: The valid types of temperature unit formats. -// - `value` -// +// - `outputFormat`: The valid types of temperature unit formats. +// - `srcFormat`: The valid types of temperature unit formats. +// - `value` func (s *UnitService) GetTemperatureConversion(outputFormat UnitTemperatureFormat, srcFormat UnitTemperatureFormat, value float64) (*UnitTemperatureConversion, error) { // Create the url. path := "/unit/conversion/temperature/{{.src_format}}/{{.output_format}}" @@ -3196,16 +3033,13 @@ func (s *UnitService) GetTemperatureConversion(outputFormat UnitTemperatureForma } // GetTimeConversion: Convert time units. -// // Convert a time unit value to another time unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of time unit formats. -// - `srcFormat`: The valid types of time unit formats. -// - `value` -// +// - `outputFormat`: The valid types of time unit formats. +// - `srcFormat`: The valid types of time unit formats. +// - `value` func (s *UnitService) GetTimeConversion(outputFormat UnitTimeFormat, srcFormat UnitTimeFormat, value float64) (*UnitTimeConversion, error) { // Create the url. path := "/unit/conversion/time/{{.src_format}}/{{.output_format}}" @@ -3253,16 +3087,13 @@ func (s *UnitService) GetTimeConversion(outputFormat UnitTimeFormat, srcFormat U } // GetVelocityConversion: Convert velocity units. -// // Convert a velocity unit value to another velocity unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of velocity unit formats. -// - `srcFormat`: The valid types of velocity unit formats. -// - `value` -// +// - `outputFormat`: The valid types of velocity unit formats. +// - `srcFormat`: The valid types of velocity unit formats. +// - `value` func (s *UnitService) GetVelocityConversion(outputFormat UnitVelocityFormat, srcFormat UnitVelocityFormat, value float64) (*UnitVelocityConversion, error) { // Create the url. path := "/unit/conversion/velocity/{{.src_format}}/{{.output_format}}" @@ -3310,16 +3141,13 @@ func (s *UnitService) GetVelocityConversion(outputFormat UnitVelocityFormat, src } // GetVoltageConversion: Convert voltage units. -// // Convert a voltage unit value to another voltage unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of voltage unit formats. -// - `srcFormat`: The valid types of voltage unit formats. -// - `value` -// +// - `outputFormat`: The valid types of voltage unit formats. +// - `srcFormat`: The valid types of voltage unit formats. +// - `value` func (s *UnitService) GetVoltageConversion(outputFormat UnitVoltageFormat, srcFormat UnitVoltageFormat, value float64) (*UnitVoltageConversion, error) { // Create the url. path := "/unit/conversion/voltage/{{.src_format}}/{{.output_format}}" @@ -3367,16 +3195,13 @@ func (s *UnitService) GetVoltageConversion(outputFormat UnitVoltageFormat, srcFo } // GetVolumeConversion: Convert volume units. -// // Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions. // -// // Parameters // -// - `outputFormat`: The valid types of volume unit formats. -// - `srcFormat`: The valid types of volume unit formats. -// - `value` -// +// - `outputFormat`: The valid types of volume unit formats. +// - `srcFormat`: The valid types of volume unit formats. +// - `value` func (s *UnitService) GetVolumeConversion(outputFormat UnitVolumeFormat, srcFormat UnitVolumeFormat, value float64) (*UnitVolumeConversion, error) { // Create the url. path := "/unit/conversion/volume/{{.src_format}}/{{.output_format}}" @@ -3424,10 +3249,8 @@ func (s *UnitService) GetVolumeConversion(outputFormat UnitVolumeFormat, srcForm } // GetSelf: Get your user. -// // Get the user information for the authenticated user. // Alternatively, you can also use the `/users/me` endpoint. -// func (s *UserService) GetSelf() (*User, error) { // Create the url. path := "/user" @@ -3466,14 +3289,11 @@ 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. // -// // Parameters // -// - `body`: The user-modifiable parts of a User. -// +// - `body`: The user-modifiable parts of a User. func (s *UserService) UpdateSelf(body UpdateUser) (*User, error) { // Create the url. path := "/user" @@ -3521,10 +3341,8 @@ 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 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. path := "/user" @@ -3554,19 +3372,18 @@ 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. // The API calls are returned in order of creation, with the most recently created API calls first. // -// // Parameters // -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `limit` // -// Currently, we only support scanning in ascending order. +// - `pageToken` // +// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// +// Currently, we only support scanning in ascending order. func (s *APICallService) UserList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error) { // Create the url. path := "/user/api-calls" @@ -3614,14 +3431,11 @@ 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. // -// // Parameters // -// - `id` -// +// - `id` func (s *APICallService) GetForUser(id string) (*APICallWithPrice, error) { // Create the url. path := "/user/api-calls/{{.id}}" @@ -3667,19 +3481,18 @@ 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. // The API tokens are returned in order of creation, with the most recently created API tokens first. // -// // Parameters // -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `limit` // -// Currently, we only support scanning in ascending order. +// - `pageToken` // +// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// +// Currently, we only support scanning in ascending order. func (s *APITokenService) ListForUser(limit int, pageToken string, sortBy CreatedAtSortMode) (*APITokenResultsPage, error) { // Create the url. path := "/user/api-tokens" @@ -3727,9 +3540,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. -// func (s *APITokenService) CreateForUser() (*APIToken, error) { // Create the url. path := "/user/api-tokens" @@ -3768,14 +3579,11 @@ 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. // -// // Parameters // -// - `token` -// +// - `token` func (s *APITokenService) GetForUser(token UUID) (*APIToken, error) { // Create the url. path := "/user/api-tokens/{{.token}}" @@ -3821,15 +3629,12 @@ 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 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 // -// - `token` -// +// - `token` func (s *APITokenService) DeleteForUser(token UUID) error { // Create the url. path := "/user/api-tokens/{{.token}}" @@ -3866,10 +3671,8 @@ func (s *APITokenService) DeleteForUser(token UUID) error { } // GetSelfExtended: Get extended information about your user. -// // Get the user information for the authenticated user. // Alternatively, you can also use the `/users-extended/me` endpoint. -// func (s *UserService) GetSelfExtended() (*ExtendedUser, error) { // Create the url. path := "/user/extended" @@ -3908,15 +3711,12 @@ func (s *UserService) GetSelfExtended() (*ExtendedUser, error) { } // GetConversionForUser: Get a file conversion for your user. -// // Get the status and output of an async file conversion. If completed, the contents of the converted file (`output`) will be returned as a base64 encoded string. // This endpoint requires authentication by any KittyCAD user. It returns details of the requested file conversion for the user. // -// // Parameters // -// - `id` -// +// - `id` func (s *FileService) GetConversionForUser(id string) (*any, error) { // Create the url. path := "/user/file/conversions/{{.id}}" @@ -3962,9 +3762,7 @@ func (s *FileService) GetConversionForUser(id string) (*any, 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" @@ -4003,9 +3801,7 @@ func (s *UserService) GetFrontHashSelf() (*string, error) { } // 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) { // Create the url. path := "/user/onboarding" @@ -4044,10 +3840,8 @@ 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. -// func (s *PaymentService) GetInformationForUser() (*Customer, error) { // Create the url. path := "/user/payment" @@ -4086,15 +3880,12 @@ 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. // -// // Parameters // -// - `body`: The billing information for payments. -// +// - `body`: The billing information for payments. func (s *PaymentService) CreateInformationForUser(body BillingInfo) (*Customer, error) { // Create the url. path := "/user/payment" @@ -4142,15 +3933,12 @@ 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. // -// // Parameters // -// - `body`: The billing information for payments. -// +// - `body`: The billing information for payments. func (s *PaymentService) UpdateInformationForUser(body BillingInfo) (*Customer, error) { // Create the url. path := "/user/payment" @@ -4198,10 +3986,8 @@ 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. -// func (s *PaymentService) DeleteInformationForUser() error { // Create the url. path := "/user/payment" @@ -4231,9 +4017,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. -// func (s *PaymentService) GetBalanceForUser() (*CustomerBalance, error) { // Create the url. path := "/user/payment/balance" @@ -4272,9 +4056,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. -// func (s *PaymentService) CreateIntentForUser() (*PaymentIntent, error) { // Create the url. path := "/user/payment/intent" @@ -4313,9 +4095,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. -// func (s *PaymentService) ListInvoicesForUser() (*[]Invoice, error) { // Create the url. path := "/user/payment/invoices" @@ -4354,9 +4134,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. -// func (s *PaymentService) ListMethodsForUser() (*[]PaymentMethod, error) { // Create the url. path := "/user/payment/methods" @@ -4395,14 +4173,11 @@ 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. // -// // Parameters // -// - `id` -// +// - `id` func (s *PaymentService) DeleteMethodForUser(id string) error { // Create the url. path := "/user/payment/methods/{{.id}}" @@ -4439,9 +4214,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. -// func (s *PaymentService) ValidateCustomerTaxInformationForUser() error { // Create the url. path := "/user/payment/tax" @@ -4471,14 +4244,11 @@ func (s *PaymentService) ValidateCustomerTaxInformationForUser() error { } // GetForUser: 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. // -// // Parameters // -// - `token` -// +// - `token` func (s *SessionService) GetForUser(token UUID) (*Session, error) { // Create the url. path := "/user/session/{{.token}}" @@ -4524,18 +4294,17 @@ func (s *SessionService) GetForUser(token UUID) (*Session, error) { } // 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. // -// // Parameters // -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `limit` // -// Currently, we only support scanning in ascending order. +// - `pageToken` // +// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// +// Currently, we only support scanning in ascending order. func (s *UserService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*UserResultsPage, error) { // Create the url. path := "/users" @@ -4583,18 +4352,17 @@ 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. // -// // Parameters // -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `limit` +// +// - `pageToken` // -// Currently, we only support scanning in ascending order. +// - `sortBy`: Supported set of sort modes for scanning by created_at only. // +// Currently, we only support scanning in ascending order. func (s *UserService) ListExtended(limit int, pageToken string, sortBy CreatedAtSortMode) (*ExtendedUserResultsPage, error) { // Create the url. path := "/users-extended" @@ -4642,16 +4410,13 @@ 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. // -// // Parameters // -// - `id` -// +// - `id` func (s *UserService) GetExtended(id string) (*ExtendedUser, error) { // Create the url. path := "/users-extended/{{.id}}" @@ -4697,16 +4462,13 @@ 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. // -// // Parameters // -// - `id` -// +// - `id` func (s *UserService) Get(id string) (*User, error) { // Create the url. path := "/users/{{.id}}" @@ -4752,22 +4514,22 @@ 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. // 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. // The API calls are returned in order of creation, with the most recently created API calls first. // -// // Parameters // -// - `id` -// - `limit` -// - `pageToken` -// - `sortBy`: Supported set of sort modes for scanning by created_at only. +// - `id` +// +// - `limit` +// +// - `pageToken` // -// Currently, we only support scanning in ascending order. +// - `sortBy`: Supported set of sort modes for scanning by created_at only. // +// Currently, we only support scanning in ascending order. func (s *APICallService) ListForUser(id string, limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error) { // Create the url. path := "/users/{{.id}}/api-calls" diff --git a/spec.json b/spec.json index 7e6f449..af4ce5a 100644 --- a/spec.json +++ b/spec.json @@ -16016,4 +16016,5 @@ "name": "users" } ] -} \ No newline at end of file +} + diff --git a/types.go b/types.go index 2177478..06f0fd4 100755 --- a/types.go +++ b/types.go @@ -63,7 +63,6 @@ const ( ) // AiPluginManifest: AI plugin manifest. -// // This is used for OpenAI's ChatGPT plugins. You can read more about them [here](https://platform.openai.com/docs/plugins/getting-started/plugin-manifest). type AiPluginManifest struct { // API: API specification. @@ -131,7 +130,6 @@ const ( ) // APICallWithPrice: An API call with the price. -// // This is a join of the `ApiCall` and `ApiCallPrice` tables. type APICallWithPrice struct { // CompletedAt: The date and time the API call completed billing. @@ -189,7 +187,6 @@ type APICallWithPriceResultsPage struct { } // APIToken: An API token. -// // These are used to authenticate users with Bearer authentication. type APIToken struct { // CreatedAt: The date and time the API token was created. @@ -509,7 +506,6 @@ type BillingInfo struct { } // CacheMetadata: Metadata about our cache. -// // This is mostly used for internal purposes and debugging. type CacheMetadata struct { // Ok: If the cache returned an ok response from ping. @@ -587,7 +583,6 @@ type Commit struct { } // Connection: Metadata about a pub-sub connection. -// // This is mostly used for internal purposes and debugging. type Connection struct { // AuthTimeout: The auth timeout of the server. @@ -1189,7 +1184,6 @@ const ( ) // CreatedAtSortMode: Supported set of sort modes for scanning by created_at only. -// // Currently, we only support scanning in ascending order. type CreatedAtSortMode string @@ -1201,7 +1195,6 @@ const ( ) // Currency: Currency is the list of supported currencies. -// // This comes from the Stripe API docs: For more details see <https://support.stripe.com/questions/which-currencies-does-stripe-support>. type Currency string @@ -1515,7 +1508,6 @@ type Customer struct { } // CustomerBalance: A balance for a user. -// // This holds information about the financial balance for the user. type CustomerBalance struct { // CreatedAt: The date and time the balance was created. @@ -1705,7 +1697,6 @@ type EmailAuthenticationForm struct { } // EngineMetadata: Metadata about our currently running server. -// // This is mostly used for internal purposes and debugging. type EngineMetadata struct { // AsyncJobsRunning: If any async job is currently running. @@ -1745,7 +1736,6 @@ type Error struct { } // ExecutorMetadata: Metadata about our currently running server. -// // This is mostly used for internal purposes and debugging. type ExecutorMetadata struct { // DockerInfo: Information about the docker daemon. @@ -1757,7 +1747,6 @@ type ExecutorMetadata struct { } // ExtendedUser: Extended user information. -// // This is mostly used for internal purposes. It returns a mapping of the user's information, including that of our third party services we use for users: MailChimp, Stripe, and Front type ExtendedUser struct { // Company: The user's company. @@ -2121,7 +2110,6 @@ type FileSurfaceArea struct { } // FileSystemMetadata: Metadata about our file system. -// // This is mostly used for internal purposes and debugging. type FileSystemMetadata struct { // Ok: If the file system passed a sanity check. @@ -2375,7 +2363,6 @@ type MetaClusterInfo struct { } // Metadata: Metadata about our currently running server. -// // This is mostly used for internal purposes and debugging. type Metadata struct { // Cache: Metadata about our cache. @@ -2397,7 +2384,6 @@ type Metadata struct { } // Method: The Request Method (VERB) -// // This type also contains constants for a number of common HTTP methods such as GET, POST, etc. // // Currently includes 8 variants representing the 8 methods defined in [RFC 7230](https://tools.ietf.org/html/rfc7231#section-4.1), plus PATCH, and an Extension variant for all extensions. @@ -2619,7 +2605,6 @@ const ( ) // PluginsInfo: Available plugins per type. -// // **Note**: Only unmanaged (V1) plugins are included in this list. V1 plugins are \"lazily\" loaded, and are not returned in this list if there is no resource using the plugin. type PluginsInfo struct { // Authorization: Names of available authorization plugins. @@ -2633,7 +2618,6 @@ type PluginsInfo struct { } // PointEMetadata: Metadata about our point-e instance. -// // This is mostly used for internal purposes and debugging. type PointEMetadata struct { // Ok: If the point-e service returned an ok response from ping. @@ -2675,7 +2659,6 @@ type Runtime struct { } // Session: An authentication session. -// // For our UIs, these are automatically created by Next.js. type Session struct { // CreatedAt: The date and time the session was created. @@ -4193,7 +4176,6 @@ type UserResultsPage struct { } // VerificationToken: A verification token for a user. -// // This is typically used to verify a user's email address. type VerificationToken struct { // CreatedAt: The date and time the verification token was created.