kittycad

package module
v0.2.33 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 17 Imported by: 9

README

kittycad.go

The Golang API client for KittyCAD.

Generating

You can trigger a build with the GitHub action to generate the client. This will automatically update the client to the latest version based on the spec hosted at api.kittycad.io.

Alternatively, if you wish to generate the client locally, run:

$ make generate

Contributing

Please do not change the code directly since it is generated. PRs that change the code directly will be automatically closed by a bot.

Documentation

Index

Examples

Constants

View Source
const DefaultServerURL = "https://api.kittycad.io"

DefaultServerURL is the default server URL for the KittyCad API.

View Source
const TokenEnvVar = "KITTYCAD_API_TOKEN"

TokenEnvVar is the environment variable that contains the token.

Variables

This section is empty.

Functions

This section is empty.

Types

type APICallQueryGroup added in v0.0.9

type APICallQueryGroup struct {
	// Count:
	Count int `json:"count" yaml:"count" schema:"count,required"`
	// Query:
	Query string `json:"query" yaml:"query" schema:"query,required"`
}

APICallQueryGroup: A response for a query on the API call table that is grouped by something.

type APICallQueryGroupBy added in v0.0.9

type APICallQueryGroupBy string

APICallQueryGroupBy: The field of an API call to group by.

const (
	// APICallQueryGroupByEmail: The email of the user that requested the API call.
	APICallQueryGroupByEmail APICallQueryGroupBy = "email"
	// APICallQueryGroupByMethod: The HTTP method of the API call.
	APICallQueryGroupByMethod APICallQueryGroupBy = "method"
	// APICallQueryGroupByEndpoint: The endpoint of the API call.
	APICallQueryGroupByEndpoint APICallQueryGroupBy = "endpoint"
	// APICallQueryGroupByUserID: The user ID of the user that requested the API call.
	APICallQueryGroupByUserID APICallQueryGroupBy = "user_id"
	// APICallQueryGroupByOrigin: The origin of the API call. This is parsed from the `Origin` header.
	APICallQueryGroupByOrigin APICallQueryGroupBy = "origin"
	// APICallQueryGroupByIpAddress: The IP address of the user making the API call.
	APICallQueryGroupByIpAddress APICallQueryGroupBy = "ip_address"
)

type APICallService added in v0.0.9

type APICallService service

APICallService: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.

func (*APICallService) Get added in v0.0.9

func (s *APICallService) Get(id UUID) (*APICallWithPrice, error)

Get: Get details of an API call. 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 Zoo employees can view API calls for other users.

Parameters

  • `id`
Example

Get: Get details of an API call. 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 Zoo employees can view API calls for other users.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.Get(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) GetAsyncOperation added in v0.1.4

func (s *APICallService) GetAsyncOperation(id string) (*any, error)

GetAsyncOperation: Get an async operation. Get the status and output of an async operation. 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 Zoo employees with the proper access can view async operations for other users.

Parameters

  • `id`
Example

GetAsyncOperation: Get an async operation. Get the status and output of an async operation. 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 Zoo employees with the proper access can view async operations for other users.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.GetAsyncOperation("some-string")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) GetForOrg added in v0.2.32

func (s *APICallService) GetForOrg(id UUID) (*APICallWithPrice, error)

GetForOrg: Get an API call for an org. This endpoint requires authentication by an org admin. It returns details of the requested API call for the user's org.

Parameters

  • `id`
Example

GetForOrg: Get an API call for an org. This endpoint requires authentication by an org admin. It returns details of the requested API call for the user's org.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.GetForOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) GetForUser added in v0.0.9

func (s *APICallService) GetForUser(id UUID) (*APICallWithPrice, error)

GetForUser: Get an API call for a user. This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.

Parameters

  • `id`
Example

GetForUser: Get an API call for a user. This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.GetForUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) GetMetrics added in v0.0.9

func (s *APICallService) GetMetrics(groupBy APICallQueryGroupBy) (*[]APICallQueryGroup, error)

GetMetrics: Get API call metrics. This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.

Parameters

  • `groupBy`: The field of an API call to group by.
Example

GetMetrics: Get API call metrics. This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.

Parameters

  • `groupBy`: The field of an API call to group by.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.GetMetrics("")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) List added in v0.0.9

func (s *APICallService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)

List: List API calls. 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

Example

List: List API calls. 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.List(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) ListAsyncOperations added in v0.1.6

func (s *APICallService) ListAsyncOperations(limit int, pageToken string, sortBy CreatedAtSortMode, status APICallStatus) (*AsyncAPICallResultsPage, 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 Zoo employee.

Parameters

  • `limit`

  • `pageToken`

  • `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.

Example

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 Zoo employee.

Parameters

  • `limit`

  • `pageToken`

  • `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.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.ListAsyncOperations(123, "some-string", "", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) ListForUser added in v0.0.9

func (s *APICallService) ListForUser(id string, limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)

ListForUser: List API calls for a user. 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 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

  • `id`

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

Example

ListForUser: List API calls for a user. 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 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

  • `id`

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.ListForUser("some-string", 123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) OrgList added in v0.2.32

func (s *APICallService) OrgList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)

OrgList: List API calls for your org. This includes all API calls that were made by users in the org. This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org. 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.

    Currently, we only support scanning in ascending order.

Example

OrgList: List API calls for your org. This includes all API calls that were made by users in the org. This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org. 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.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.OrgList(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APICallService) UserList added in v0.0.9

func (s *APICallService) UserList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)

UserList: List API calls for your 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

Example

UserList: List API calls for your 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APICall.UserList(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type APICallStatus added in v0.1.4

type APICallStatus string

APICallStatus: The status of an async API call.

const (
	// APICallStatusQueued: The async API call is queued.
	APICallStatusQueued APICallStatus = "queued"
	// APICallStatusUploaded: The async API call was uploaded to be converted.
	APICallStatusUploaded APICallStatus = "uploaded"
	// APICallStatusInProgress: The async API call is in progress.
	APICallStatusInProgress APICallStatus = "in_progress"
	// APICallStatusCompleted: The async API call has completed.
	APICallStatusCompleted APICallStatus = "completed"
	// APICallStatusFailed: The async API call has failed.
	APICallStatusFailed APICallStatus = "failed"
)

type APICallWithPrice added in v0.0.9

type APICallWithPrice struct {
	// CompletedAt: The date and time the API call completed billing.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The date and time the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Duration: The duration of the API call.
	Duration int `json:"duration" yaml:"duration" schema:"duration"`
	// Email: The user's email address.
	Email string `json:"email" yaml:"email" schema:"email"`
	// Endpoint: The endpoint requested by the API call.
	Endpoint string `json:"endpoint" yaml:"endpoint" schema:"endpoint"`
	// ID: The unique identifier for the API call.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// IPAddress: The ip address of the origin.
	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 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"`
	// OrgID: The organization ID of the API call if it is billable through an organization.
	OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id"`
	// Origin: The origin of the API call.
	Origin string `json:"origin" yaml:"origin" schema:"origin"`
	// Price: The price of the API call.
	Price float64 `json:"price" yaml:"price" schema:"price"`
	// RequestBody: The request body sent by the API call.
	RequestBody string `json:"request_body" yaml:"request_body" schema:"request_body"`
	// RequestQueryParams: The request query params sent by the API call.
	RequestQueryParams string `json:"request_query_params" yaml:"request_query_params" schema:"request_query_params"`
	// ResponseBody: The response body returned by the API call. We do not store this information if it is above a certain size.
	ResponseBody string `json:"response_body" yaml:"response_body" schema:"response_body"`
	// StartedAt: The date and time the API call started billing.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// StatusCode: The status code returned by the API call.
	StatusCode int `json:"status_code" yaml:"status_code" schema:"status_code"`
	// StripeInvoiceItemID: The Stripe invoice item ID of the API call if it is billable.
	StripeInvoiceItemID string `json:"stripe_invoice_item_id" yaml:"stripe_invoice_item_id" schema:"stripe_invoice_item_id"`
	// Token: The API token that made the API call.
	Token UUID `json:"token" yaml:"token" schema:"token,required"`
	// UpdatedAt: The date and time the API call was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

APICallWithPrice: An API call with the price. This is a join of the `ApiCall` and `ApiCallPrice` tables.

type APICallWithPriceResultsPage added in v0.1.0

type APICallWithPriceResultsPage struct {
	// Items: list of items on this page of results
	Items []APICallWithPrice `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"`
}

APICallWithPriceResultsPage: A single page of results

type APIError added in v0.2.27

type APIError struct {
	// ErrorCode: The error code.
	ErrorCode ErrorCode `json:"error_code" yaml:"error_code" schema:"error_code,required"`
	// Message: The error message.
	Message string `json:"message" yaml:"message" schema:"message,required"`
}

APIError: An error.

type APIToken added in v0.0.9

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 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"`
	// Label: An optional label for the API token.
	Label string `json:"label" yaml:"label" schema:"label"`
	// Token: The API token itself.
	Token UUID `json:"token" yaml:"token" schema:"token,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

APIToken: An API token. These are used to authenticate users with Bearer authentication.

type APITokenResultsPage added in v0.1.0

type APITokenResultsPage struct {
	// Items: list of items on this page of results
	Items []APIToken `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"`
}

APITokenResultsPage: A single page of results

type APITokenService added in v0.0.9

type APITokenService service

APITokenService: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.

func (*APITokenService) CreateForUser added in v0.0.9

func (s *APITokenService) CreateForUser(label string) (*APIToken, error)

CreateForUser: Create a new API token for your user. This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.

Parameters

  • `label`
Example

CreateForUser: Create a new API token for your user. This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.

Parameters

  • `label`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APIToken.CreateForUser("some-string")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APITokenService) DeleteForUser added in v0.0.9

func (s *APITokenService) DeleteForUser(token UUID) error

DeleteForUser: Delete an API token for your 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

  • `token`
Example

DeleteForUser: Delete an API token for your 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

  • `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.APIToken.DeleteForUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")); err != nil {
	panic(err)
}
Output:

func (*APITokenService) GetForUser added in v0.0.9

func (s *APITokenService) GetForUser(token UUID) (*APIToken, error)

GetForUser: Get an API token for your user. This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.

Parameters

  • `token`
Example

GetForUser: Get an API token for your user. This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.

Parameters

  • `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APIToken.GetForUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*APITokenService) ListForUser added in v0.0.9

func (s *APITokenService) ListForUser(limit int, pageToken string, sortBy CreatedAtSortMode) (*APITokenResultsPage, error)

ListForUser: List API tokens for your 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

Example

ListForUser: List API tokens for your 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.APIToken.ListForUser(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type AccountProvider added in v0.1.9

type AccountProvider string

AccountProvider: An account provider.

const (
	// AccountProviderApple: The Apple account provider.
	AccountProviderApple AccountProvider = "apple"
	// AccountProviderDiscord: The Discord account provider.
	AccountProviderDiscord AccountProvider = "discord"
	// AccountProviderGoogle: The Google account provider.
	AccountProviderGoogle AccountProvider = "google"
	// AccountProviderGithub: The GitHub account provider.
	AccountProviderGithub AccountProvider = "github"
	// AccountProviderMicrosoft: The Microsoft account provider.
	AccountProviderMicrosoft AccountProvider = "microsoft"
	// AccountProviderSaml: The SAML account provider.
	AccountProviderSaml AccountProvider = "saml"
	// AccountProviderTencent: The Tencent QQ account provider.
	AccountProviderTencent AccountProvider = "tencent"
)

type AddOrgMember added in v0.2.32

type AddOrgMember struct {
	// Email: The email address of the user to add to the org.
	Email string `json:"email" yaml:"email" schema:"email,required"`
	// Role: The organization role to give the user.
	Role UserOrgRole `json:"role" yaml:"role" schema:"role,required"`
}

AddOrgMember: Data for adding a member to an org.

type AddressDetails added in v0.2.32

type AddressDetails struct {
	// City: The city component.
	City string `json:"city" yaml:"city" schema:"city"`
	// Country: The country component. This is a two-letter ISO country code.
	Country string `json:"country" yaml:"country" schema:"country,required"`
	// State: The state component.
	State string `json:"state" yaml:"state" schema:"state"`
	// Street1: The first street component.
	Street1 string `json:"street1" yaml:"street1" schema:"street1"`
	// Street2: The second street component.
	Street2 string `json:"street2" yaml:"street2" schema:"street2"`
	// Zip: The zip component.
	Zip string `json:"zip" yaml:"zip" schema:"zip"`
}

AddressDetails: Address details.

type AiFeedback added in v0.2.29

type AiFeedback string

AiFeedback: Human feedback on an AI response.

const (
	// AiFeedbackThumbsUp: Thumbs up.
	AiFeedbackThumbsUp AiFeedback = "thumbs_up"
	// AiFeedbackThumbsDown: Thumbs down.
	AiFeedbackThumbsDown AiFeedback = "thumbs_down"
)

type AiPrompt added in v0.2.29

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"`
}

AiPrompt: An AI prompt.

type AiPromptResultsPage added in v0.2.29

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"`
}

AiPromptResultsPage: A single page of results

type AiPromptType added in v0.2.29

type AiPromptType string

AiPromptType: A type of AI prompt.

const (
	// AiPromptTypeTextToCad: Text to CAD.
	AiPromptTypeTextToCad AiPromptType = "text_to_cad"
)

type AiService added in v0.2.10

type AiService service

AiService: AI uses machine learning to generate CAD models.

func (*AiService) CreateKclCodeCompletions added in v0.2.33

func (s *AiService) CreateKclCodeCompletions(body KclCodeCompletionRequest) (*KclCodeCompletionResponse, error)

CreateKclCodeCompletions: Generate code completions for KCL. Parameters

  • `body`: A request to generate KCL code completions.
Example

CreateKclCodeCompletions: Generate code completions for KCL. Parameters

  • `body`: A request to generate KCL code completions.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Ai.CreateKclCodeCompletions(kittycad.KclCodeCompletionRequest{Extra: kittycad.KclCodeCompletionParams{Language: "some-string", NextIndent: 123, PromptTokens: 123, SuffixTokens: 123, TrimByIndentation: true}, MaxTokens: 123, N: 123, Nwo: "some-string", Prompt: "some-string", Stop: []string{"some-string"}, Stream: true, Suffix: "some-string", Temperature: 123.45, TopP: 123.45})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*AiService) CreateTextToCad added in v0.2.29

func (s *AiService) CreateTextToCad(outputFormat FileExportFormat, body TextToCadCreateBody) (*TextToCad, error)

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`.

Parameters

  • `outputFormat`: The valid types of output file formats.
  • `body`: Body for generating models from text.
Example

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`.

Parameters

  • `outputFormat`: The valid types of output file formats.
  • `body`: Body for generating models from text.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Ai.CreateTextToCad("", kittycad.TextToCadCreateBody{Prompt: "some-string"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*AiService) CreateTextToCadModelFeedback added in v0.2.29

func (s *AiService) CreateTextToCadModelFeedback(id UUID, feedback AiFeedback) error

CreateTextToCadModelFeedback: Give feedback to a specific text-to-CAD response. 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

  • `id`
  • `feedback`: Human feedback on an AI response.
Example

CreateTextToCadModelFeedback: Give feedback to a specific text-to-CAD response. 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

  • `id`
  • `feedback`: Human feedback on an AI response.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Ai.CreateTextToCadModelFeedback(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), ""); err != nil {
	panic(err)
}
Output:

func (*AiService) GetPrompt added in v0.2.29

func (s *AiService) GetPrompt(id UUID) (*AiPrompt, error)

GetPrompt: Get an AI prompt. This endpoint requires authentication by a Zoo employee.

Parameters

  • `id`
Example

GetPrompt: Get an AI prompt. This endpoint requires authentication by a Zoo employee.

Parameters

  • `id`
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)
Output:

func (*AiService) GetTextToCadModelForUser added in v0.2.29

func (s *AiService) GetTextToCadModelForUser(id UUID) (*TextToCad, error)

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`
Example

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`
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)
Output:

func (*AiService) ListPrompts added in v0.2.29

func (s *AiService) ListPrompts(limit int, pageToken string, sortBy CreatedAtSortMode) (*AiPromptResultsPage, 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.

Example

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.

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)
Output:

func (*AiService) ListTextToCadModelsForUser added in v0.2.29

func (s *AiService) ListTextToCadModelsForUser(limit int, pageToken string, sortBy CreatedAtSortMode, noModels bool) (*TextToCadResultsPage, error)

ListTextToCadModelsForUser: List text-to-CAD models you've generated. 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

  • `noModels`

Example

ListTextToCadModelsForUser: List text-to-CAD models you've generated. 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

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

  • `noModels`

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Ai.ListTextToCadModelsForUser(123, "some-string", "", true)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type Angle added in v0.2.28

type Angle struct {
	// Unit: What unit is the measurement?
	Unit UnitAngle `json:"unit" yaml:"unit" schema:"unit,required"`
	// Value: The size of the angle, measured in the chosen unit.
	Value float64 `json:"value" yaml:"value" schema:"value,required"`
}

Angle: An angle, with a specific unit.

type AnnotationLineEnd added in v0.2.22

type AnnotationLineEnd string

AnnotationLineEnd: Annotation line end type

const (
	// AnnotationLineEndNone represents the AnnotationLineEnd `"none"`.
	AnnotationLineEndNone AnnotationLineEnd = "none"
	// AnnotationLineEndArrow represents the AnnotationLineEnd `"arrow"`.
	AnnotationLineEndArrow AnnotationLineEnd = "arrow"
)

type AnnotationLineEndOptions added in v0.2.22

type AnnotationLineEndOptions struct {
	// End: How to style the end of the annotation line.
	End AnnotationLineEnd `json:"end" yaml:"end" schema:"end,required"`
	// Start: How to style the start of the annotation line.
	Start AnnotationLineEnd `json:"start" yaml:"start" schema:"start,required"`
}

AnnotationLineEndOptions: Options for annotation text

type AnnotationOptions added in v0.2.22

type AnnotationOptions struct {
	// Color: Color to render the annotation
	Color Color `json:"color" yaml:"color" schema:"color"`
	// LineEnds: How to style the start and end of the line
	LineEnds AnnotationLineEndOptions `json:"line_ends" yaml:"line_ends" schema:"line_ends"`
	// LineWidth: Width of the annotation's line
	LineWidth float64 `json:"line_width" yaml:"line_width" schema:"line_width"`
	// Position: Position to put the annotation
	Position Point3D `json:"position" yaml:"position" schema:"position"`
	// Text: Text displayed on the annotation
	Text AnnotationTextOptions `json:"text" yaml:"text" schema:"text"`
}

AnnotationOptions: Options for annotations

type AnnotationTextAlignmentX added in v0.2.22

type AnnotationTextAlignmentX string

AnnotationTextAlignmentX: Horizontal Text alignment

const (
	// AnnotationTextAlignmentXLeft represents the AnnotationTextAlignmentX `"left"`.
	AnnotationTextAlignmentXLeft AnnotationTextAlignmentX = "left"
	// AnnotationTextAlignmentXCenter represents the AnnotationTextAlignmentX `"center"`.
	AnnotationTextAlignmentXCenter AnnotationTextAlignmentX = "center"
	// AnnotationTextAlignmentXRight represents the AnnotationTextAlignmentX `"right"`.
	AnnotationTextAlignmentXRight AnnotationTextAlignmentX = "right"
)

type AnnotationTextAlignmentY added in v0.2.22

type AnnotationTextAlignmentY string

AnnotationTextAlignmentY: Vertical Text alignment

const (
	// AnnotationTextAlignmentYBottom represents the AnnotationTextAlignmentY `"bottom"`.
	AnnotationTextAlignmentYBottom AnnotationTextAlignmentY = "bottom"
	// AnnotationTextAlignmentYCenter represents the AnnotationTextAlignmentY `"center"`.
	AnnotationTextAlignmentYCenter AnnotationTextAlignmentY = "center"
	// AnnotationTextAlignmentYTop represents the AnnotationTextAlignmentY `"top"`.
	AnnotationTextAlignmentYTop AnnotationTextAlignmentY = "top"
)

type AnnotationTextOptions added in v0.2.22

type AnnotationTextOptions struct {
	// PointSize: Text font's point size
	PointSize int `json:"point_size" yaml:"point_size" schema:"point_size,required"`
	// Text: Text displayed on the annotation
	Text string `json:"text" yaml:"text" schema:"text,required"`
	// X: Alignment along the X axis
	X AnnotationTextAlignmentX `json:"x" yaml:"x" schema:"x,required"`
	// Y: Alignment along the Y axis
	Y AnnotationTextAlignmentY `json:"y" yaml:"y" schema:"y,required"`
}

AnnotationTextOptions: Options for annotation text

type AnnotationType added in v0.2.22

type AnnotationType string

AnnotationType: The type of annotation

const (
	// AnnotationTypeT2D: 2D annotation type (screen or planar space)
	AnnotationTypeT2D AnnotationType = "t2d"
	// AnnotationTypeT3D: 3D annotation type
	AnnotationTypeT3D AnnotationType = "t3d"
)

type AppClientInfo added in v0.2.4

type AppClientInfo struct {
	// Url: The URL for consent.
	Url string `json:"url" yaml:"url" schema:"url"`
}

AppClientInfo: Information about a third party app client.

type AppService added in v0.2.4

type AppService service

AppService: Endpoints for third party app grant flows.

func (*AppService) GithubCallback added in v0.2.4

func (s *AppService) GithubCallback(body any) error

GithubCallback: Listen for callbacks to GitHub app authentication. 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

  • `body`
Example

GithubCallback: Listen for callbacks to GitHub app authentication. 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

  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.App.GithubCallback(""); err != nil {
	panic(err)
}
Output:

func (*AppService) GithubConsent added in v0.2.4

func (s *AppService) GithubConsent() (*AppClientInfo, 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 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.

Example

GithubConsent: Get the consent URL for GitHub app authentication. 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.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.App.GithubConsent()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*AppService) GithubWebhook added in v0.2.5

func (s *AppService) GithubWebhook(body []byte) error

GithubWebhook: Listen for GitHub webhooks. These come from the GitHub app.

Parameters

  • `body`
Example

GithubWebhook: Listen for GitHub webhooks. These come from the GitHub app.

Parameters

  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.App.GithubWebhook([]byte("some-binary")); err != nil {
	panic(err)
}
Output:

type AsyncAPICall added in v0.1.6

type AsyncAPICall struct {
	// CompletedAt: The time and date the async API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the async API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the async API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The JSON input for the API call. These are determined by the endpoint that is run.
	Input any `json:"input" yaml:"input" schema:"input"`
	// Output: The JSON output for the API call. These are determined by the endpoint that is run.
	Output any `json:"output" yaml:"output" schema:"output"`
	// StartedAt: The time and date the async API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the async API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type: The type of async API call.
	Type AsyncAPICallType `json:"type" yaml:"type" schema:"type,required"`
	// 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 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"`
}

AsyncAPICall: An async API call.

type AsyncAPICallOutputCompletedAt added in v0.2.13

type AsyncAPICallOutputCompletedAt struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputFormat: The output format of the file conversion.
	OutputFormat FileExportFormat `json:"output_format" yaml:"output_format" schema:"output_format,required"`
	// OutputFormatOptions: The output format options of the file conversion.
	OutputFormatOptions any `json:"output_format_options" yaml:"output_format_options" schema:"output_format_options"`
	// Outputs: The converted files (if multiple file conversion), if completed, base64 encoded. The key of the map is the path of the output file.
	Outputs map[string]Base64 `json:"outputs" yaml:"outputs" schema:"outputs"`
	// SrcFormat: The source format of the file conversion.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// SrcFormatOptions: The source format options of the file conversion.
	SrcFormatOptions any `json:"src_format_options" yaml:"src_format_options" schema:"src_format_options"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

AsyncAPICallOutputCompletedAt: A file conversion.

type AsyncAPICallOutputCreatedAt added in v0.2.13

type AsyncAPICallOutputCreatedAt struct {
	// CenterOfMass: The resulting center of mass.
	CenterOfMass Point3D `json:"center_of_mass" yaml:"center_of_mass" schema:"center_of_mass"`
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputUnit: The output unit for the center of mass.
	OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

AsyncAPICallOutputCreatedAt: File center of mass.

type AsyncAPICallOutputError added in v0.2.13

type AsyncAPICallOutputError struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Mass: The resulting mass.
	Mass float64 `json:"mass" yaml:"mass" schema:"mass"`
	// MaterialDensity: The material density as denoted by the user.
	MaterialDensity float64 `json:"material_density" yaml:"material_density" schema:"material_density"`
	// 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"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

AsyncAPICallOutputError: A file mass.

type AsyncAPICallOutputID added in v0.2.13

type AsyncAPICallOutputID struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputUnit: The output unit for the volume.
	OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
	// Volume: The resulting volume.
	Volume float64 `json:"volume" yaml:"volume" schema:"volume"`
}

AsyncAPICallOutputID: A file volume.

type AsyncAPICallOutputOutputFormat added in v0.2.13

type AsyncAPICallOutputOutputFormat struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Density: The resulting density.
	Density float64 `json:"density" yaml:"density" schema:"density"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// MaterialMass: The material mass as denoted by the user.
	MaterialMass float64 `json:"material_mass" yaml:"material_mass" schema:"material_mass"`
	// 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"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

AsyncAPICallOutputOutputFormat: A file density.

type AsyncAPICallOutputOutputFormatOptions added in v0.2.27

type AsyncAPICallOutputOutputFormatOptions struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputUnit: The output unit for the surface area.
	OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// SurfaceArea: The resulting surface area.
	SurfaceArea float64 `json:"surface_area" yaml:"surface_area" schema:"surface_area"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

AsyncAPICallOutputOutputFormatOptions: A file surface area.

type AsyncAPICallOutputOutputs added in v0.2.29

type AsyncAPICallOutputOutputs struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	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 of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// ModelVersion: The version of the model.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
	// OutputFormat: The output format of the model.
	OutputFormat FileExportFormat `json:"output_format" yaml:"output_format" schema:"output_format,required"`
	// Outputs: The output of the model in the given file format the user requested, base64 encoded. The key of the map is the path of the output file.
	Outputs map[string]Base64 `json:"outputs" yaml:"outputs" schema:"outputs"`
	// Prompt: The prompt.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

AsyncAPICallOutputOutputs: Text to CAD.

type AsyncAPICallResultsPage added in v0.1.6

type AsyncAPICallResultsPage struct {
	// Items: list of items on this page of results
	Items []AsyncAPICall `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"`
}

AsyncAPICallResultsPage: A single page of results

type AsyncAPICallType added in v0.1.6

type AsyncAPICallType string

AsyncAPICallType: The type of async API call.

const (
	// AsyncAPICallTypeFileConversion: File conversion.
	AsyncAPICallTypeFileConversion AsyncAPICallType = "file_conversion"
	// AsyncAPICallTypeFileVolume: File volume.
	AsyncAPICallTypeFileVolume AsyncAPICallType = "file_volume"
	// AsyncAPICallTypeFileCenterOfMass: File center of mass.
	AsyncAPICallTypeFileCenterOfMass AsyncAPICallType = "file_center_of_mass"
	// AsyncAPICallTypeFileMass: File mass.
	AsyncAPICallTypeFileMass AsyncAPICallType = "file_mass"
	// AsyncAPICallTypeFileDensity: File density.
	AsyncAPICallTypeFileDensity AsyncAPICallType = "file_density"
	// AsyncAPICallTypeFileSurfaceArea: File surface area.
	AsyncAPICallTypeFileSurfaceArea AsyncAPICallType = "file_surface_area"
	// AsyncAPICallTypeTextToCad: Text to CAD.
	AsyncAPICallTypeTextToCad AsyncAPICallType = "text_to_cad"
)

type AuthCallback added in v0.2.33

type AuthCallback struct {
	// Code: The authorization code.
	Code string `json:"code" yaml:"code" schema:"code"`
	// IdToken: For Apple only, a JSON web token containing the user’s identity information.
	IdToken string `json:"id_token" yaml:"id_token" schema:"id_token"`
	// State: The state that we had passed in through the user consent URL.
	State string `json:"state" yaml:"state" schema:"state"`
	// User: For Apple only, a JSON string containing the data requested in the scope property. The returned data is in the following format: `{ "name": { "firstName": string, "lastName": string }, "email": string }`
	User string `json:"user" yaml:"user" schema:"user"`
}

AuthCallback: The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating.

type Axi added in v0.2.18

type Axi string

Axi: Co-ordinate axis specifier. See cglearn.eu for background reading.

const (
	// AxiY: 'Y' axis.
	AxiY Axi = "y"
	// AxiZ: 'Z' axis.
	AxiZ Axi = "z"
)

type AxisDirectionPair added in v0.2.18

type AxisDirectionPair struct {
	// Axis: Axis specifier.
	Axis Axi `json:"axis" yaml:"axis" schema:"axis,required"`
	// Direction: Specifies which direction the axis is pointing.
	Direction Direction `json:"direction" yaml:"direction" schema:"direction,required"`
}

AxisDirectionPair: An [`Axis`] paired with a [`Direction`].

type Base64 added in v0.2.4

type Base64 struct {
	Inner []byte
}

Base64 is a wrapper around url.Base64 which marshals to and from empty strings.

func (Base64) MarshalJSON added in v0.2.4

func (u Base64) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Base64) String added in v0.2.4

func (u Base64) String() string

func (*Base64) UnmarshalJSON added in v0.2.4

func (u *Base64) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

type BetaService added in v0.2.4

type BetaService service

BetaService: Beta API endpoints. We will not charge for these endpoints while they are in beta.

type BillingInfo added in v0.1.4

type BillingInfo struct {
	// Address: The address of the customer.
	Address AddressDetails `json:"address" yaml:"address" schema:"address"`
	// Name: The name of the customer.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The phone for the customer.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
}

BillingInfo: The billing information for payments.

type BlockReason added in v0.2.31

type BlockReason string

BlockReason: The reason for blocking a user.

const (
	// BlockReasonMissingPaymentMethod: The user is missing a payment method and has exceeded their free API call credits for the month.
	BlockReasonMissingPaymentMethod BlockReason = "missing_payment_method"
	// BlockReasonPaymentMethodFailed: The users payment method has failed.
	BlockReasonPaymentMethodFailed BlockReason = "payment_method_failed"
)

type CacheMetadata added in v0.1.4

type CacheMetadata struct {
	// Ok: If the cache returned an ok response from ping.
	Ok bool `json:"ok" yaml:"ok" schema:"ok,required"`
}

CacheMetadata: Metadata about our cache. This is mostly used for internal purposes and debugging.

type CameraDragEnd added in v0.2.18

type CameraDragEnd struct {
	// Settings: Camera settings
	Settings CameraSettings `json:"settings" yaml:"settings" schema:"settings,required"`
}

CameraDragEnd: The response from the `CameraDragEnd` command.

type CameraDragInteractionType added in v0.2.18

type CameraDragInteractionType string

CameraDragInteractionType: The type of camera drag interaction.

const (
	// CameraDragInteractionTypePan: Camera pan
	CameraDragInteractionTypePan CameraDragInteractionType = "pan"
	// CameraDragInteractionTypeRotate: Camera rotate (revolve/orbit)
	CameraDragInteractionTypeRotate CameraDragInteractionType = "rotate"
	// CameraDragInteractionTypeZoom: Camera zoom (increase or decrease distance to reference point center)
	CameraDragInteractionTypeZoom CameraDragInteractionType = "zoom"
)

type CameraDragMove added in v0.2.18

type CameraDragMove struct {
	// Settings: Camera settings
	Settings CameraSettings `json:"settings" yaml:"settings" schema:"settings,required"`
}

CameraDragMove: The response from the `CameraDragMove` command. Note this is an "unreliable" channel message, so this data may need more data like a "sequence"

type CameraSettings added in v0.2.33

type CameraSettings struct {
	// Center: Camera's look-at center (center-pos gives viewing vector)
	Center Point3D `json:"center" yaml:"center" schema:"center,required"`
	// FovY: Camera's field-of-view angle (if ortho is false)
	FovY float64 `json:"fov_y" yaml:"fov_y" schema:"fov_y"`
	// Ortho: Whether or not the camera is in ortho mode
	Ortho bool `json:"ortho" yaml:"ortho" schema:"ortho,required"`
	// OrthoScale: The camera's ortho scale (derived from viewing distance if ortho is true)
	OrthoScale float64 `json:"ortho_scale" yaml:"ortho_scale" schema:"ortho_scale"`
	// Pos: Camera position (vantage)
	Pos Point3D `json:"pos" yaml:"pos" schema:"pos,required"`
	// Up: Camera's world-space up vector
	Up Point3D `json:"up" yaml:"up" schema:"up,required"`
}

CameraSettings: Camera settings including position, center, fov etc

type CardDetails added in v0.1.4

type CardDetails struct {
	// Brand: Card brand.
	//
	// Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`.
	Brand string `json:"brand" yaml:"brand" schema:"brand"`
	// Checks: Checks on Card address and CVC if provided.
	Checks PaymentMethodCardChecks `json:"checks" yaml:"checks" schema:"checks"`
	// Country: Two-letter ISO code representing the country of the card.
	Country string `json:"country" yaml:"country" schema:"country"`
	// ExpMonth: Two-digit number representing the card's expiration month.
	ExpMonth int `json:"exp_month" yaml:"exp_month" schema:"exp_month"`
	// ExpYear: Four-digit number representing the card's expiration year.
	ExpYear int `json:"exp_year" yaml:"exp_year" schema:"exp_year"`
	// Fingerprint: Uniquely identifies this particular card number.
	Fingerprint string `json:"fingerprint" yaml:"fingerprint" schema:"fingerprint"`
	// Funding: Card funding type.
	//
	// Can be `credit`, `debit`, `prepaid`, or `unknown`.
	Funding string `json:"funding" yaml:"funding" schema:"funding"`
	// Last4: The last four digits of the card.
	Last4 string `json:"last4" yaml:"last4" schema:"last4"`
}

CardDetails: The card details of a payment method.

type CenterOfMass added in v0.2.28

type CenterOfMass struct {
	// CenterOfMass: The center of mass.
	CenterOfMass Point3D `json:"center_of_mass" yaml:"center_of_mass" schema:"center_of_mass,required"`
	// OutputUnit: The output unit for the center of mass.
	OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
}

CenterOfMass: The center of mass response.

type Client

type Client struct {

	// Ai: AI uses machine learning to generate CAD models.
	Ai *AiService
	// APICall: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.
	APICall *APICallService
	// APIToken: API tokens allow users to call the API outside of their session token that is used as a cookie in the user interface. Users can create, delete, and list their API tokens. But, of course, you need an API token to do this, so first be sure to generate one in the account UI.
	APIToken *APITokenService
	// App: Endpoints for third party app grant flows.
	App *AppService
	// Beta: Beta API endpoints. We will not charge for these endpoints while they are in beta.
	Beta *BetaService
	// Constant: Constants. These are helpful as helpers.
	Constant *ConstantService
	// Executor: Endpoints that allow for code execution or creation of code execution environments.
	Executor *ExecutorService
	// File: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.
	File *FileService
	// Hidden: Hidden API endpoints that should not show up in the docs.
	Hidden *HiddenService
	// Meta: Meta information about the API.
	Meta *MetaService
	// Modeling: Modeling API for updating your 3D files using the Zoo engine.
	Modeling *ModelingService
	// Oauth2: Endpoints that implement OAuth 2.0 grant flows.
	Oauth2 *Oauth2Service
	// Org: An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs.
	Org *OrgService
	// Payment: Operations around payments and billing.
	Payment *PaymentService
	// ServiceAccount: Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won't stop working when an individual leaves the company.
	ServiceAccount *ServiceAccountService
	// Store: Operations involving our swag store.
	Store *StoreService
	// Unit: Unit conversion operations.
	Unit *UnitService
	// User: A user is someone who uses the Zoo API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.
	User *UserService
	// contains filtered or unexported fields
}

Client which conforms to the OpenAPI v3 specification for this service.

func NewClient

func NewClient(token, userAgent string) (*Client, error)

NewClient creates a new client for the KittyCad API. You need to pass in your API token to create the client.

Example

Create a client with your token.

client, err := kittycad.NewClient("$TOKEN", "your apps user agent")
if err != nil {
	panic(err)
}

// Call the client's methods.
result, err := client.Meta.Ping()
if err != nil {
	panic(err)
}

fmt.Println(result)
Output:

func NewClientFromEnv

func NewClientFromEnv(userAgent string) (*Client, error)

NewClientFromEnv creates a new client for the KittyCad API, using the token stored in the environment variable `KITTYCAD_API_TOKEN`.

Example

Create a new client with your token parsed from the environment variable: `KITTYCAD_API_TOKEN`.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

// Call the client's methods.
result, err := client.Meta.Ping()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*Client) WithBaseURL

func (c *Client) WithBaseURL(baseURL string) error

WithBaseURL overrides the baseURL.

func (*Client) WithToken

func (c *Client) WithToken(token string)

WithToken overrides the token used for authentication.

type ClientMetrics added in v0.2.28

type ClientMetrics struct {
	// RtcFramesDecoded: Counter of the number of WebRTC frames that the client has decoded during this session.
	RtcFramesDecoded int `json:"rtc_frames_decoded" yaml:"rtc_frames_decoded" schema:"rtc_frames_decoded,required"`
	// RtcFramesDropped: Counter of the number of WebRTC frames the client has dropped during this session.
	RtcFramesDropped int `json:"rtc_frames_dropped" yaml:"rtc_frames_dropped" schema:"rtc_frames_dropped,required"`
	// RtcFramesPerSecond: Current number of frames being rendered per second. A good target is 60 frames per second, but it can fluctuate depending on network conditions.
	RtcFramesPerSecond int `json:"rtc_frames_per_second" yaml:"rtc_frames_per_second" schema:"rtc_frames_per_second,required"`
	// RtcFramesReceived: Counter of the number of WebRTC frames that the client has received during this session.
	RtcFramesReceived int `json:"rtc_frames_received" yaml:"rtc_frames_received" schema:"rtc_frames_received,required"`
	// RtcFreezeCount: Number of times the WebRTC playback has frozen. This is usually due to network conditions.
	RtcFreezeCount int `json:"rtc_freeze_count" yaml:"rtc_freeze_count" schema:"rtc_freeze_count,required"`
	// RtcJitterSec: Amount of "jitter" in the WebRTC session. Network latency is the time it takes a packet to traverse the network. The amount that the latency varies is the jitter. Video latency is the time it takes to render a frame sent by the server (including network latency). A low jitter means the video latency can be reduced without impacting smooth playback. High jitter means clients will increase video latency to ensure smooth playback.
	RtcJitterSec float64 `json:"rtc_jitter_sec" yaml:"rtc_jitter_sec" schema:"rtc_jitter_sec,required"`
	// RtcKeyframesDecoded: Number of "key frames" decoded in the underlying h.264 stream. A key frame is an expensive (bandwidth-wise) "full image" of the video frame. Data after the keyframe become -- effectively -- "diff" operations on that key frame. The Engine will only send a keyframe if required, which is an indication that some of the "diffs" have been lost, usually an indication of poor network conditions. We like this metric to understand times when the connection has had to recover.
	RtcKeyframesDecoded int `json:"rtc_keyframes_decoded" yaml:"rtc_keyframes_decoded" schema:"rtc_keyframes_decoded,required"`
	// RtcTotalFreezesDurationSec: Number of seconds of frozen video the user has been subjected to.
	RtcTotalFreezesDurationSec float64 `json:"rtc_total_freezes_duration_sec" yaml:"rtc_total_freezes_duration_sec" schema:"rtc_total_freezes_duration_sec,required"`
}

ClientMetrics: ClientMetrics contains information regarding the state of the peer.

type Cluster added in v0.1.1

type Cluster struct {
	// Addr: The IP address of the cluster.
	Addr string `json:"addr" yaml:"addr" schema:"addr"`
	// AuthTimeout: The auth timeout of the cluster.
	AuthTimeout int `json:"auth_timeout" yaml:"auth_timeout" schema:"auth_timeout"`
	// ClusterPort: The port of the cluster.
	ClusterPort int `json:"cluster_port" yaml:"cluster_port" schema:"cluster_port"`
	// Name: The name of the cluster.
	Name string `json:"name" yaml:"name" schema:"name"`
	// TlsTimeout: The TLS timeout for the cluster.
	TlsTimeout int `json:"tls_timeout" yaml:"tls_timeout" schema:"tls_timeout"`
	// Urls: The urls of the cluster.
	Urls []string `json:"urls" yaml:"urls" schema:"urls"`
}

Cluster: Cluster information.

type CodeLanguage added in v0.1.4

type CodeLanguage string

CodeLanguage: The language code is written in. <details><summary>JSON schema</summary>

```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>

const (
	// CodeLanguageGo: The `go` programming language.
	CodeLanguageGo CodeLanguage = "go"
	// CodeLanguagePython: The `python` programming language.
	CodeLanguagePython CodeLanguage = "python"
	// CodeLanguageNode: The `node` programming language.
	CodeLanguageNode CodeLanguage = "node"
)

type CodeOutput added in v0.1.4

type CodeOutput struct {
	// OutputFiles: The contents of the files requested if they were passed.
	OutputFiles []OutputFile `json:"output_files" yaml:"output_files" schema:"output_files"`
	// Stderr: The stderr of the code.
	Stderr string `json:"stderr" yaml:"stderr" schema:"stderr"`
	// Stdout: The stdout of the code.
	Stdout string `json:"stdout" yaml:"stdout" schema:"stdout"`
}

CodeOutput: Output of the code being executed. <details><summary>JSON schema</summary>

```json { "description": "Output of the code being executed.", "type": "object", "properties": { "output_files": { "description": "The contents of the files requested if they were passed.", "type": "array", "items": { "$ref": "#/components/schemas/OutputFile" } }, "stderr": { "description": "The stderr of the code.", "default": "", "type": "string" }, "stdout": { "description": "The stdout of the code.", "default": "", "type": "string" } } } ``` </details>

type Color added in v0.2.22

type Color struct {
	// A: Alpha
	A float64 `json:"a" yaml:"a" schema:"a,required"`
	// B: Blue
	B float64 `json:"b" yaml:"b" schema:"b,required"`
	// G: Green
	G float64 `json:"g" yaml:"g" schema:"g,required"`
	// R: Red
	R float64 `json:"r" yaml:"r" schema:"r,required"`
}

Color: An RGBA color

type Connection added in v0.1.4

type Connection struct {
	// AuthTimeout: The auth timeout of the server.
	AuthTimeout int `json:"auth_timeout" yaml:"auth_timeout" schema:"auth_timeout"`
	// Cluster: Information about the cluster.
	Cluster Cluster `json:"cluster" yaml:"cluster" schema:"cluster"`
	// ConfigLoadTime: The time the configuration was loaded.
	ConfigLoadTime Time `json:"config_load_time" yaml:"config_load_time" schema:"config_load_time,required"`
	// Connections: The number of connections to the server.
	Connections int `json:"connections" yaml:"connections" schema:"connections"`
	// Cores: The CPU core usage of the server.
	Cores int `json:"cores" yaml:"cores" schema:"cores"`
	// Cpu: The CPU usage of the server.
	Cpu float64 `json:"cpu" yaml:"cpu" schema:"cpu"`
	// Gateway: Information about the gateway.
	Gateway Gateway `json:"gateway" yaml:"gateway" schema:"gateway"`
	// GitCommit: The git commit.
	GitCommit string `json:"git_commit" yaml:"git_commit" schema:"git_commit"`
	// Go: The go version.
	Go string `json:"go" yaml:"go" schema:"go"`
	// Gomaxprocs: `GOMAXPROCS` of the server.
	Gomaxprocs int `json:"gomaxprocs" yaml:"gomaxprocs" schema:"gomaxprocs"`
	// Host: The host of the server.
	Host IP `json:"host" yaml:"host" schema:"host,required"`
	// HttpBasePath: The http base path of the server.
	HttpBasePath string `json:"http_base_path" yaml:"http_base_path" schema:"http_base_path"`
	// HttpHost: The http host of the server.
	HttpHost string `json:"http_host" yaml:"http_host" schema:"http_host"`
	// HttpPort: The http port of the server.
	HttpPort int `json:"http_port" yaml:"http_port" schema:"http_port"`
	// HttpReqStats: HTTP request statistics.
	HttpReqStats map[string]int `json:"http_req_stats" yaml:"http_req_stats" schema:"http_req_stats,required"`
	// HttpsPort: The https port of the server.
	HttpsPort int `json:"https_port" yaml:"https_port" schema:"https_port"`
	// InBytes: The count of inbound bytes for the server.
	InBytes int `json:"in_bytes" yaml:"in_bytes" schema:"in_bytes"`
	// InMsgs: The number of inbound messages for the server.
	InMsgs int `json:"in_msgs" yaml:"in_msgs" schema:"in_msgs"`
	// Jetstream: Jetstream information.
	Jetstream Jetstream `json:"jetstream" yaml:"jetstream" schema:"jetstream"`
	// Leaf: Information about leaf nodes.
	Leaf LeafNode `json:"leaf" yaml:"leaf" schema:"leaf"`
	// Leafnodes: The number of leaf nodes for the server.
	Leafnodes int `json:"leafnodes" yaml:"leafnodes" schema:"leafnodes"`
	// MaxConnections: The max connections of the server.
	MaxConnections int `json:"max_connections" yaml:"max_connections" schema:"max_connections"`
	// MaxControlLine: The max control line of the server.
	MaxControlLine int `json:"max_control_line" yaml:"max_control_line" schema:"max_control_line"`
	// MaxPayload: The max payload of the server.
	MaxPayload int `json:"max_payload" yaml:"max_payload" schema:"max_payload"`
	// MaxPending: The max pending of the server.
	MaxPending int `json:"max_pending" yaml:"max_pending" schema:"max_pending"`
	// Mem: The memory usage of the server.
	Mem int `json:"mem" yaml:"mem" schema:"mem"`
	// Now: The time now.
	Now Time `json:"now" yaml:"now" schema:"now,required"`
	// OutBytes: The count of outbound bytes for the server.
	OutBytes int `json:"out_bytes" yaml:"out_bytes" schema:"out_bytes"`
	// OutMsgs: The number of outbound messages for the server.
	OutMsgs int `json:"out_msgs" yaml:"out_msgs" schema:"out_msgs"`
	// PingInterval: The ping interval of the server.
	PingInterval int `json:"ping_interval" yaml:"ping_interval" schema:"ping_interval"`
	// PingMax: The ping max of the server.
	PingMax int `json:"ping_max" yaml:"ping_max" schema:"ping_max"`
	// Port: The port of the server.
	Port int `json:"port" yaml:"port" schema:"port"`
	// Proto: The protocol version.
	Proto int `json:"proto" yaml:"proto" schema:"proto"`
	// Remotes: The number of remotes for the server.
	Remotes int `json:"remotes" yaml:"remotes" schema:"remotes"`
	// Routes: The number of routes for the server.
	Routes int `json:"routes" yaml:"routes" schema:"routes"`
	// ServerID: The server ID.
	ServerID string `json:"server_id" yaml:"server_id" schema:"server_id"`
	// ServerName: The server name.
	ServerName string `json:"server_name" yaml:"server_name" schema:"server_name"`
	// SlowConsumers: The number of slow consumers for the server.
	SlowConsumers int `json:"slow_consumers" yaml:"slow_consumers" schema:"slow_consumers"`
	// Start: When the server was started.
	Start Time `json:"start" yaml:"start" schema:"start,required"`
	// Subscriptions: The number of subscriptions for the server.
	Subscriptions int `json:"subscriptions" yaml:"subscriptions" schema:"subscriptions"`
	// SystemAccount: The system account.
	SystemAccount string `json:"system_account" yaml:"system_account" schema:"system_account"`
	// TlsTimeout: The TLS timeout of the server.
	TlsTimeout int `json:"tls_timeout" yaml:"tls_timeout" schema:"tls_timeout"`
	// TotalConnections: The total number of connections to the server.
	TotalConnections int `json:"total_connections" yaml:"total_connections" schema:"total_connections"`
	// Uptime: The uptime of the server.
	Uptime string `json:"uptime" yaml:"uptime" schema:"uptime"`
	// Version: The version of the service.
	Version string `json:"version" yaml:"version" schema:"version"`
	// WriteDeadline: The write deadline of the server.
	WriteDeadline int `json:"write_deadline" yaml:"write_deadline" schema:"write_deadline"`
}

Connection: Metadata about a pub-sub connection. This is mostly used for internal purposes and debugging.

type ConstantService added in v0.2.5

type ConstantService service

ConstantService: Constants. These are helpful as helpers.

type Coupon added in v0.2.18

type Coupon struct {
	// AmountOff: Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
	AmountOff float64 `json:"amount_off" yaml:"amount_off" schema:"amount_off"`
	// Deleted: Always true for a deleted object.
	Deleted bool `json:"deleted" yaml:"deleted" schema:"deleted"`
	// ID: Unique identifier for the object.
	ID string `json:"id" yaml:"id" schema:"id"`
	// Metadata: Set of key-value pairs.
	Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
	// Name: Name of the coupon displayed to customers on, for instance invoices, or receipts.
	//
	// By default the `id` is shown if `name` is not set.
	Name string `json:"name" yaml:"name" schema:"name"`
	// PercentOff: Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.
	//
	// For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
	PercentOff float64 `json:"percent_off" yaml:"percent_off" schema:"percent_off"`
}

Coupon: The resource representing a Coupon.

type CreatedAtSortMode added in v0.0.9

type CreatedAtSortMode string

CreatedAtSortMode: Supported set of sort modes for scanning by created_at only. Currently, we only support scanning in ascending order.

const (
	// CreatedAtSortModeCreatedAtAscending: Sort in increasing order of "created_at".
	CreatedAtSortModeCreatedAtAscending CreatedAtSortMode = "created_at_ascending"
	// CreatedAtSortModeCreatedAtDescending: Sort in decreasing order of "created_at".
	CreatedAtSortModeCreatedAtDescending CreatedAtSortMode = "created_at_descending"
)

type CurveGetControlPoints added in v0.2.27

type CurveGetControlPoints struct {
	// ControlPoints: Control points in the curve.
	ControlPoints []Point3D `json:"control_points" yaml:"control_points" schema:"control_points,required"`
}

CurveGetControlPoints: The response from the `CurveGetControlPoints` command.

type CurveGetEndPoints added in v0.2.28

type CurveGetEndPoints struct {
	// End: End
	End Point3D `json:"end" yaml:"end" schema:"end,required"`
	// Start: Start
	Start Point3D `json:"start" yaml:"start" schema:"start,required"`
}

CurveGetEndPoints: Endpoints of a curve

type CurveGetType added in v0.2.27

type CurveGetType struct {
	// CurveType: Curve type
	CurveType CurveType `json:"curve_type" yaml:"curve_type" schema:"curve_type,required"`
}

CurveGetType: The response from the `CurveGetType` command.

type CurveType added in v0.2.27

type CurveType string

CurveType: The type of Curve (embedded within path)

const (
	// CurveTypeLine represents the CurveType `"line"`.
	CurveTypeLine CurveType = "line"
	// CurveTypeArc represents the CurveType `"arc"`.
	CurveTypeArc CurveType = "arc"
	// CurveTypeNurbs represents the CurveType `"nurbs"`.
	CurveTypeNurbs CurveType = "nurbs"
)

type Customer added in v0.1.4

type Customer struct {
	// Address: The customer's address.
	Address AddressDetails `json:"address" yaml:"address" schema:"address"`
	// Balance: Current balance, if any, being stored on the customer in the payments service.
	//
	// If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized.
	Balance float64 `json:"balance" yaml:"balance" schema:"balance"`
	// CreatedAt: Time at which the object was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Currency: Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes.
	Currency string `json:"currency" yaml:"currency" schema:"currency"`
	// Delinquent: When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed.
	//
	// When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date.  If an invoice is marked uncollectible by dunning, `delinquent` doesn't get reset to `false`.
	Delinquent bool `json:"delinquent" yaml:"delinquent" schema:"delinquent"`
	// Email: The customer's email address.
	Email string `json:"email" yaml:"email" schema:"email"`
	// ID: Unique identifier for the object.
	ID string `json:"id" yaml:"id" schema:"id"`
	// Metadata: Set of key-value pairs.
	Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
	// Name: The customer's full name or business name.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The customer's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
}

Customer: The resource representing a payment "Customer".

type CustomerBalance added in v0.2.3

type CustomerBalance struct {
	// CreatedAt: The date and time the balance was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: The unique identifier for the balance.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// MapID: The mapping id of the user or org.
	MapID UUID `json:"map_id" yaml:"map_id" schema:"map_id,required"`
	// ModelingAppEnterprisePrice: The enterprise price for the Modeling App subscription, if they are on the enterprise plan.
	ModelingAppEnterprisePrice any `json:"modeling_app_enterprise_price" yaml:"modeling_app_enterprise_price" schema:"modeling_app_enterprise_price"`
	// MonthlyCreditsRemaining: The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the customer per month.
	MonthlyCreditsRemaining float64 `json:"monthly_credits_remaining" yaml:"monthly_credits_remaining" schema:"monthly_credits_remaining,required"`
	// PrePayCashRemaining: The amount of pre-pay cash remaining in the balance. This number goes down as the customer uses their pre-paid credits. The reason we track this amount is if a customer ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a customer has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.
	PrePayCashRemaining float64 `json:"pre_pay_cash_remaining" yaml:"pre_pay_cash_remaining" schema:"pre_pay_cash_remaining,required"`
	// PrePayCreditsRemaining: The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a customer adds funds to their balance. This may be through a subscription or a one off payment.
	PrePayCreditsRemaining float64 `json:"pre_pay_credits_remaining" yaml:"pre_pay_credits_remaining" schema:"pre_pay_credits_remaining,required"`
	// SubscriptionDetails: Details about the subscription.
	SubscriptionDetails ZooProductSubscriptions `json:"subscription_details" yaml:"subscription_details" schema:"subscription_details"`
	// SubscriptionID: The subscription ID for the user.
	SubscriptionID string `json:"subscription_id" yaml:"subscription_id" schema:"subscription_id"`
	// TotalDue: This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the customer has on their account.
	TotalDue float64 `json:"total_due" yaml:"total_due" schema:"total_due,required"`
	// UpdatedAt: The date and time the balance was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

CustomerBalance: A balance for a customer. This holds information about the financial balance for the customer.

type Data added in v0.2.27

type Data struct {
	// Files: The exported files
	Files []RawFile `json:"files" yaml:"files" schema:"files,required"`
}

Data is the type definition for a Data.

type DefaultCameraFocusOn added in v0.2.33

type DefaultCameraFocusOn struct {
}

DefaultCameraFocusOn: The response from the `DefaultCameraFocusOn` command.

type DefaultCameraGetSettings added in v0.2.33

type DefaultCameraGetSettings struct {
	// Settings: Camera settings
	Settings CameraSettings `json:"settings" yaml:"settings" schema:"settings,required"`
}

DefaultCameraGetSettings: The response from the `DefaultCameraGetSettings` command.

type DefaultCameraZoom added in v0.2.33

type DefaultCameraZoom struct {
	// Settings: Camera settings
	Settings CameraSettings `json:"settings" yaml:"settings" schema:"settings,required"`
}

DefaultCameraZoom: The response from the `DefaultCameraZoom` command.

type Density added in v0.2.28

type Density struct {
	// Density: The density.
	Density float64 `json:"density" yaml:"density" schema:"density,required"`
	// OutputUnit: The output unit for the density.
	OutputUnit UnitDensity `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
}

Density: The density response.

type DerEncodedKeyPair added in v0.2.33

type DerEncodedKeyPair struct {
	// PrivateKey: The request signing private key (pem file).
	PrivateKey Base64 `json:"private_key" yaml:"private_key" schema:"private_key,required"`
	// PublicCert: The request signing public certificate (pem file).
	PublicCert Base64 `json:"public_cert" yaml:"public_cert" schema:"public_cert,required"`
}

DerEncodedKeyPair: The DER encoded key pair.

type DeviceAccessTokenRequestForm added in v0.1.9

type DeviceAccessTokenRequestForm struct {
	// ClientID: The client ID.
	ClientID UUID `json:"client_id" yaml:"client_id" schema:"client_id,required"`
	// DeviceCode: The device code.
	DeviceCode UUID `json:"device_code" yaml:"device_code" schema:"device_code,required"`
	// GrantType: The grant type.
	GrantType Oauth2GrantType `json:"grant_type" yaml:"grant_type" schema:"grant_type,required"`
}

DeviceAccessTokenRequestForm: The form for a device access token request.

type DeviceAuthRequestForm added in v0.1.9

type DeviceAuthRequestForm struct {
	// ClientID: The client ID.
	ClientID UUID `json:"client_id" yaml:"client_id" schema:"client_id,required"`
}

DeviceAuthRequestForm: The request parameters for the OAuth 2.0 Device Authorization Grant flow.

type DeviceAuthVerifyParams added in v0.1.9

type DeviceAuthVerifyParams struct {
	// UserCode: The user code.
	UserCode string `json:"user_code" yaml:"user_code" schema:"user_code,required"`
}

DeviceAuthVerifyParams: The request parameters to verify the `user_code` for the OAuth 2.0 Device Authorization Grant.

type Direction added in v0.2.18

type Direction string

Direction: Specifies the sign of a co-ordinate axis.

const (
	// DirectionPositive: Increasing numbers.
	DirectionPositive Direction = "positive"
	// DirectionNegative: Decreasing numbers.
	DirectionNegative Direction = "negative"
)

type Discount added in v0.2.18

type Discount struct {
	// Coupon: The coupon that applied to create this discount.
	Coupon Coupon `json:"coupon" yaml:"coupon" schema:"coupon,required"`
}

Discount: The resource representing a Discount.

type DiscountCode added in v0.2.33

type DiscountCode struct {
	// Code: The code for the discount.
	Code string `json:"code" yaml:"code" schema:"code,required"`
	// ExpiresAt: The date the discount code expires.
	ExpiresAt Time `json:"expires_at" yaml:"expires_at" schema:"expires_at"`
	// PercentOff: The percent off for the discount.
	PercentOff int `json:"percent_off" yaml:"percent_off" schema:"percent_off,required"`
}

DiscountCode: A discount code for a store.

type DistanceTypeAxis added in v0.2.29

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"`
}

DistanceTypeAxis: The distance between objects along the specified axis

type DistanceTypeEuclidean added in v0.2.29

type DistanceTypeEuclidean struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

DistanceTypeEuclidean: Euclidean Distance.

type EmailAuthenticationForm added in v0.1.9

type EmailAuthenticationForm struct {
	// CallbackUrl: The URL to redirect back to after we have authenticated.
	CallbackUrl URL `json:"callback_url" yaml:"callback_url" schema:"callback_url"`
	// Email: The user's email.
	Email string `json:"email" yaml:"email" schema:"email,required"`
}

EmailAuthenticationForm: The body of the form for email authentication.

type EntityCircularPattern added in v0.2.33

type EntityCircularPattern struct {
	// EntityIds: The UUIDs of the entities that were created.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

EntityCircularPattern: The response from the `EntityCircularPattern` command.

type EntityGetAllChildUuids added in v0.2.27

type EntityGetAllChildUuids struct {
	// EntityIds: The UUIDs of the child entities.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

EntityGetAllChildUuids: The response from the `EntityGetAllChildUuids` command.

type EntityGetChildUuid added in v0.2.27

type EntityGetChildUuid struct {
	// EntityID: The UUID of the child entity.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
}

EntityGetChildUuid: The response from the `EntityGetChildUuid` command.

type EntityGetDistance added in v0.2.29

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"`
}

EntityGetDistance: The response from the `EntitiesGetDistance` command.

type EntityGetNumChildren added in v0.2.27

type EntityGetNumChildren struct {
	// Num: The number of children the entity has.
	Num int `json:"num" yaml:"num" schema:"num,required"`
}

EntityGetNumChildren: The response from the `EntityGetNumChildren` command.

type EntityGetParentID added in v0.2.27

type EntityGetParentID struct {
	// EntityID: The UUID of the parent entity.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
}

EntityGetParentID: The response from the `EntityGetParentId` command.

type EntityLinearPattern added in v0.2.29

type EntityLinearPattern struct {
	// EntityIds: The UUIDs of the entities that were created.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

EntityLinearPattern: The response from the `EntityLinearPattern` command.

type EntityType added in v0.2.22

type EntityType string

EntityType: The type of entity

const (
	// EntityTypeEntity represents the EntityType `"entity"`.
	EntityTypeEntity EntityType = "entity"
	// EntityTypeObject represents the EntityType `"object"`.
	EntityTypeObject EntityType = "object"
	// EntityTypePath represents the EntityType `"path"`.
	EntityTypePath EntityType = "path"
	// EntityTypeCurve represents the EntityType `"curve"`.
	EntityTypeCurve EntityType = "curve"
	// EntityTypeSolid2D represents the EntityType `"solid2d"`.
	EntityTypeSolid2D EntityType = "solid2d"
	// EntityTypeSolid3D represents the EntityType `"solid3d"`.
	EntityTypeSolid3D EntityType = "solid3d"
	// EntityTypeEdge represents the EntityType `"edge"`.
	EntityTypeEdge EntityType = "edge"
	// EntityTypeFace represents the EntityType `"face"`.
	EntityTypeFace EntityType = "face"
	// EntityTypePlane represents the EntityType `"plane"`.
	EntityTypePlane EntityType = "plane"
	// EntityTypeVertex represents the EntityType `"vertex"`.
	EntityTypeVertex EntityType = "vertex"
)

type Environment

type Environment string

Environment: The environment the server is running in.

const (
	// EnvironmentDevelopment: The development environment. This is for running locally.
	EnvironmentDevelopment Environment = "DEVELOPMENT"
	// EnvironmentPreview: The preview environment. This is when PRs are created and a service is deployed for testing.
	EnvironmentPreview Environment = "PREVIEW"
	// EnvironmentProduction: The production environment.
	EnvironmentProduction Environment = "PRODUCTION"
)

type Error added in v0.0.9

type Error struct {
	// ErrorCode:
	ErrorCode string `json:"error_code" yaml:"error_code" schema:"error_code"`
	// Message:
	Message string `json:"message" yaml:"message" schema:"message,required"`
	// RequestID:
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id,required"`
}

Error: Error information from a response.

type ErrorCode added in v0.2.23

type ErrorCode string

ErrorCode: The type of error sent by the KittyCAD API.

const (
	// ErrorCodeInternalEngine: Graphics engine failed to complete request, consider retrying
	ErrorCodeInternalEngine ErrorCode = "internal_engine"
	// ErrorCodeInternalAPI: API failed to complete request, consider retrying
	ErrorCodeInternalAPI ErrorCode = "internal_api"
	// ErrorCodeBadRequest: User requested something geometrically or graphically impossible. Don't retry this request, as it's inherently impossible. Instead, read the error message and change your request.
	ErrorCodeBadRequest ErrorCode = "bad_request"
	// ErrorCodeInvalidJson: Client sent invalid JSON.
	ErrorCodeInvalidJson ErrorCode = "invalid_json"
	// ErrorCodeInvalidBson: Client sent invalid BSON.
	ErrorCodeInvalidBson ErrorCode = "invalid_bson"
	// ErrorCodeWrongProtocol: Client sent a message which is not accepted over this protocol.
	ErrorCodeWrongProtocol ErrorCode = "wrong_protocol"
	// ErrorCodeConnectionProblem: Problem sending data between client and KittyCAD API.
	ErrorCodeConnectionProblem ErrorCode = "connection_problem"
	// ErrorCodeMessageTypeNotAccepted: Client sent a Websocket message type which the KittyCAD API does not handle.
	ErrorCodeMessageTypeNotAccepted ErrorCode = "message_type_not_accepted"
	// ErrorCodeMessageTypeNotAcceptedForWebRTC: Client sent a Websocket message intended for WebRTC but it was configured as a WebRTC connection.
	ErrorCodeMessageTypeNotAcceptedForWebRTC ErrorCode = "message_type_not_accepted_for_web_r_t_c"
)

type Event added in v0.2.33

type Event struct {
	// AttachmentUri: Attachment URI for where the attachment is stored.
	AttachmentUri string `json:"attachment_uri" yaml:"attachment_uri" schema:"attachment_uri"`
	// CreatedAt: Time this event was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// EventType: The specific event type from the modeling app.
	EventType ModelingAppEventType `json:"event_type" yaml:"event_type" schema:"event_type,required"`
	// LastCompiledAt: Time the associated attachment was last compiled.
	LastCompiledAt Time `json:"last_compiled_at" yaml:"last_compiled_at" schema:"last_compiled_at"`
	// ProjectDescription: Project descriptino as given by the user.
	ProjectDescription string `json:"project_description" yaml:"project_description" schema:"project_description"`
	// ProjectName: Project name as given by the user.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name,required"`
	// SourceID: The source app for this event, uuid that is unique to the app.
	SourceID UUID `json:"source_id" yaml:"source_id" schema:"source_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// UserID: An anonymous user id generated client-side.
	UserID string `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

Event: An event related to modeling app files

type ExecutorService added in v0.2.14

type ExecutorService service

ExecutorService: Endpoints that allow for code execution or creation of code execution environments.

func (*ExecutorService) CreateFileExecution added in v0.2.14

func (s *ExecutorService) CreateFileExecution(lang CodeLanguage, output string, body []byte) (*CodeOutput, error)

CreateFileExecution: Execute a Zoo program in a specific language. Parameters

  • `lang`: The language code is written in.

    <details><summary>JSON schema</summary>

    ```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>

  • `output`

  • `body`

Example

CreateFileExecution: Execute a Zoo program in a specific language. Parameters

  • `lang`: The language code is written in.

    <details><summary>JSON schema</summary>

    ```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>

  • `output`

  • `body`

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Executor.CreateFileExecution("", "some-string", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*ExecutorService) CreateTerm added in v0.2.14

func (s *ExecutorService) CreateTerm() (*websocket.Conn, error)

CreateTerm: Create a terminal. Attach to a docker container to create an interactive terminal.

Example

CreateTerm: Create a terminal. Attach to a docker container to create an interactive terminal.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

// Create the websocket connection.
ws, err := client.Executor.CreateTerm()
if err != nil {
	panic(err)
}

defer ws.Close()

done := make(chan struct{})

go func() {
	defer close(done)
	for {
		_, message, err := ws.ReadMessage()
		if err != nil {
			log.Println("read:", err)
			return
		}
		log.Printf("recv: %s", message)
	}
}()

ticker := time.NewTicker(time.Second)
defer ticker.Stop()

interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt)

for {
	select {
	case <-done:
		return
	case t := <-ticker.C:
		err := ws.WriteMessage(websocket.TextMessage, []byte(t.String()))
		if err != nil {
			log.Println("write:", err)
			return
		}
	case <-interrupt:
		log.Println("interrupt")

		// Cleanly close the connection by sending a close message and then
		// waiting (with timeout) for the server to close the connection.
		err := ws.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
		if err != nil {
			log.Println("write close:", err)
			return
		}
		select {
		case <-done:
		case <-time.After(time.Second):
		}
		return
	}
}
Output:

type Export added in v0.2.19

type Export struct {
	// Files: The files that were exported.
	Files []ExportFile `json:"files" yaml:"files" schema:"files,required"`
}

Export: The response from the `Export` endpoint.

type ExportFile added in v0.2.22

type ExportFile struct {
	// Contents: The contents of the file, base64 encoded.
	Contents Base64 `json:"contents" yaml:"contents" schema:"contents,required"`
	// Name: The name of the file.
	Name string `json:"name" yaml:"name" schema:"name,required"`
}

ExportFile: A file to be exported to the client.

type ExtendedUser added in v0.0.9

type ExtendedUser struct {
	// Block: If the user should be blocked and the reason why.
	Block BlockReason `json:"block" yaml:"block" schema:"block"`
	// CanTrainOnData: If we can train on the user's data. If the user is a member of an organization, the organization's setting will override this.
	CanTrainOnData bool `json:"can_train_on_data" yaml:"can_train_on_data" schema:"can_train_on_data"`
	// Company: The user's company.
	Company string `json:"company" yaml:"company" schema:"company"`
	// CreatedAt: The date and time the user was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Discord: The user's Discord handle.
	Discord string `json:"discord" yaml:"discord" schema:"discord"`
	// Email: The email address of the user.
	Email string `json:"email" yaml:"email" schema:"email"`
	// EmailVerified: The date and time the email address was verified.
	EmailVerified Time `json:"email_verified" yaml:"email_verified" schema:"email_verified"`
	// FirstName: The user's first name.
	FirstName string `json:"first_name" yaml:"first_name" schema:"first_name"`
	// FrontID: The user's Front ID. This is mostly used for internal mapping.
	FrontID string `json:"front_id" yaml:"front_id" schema:"front_id"`
	// Github: The user's GitHub handle.
	Github string `json:"github" yaml:"github" schema:"github"`
	// ID: The unique identifier for the user.
	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"`
	// IsServiceAccount: If the user is tied to a service account.
	IsServiceAccount bool `json:"is_service_account" yaml:"is_service_account" schema:"is_service_account"`
	// LastName: The user's last name.
	LastName string `json:"last_name" yaml:"last_name" schema:"last_name"`
	// MailchimpID: The user's MailChimp ID. This is mostly used for internal mapping.
	MailchimpID string `json:"mailchimp_id" yaml:"mailchimp_id" schema:"mailchimp_id"`
	// Name: The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The user's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
	// StripeID: The user's Stripe ID. This is mostly used for internal mapping.
	StripeID string `json:"stripe_id" yaml:"stripe_id" schema:"stripe_id"`
	// UpdatedAt: The date and time the user was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

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

type ExtendedUserResultsPage added in v0.1.0

type ExtendedUserResultsPage struct {
	// Items: list of items on this page of results
	Items []ExtendedUser `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"`
}

ExtendedUserResultsPage: A single page of results

type ExtrusionFaceCapType added in v0.2.33

type ExtrusionFaceCapType string

ExtrusionFaceCapType: Possible types of faces which can be extruded from a 3D solid.

const (
	// ExtrusionFaceCapTypeNone: Uncapped.
	ExtrusionFaceCapTypeNone ExtrusionFaceCapType = "none"
	// ExtrusionFaceCapTypeTop: Capped on top.
	ExtrusionFaceCapTypeTop ExtrusionFaceCapType = "top"
	// ExtrusionFaceCapTypeBottom: Capped below.
	ExtrusionFaceCapTypeBottom ExtrusionFaceCapType = "bottom"
)

type ExtrusionFaceInfo added in v0.2.33

type ExtrusionFaceInfo struct {
	// Cap: Whether or not this extrusion face is a top/bottom cap face or not. Note that top/bottom cap faces will not have associated curve IDs.
	Cap ExtrusionFaceCapType `json:"cap" yaml:"cap" schema:"cap,required"`
	// CurveID: Path component (curve) UUID.
	CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id"`
	// FaceID: Face uuid.
	FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id"`
}

ExtrusionFaceInfo: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)

type FaceGetGradient added in v0.2.33

type FaceGetGradient struct {
	// DfDu: dFdu
	DfDu Point3D `json:"df_du" yaml:"df_du" schema:"df_du,required"`
	// DfDv: dFdv
	DfDv Point3D `json:"df_dv" yaml:"df_dv" schema:"df_dv,required"`
	// Normal: Normal (||dFdu x dFdv||)
	Normal Point3D `json:"normal" yaml:"normal" schema:"normal,required"`
}

FaceGetGradient: The gradient (dFdu, dFdv) + normal vector on a brep face

type FaceGetPosition added in v0.2.33

type FaceGetPosition struct {
	// Pos: The 3D position on the surface that was evaluated
	Pos Point3D `json:"pos" yaml:"pos" schema:"pos,required"`
}

FaceGetPosition: The 3D position on the surface that was evaluated

type FaceIsPlanar added in v0.2.33

type FaceIsPlanar struct {
	// Origin: plane's origin
	Origin Point3D `json:"origin" yaml:"origin" schema:"origin"`
	// XAxis: plane's local x-axis
	XAxis Point3D `json:"x_axis" yaml:"x_axis" schema:"x_axis"`
	// YAxis: plane's local y-axis
	YAxis Point3D `json:"y_axis" yaml:"y_axis" schema:"y_axis"`
	// ZAxis: plane's local z-axis (normal)
	ZAxis Point3D `json:"z_axis" yaml:"z_axis" schema:"z_axis"`
}

FaceIsPlanar: Surface-local planar axes (if available)

type FailureWebSocketResponse added in v0.2.27

type FailureWebSocketResponse struct {
	// Errors: The errors that occurred.
	Errors []APIError `json:"errors" yaml:"errors" schema:"errors,required"`
	// RequestID: Which request this is a response to. If the request was a modeling command, this is the modeling command ID. If no request ID was sent, this will be null.
	RequestID UUID `json:"request_id" yaml:"request_id" schema:"request_id"`
	// Success: Always false
	Success bool `json:"success" yaml:"success" schema:"success,required"`
}

FailureWebSocketResponse: Unsuccessful Websocket response.

type FbxStorage added in v0.2.27

type FbxStorage string

FbxStorage: Describes the storage format of an FBX file.

const (
	// FbxStorageAscii: ASCII FBX encoding.
	FbxStorageAscii FbxStorage = "ascii"
	// FbxStorageBinary: Binary FBX encoding.
	FbxStorageBinary FbxStorage = "binary"
)

type FileCenterOfMass added in v0.2.8

type FileCenterOfMass struct {
	// CenterOfMass: The resulting center of mass.
	CenterOfMass Point3D `json:"center_of_mass" yaml:"center_of_mass" schema:"center_of_mass"`
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputUnit: The output unit for the center of mass.
	OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

FileCenterOfMass: A file center of mass result.

type FileConversion

type FileConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputFormat: The output format of the file conversion.
	OutputFormat FileExportFormat `json:"output_format" yaml:"output_format" schema:"output_format,required"`
	// OutputFormatOptions: The output format options of the file conversion.
	OutputFormatOptions any `json:"output_format_options" yaml:"output_format_options" schema:"output_format_options"`
	// Outputs: The converted files (if multiple file conversion), if completed, base64 encoded. The key of the map is the path of the output file.
	Outputs map[string]Base64 `json:"outputs" yaml:"outputs" schema:"outputs"`
	// SrcFormat: The source format of the file conversion.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// SrcFormatOptions: The source format options of the file conversion.
	SrcFormatOptions any `json:"src_format_options" yaml:"src_format_options" schema:"src_format_options"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

FileConversion: A file conversion.

type FileDensity added in v0.1.6

type FileDensity struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Density: The resulting density.
	Density float64 `json:"density" yaml:"density" schema:"density"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// MaterialMass: The material mass as denoted by the user.
	MaterialMass float64 `json:"material_mass" yaml:"material_mass" schema:"material_mass"`
	// 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"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

FileDensity: A file density result.

type FileExportFormat added in v0.2.8

type FileExportFormat string

FileExportFormat: The valid types of output file formats.

const (
	// FileExportFormatFbx: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX>
	FileExportFormatFbx FileExportFormat = "fbx"
	// FileExportFormatGlb: Binary glTF 2.0.
	//
	// This is a single binary with .glb extension.
	//
	// This is better if you want a compressed format as opposed to the human readable glTF that lacks compression.
	FileExportFormatGlb FileExportFormat = "glb"
	// FileExportFormatGltf: glTF 2.0. Embedded glTF 2.0 (pretty printed).
	//
	// Single JSON file with .gltf extension binary data encoded as base64 data URIs.
	//
	// The JSON contents are pretty printed.
	//
	// It is human readable, single file, and you can view the diff easily in a git commit.
	FileExportFormatGltf FileExportFormat = "gltf"
	// FileExportFormatObj: The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.
	FileExportFormatObj FileExportFormat = "obj"
	// FileExportFormatPly: The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)>
	FileExportFormatPly FileExportFormat = "ply"
	// FileExportFormatStep: The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>
	FileExportFormatStep FileExportFormat = "step"
	// FileExportFormatStl: The STL file format. <https://en.wikipedia.org/wiki/STL_(file_format)>
	FileExportFormatStl FileExportFormat = "stl"
)

type FileImportFormat added in v0.2.8

type FileImportFormat string

FileImportFormat: The valid types of source file formats.

const (
	// FileImportFormatFbx: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX>
	FileImportFormatFbx FileImportFormat = "fbx"
	// FileImportFormatGltf: glTF 2.0.
	FileImportFormatGltf FileImportFormat = "gltf"
	// FileImportFormatObj: The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.
	FileImportFormatObj FileImportFormat = "obj"
	// FileImportFormatPly: The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)>
	FileImportFormatPly FileImportFormat = "ply"
	// FileImportFormatSldprt: SolidWorks part (SLDPRT) format.
	FileImportFormatSldprt FileImportFormat = "sldprt"
	// FileImportFormatStep: The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>
	FileImportFormatStep FileImportFormat = "step"
	// FileImportFormatStl: The STL file format. <https://en.wikipedia.org/wiki/STL_(file_format)>
	FileImportFormatStl FileImportFormat = "stl"
)

type FileMass added in v0.1.4

type FileMass struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Mass: The resulting mass.
	Mass float64 `json:"mass" yaml:"mass" schema:"mass"`
	// MaterialDensity: The material density as denoted by the user.
	MaterialDensity float64 `json:"material_density" yaml:"material_density" schema:"material_density"`
	// 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"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

FileMass: A file mass result.

type FileService

type FileService service

FileService: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.

func (*FileService) CreateCenterOfMass added in v0.2.8

func (s *FileService) CreateCenterOfMass(outputUnit UnitLength, srcFormat FileImportFormat, body []byte) (*FileCenterOfMass, error)

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 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.

Parameters

  • `outputUnit`: The valid types of length units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
Example

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 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.

Parameters

  • `outputUnit`: The valid types of length units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.File.CreateCenterOfMass("", "", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*FileService) CreateConversion added in v0.0.9

func (s *FileService) CreateConversion(outputFormat FileExportFormat, srcFormat FileImportFormat, body []byte) (*FileConversion, error)

CreateConversion: Convert CAD file with defaults. If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. 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`
Example

CreateConversion: Convert CAD file with defaults. If you wish to specify the conversion options, use the `/file/conversion` endpoint instead. 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`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.File.CreateConversion("", "", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*FileService) CreateDensity added in v0.1.6

func (s *FileService) CreateDensity(materialMass float64, materialMassUnit UnitMas, outputUnit UnitDensity, srcFormat FileImportFormat, body []byte) (*FileDensity, error)

CreateDensity: Get CAD file density. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. 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 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`
  • `materialMassUnit`: The valid types of mass units.
  • `outputUnit`: The valid types for density units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
Example

CreateDensity: Get CAD file density. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale. This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit. 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 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`
  • `materialMassUnit`: The valid types of mass units.
  • `outputUnit`: The valid types for density units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.File.CreateDensity(123.45, "", "", "", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*FileService) CreateMass added in v0.1.4

func (s *FileService) CreateMass(materialDensity float64, materialDensityUnit UnitDensity, outputUnit UnitMas, srcFormat FileImportFormat, body []byte) (*FileMass, error)

CreateMass: Get CAD file 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 assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. 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 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`
  • `materialDensityUnit`: The valid types for density units.
  • `outputUnit`: The valid types of mass units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
Example

CreateMass: Get CAD file 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 assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density. 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 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`
  • `materialDensityUnit`: The valid types for density units.
  • `outputUnit`: The valid types of mass units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.File.CreateMass(123.45, "", "", "", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*FileService) CreateSurfaceArea added in v0.2.8

func (s *FileService) CreateSurfaceArea(outputUnit UnitArea, srcFormat FileImportFormat, body []byte) (*FileSurfaceArea, error)

CreateSurfaceArea: Get CAD file surface area. 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 square 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 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

  • `outputUnit`: The valid types of area units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
Example

CreateSurfaceArea: Get CAD file surface area. 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 square 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 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

  • `outputUnit`: The valid types of area units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.File.CreateSurfaceArea("", "", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*FileService) CreateVolume added in v0.1.4

func (s *FileService) CreateVolume(outputUnit UnitVolume, srcFormat FileImportFormat, body []byte) (*FileVolume, error)

CreateVolume: Get CAD file volume. 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 cubic 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 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

  • `outputUnit`: The valid types of volume units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
Example

CreateVolume: Get CAD file volume. 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 cubic 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 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

  • `outputUnit`: The valid types of volume units.
  • `srcFormat`: The valid types of source file formats.
  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.File.CreateVolume("", "", []byte("some-binary"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type FileSurfaceArea added in v0.2.8

type FileSurfaceArea struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputUnit: The output unit for the surface area.
	OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// SurfaceArea: The resulting surface area.
	SurfaceArea float64 `json:"surface_area" yaml:"surface_area" schema:"surface_area"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

FileSurfaceArea: A file surface area result.

type FileSystemMetadata added in v0.1.1

type FileSystemMetadata struct {
	// Ok: If the file system passed a sanity check.
	Ok bool `json:"ok" yaml:"ok" schema:"ok,required"`
}

FileSystemMetadata: Metadata about our file system. This is mostly used for internal purposes and debugging.

type FileVolume added in v0.1.4

type FileVolume struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// OutputUnit: The output unit for the volume.
	OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SrcFormat: The source format of the file.
	SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
	// Volume: The resulting volume.
	Volume float64 `json:"volume" yaml:"volume" schema:"volume"`
}

FileVolume: A file volume result.

type Gateway added in v0.1.1

type Gateway struct {
	// AuthTimeout: The auth timeout of the gateway.
	AuthTimeout int `json:"auth_timeout" yaml:"auth_timeout" schema:"auth_timeout"`
	// Host: The host of the gateway.
	Host string `json:"host" yaml:"host" schema:"host"`
	// Name: The name of the gateway.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Port: The port of the gateway.
	Port int `json:"port" yaml:"port" schema:"port"`
	// TlsTimeout: The TLS timeout for the gateway.
	TlsTimeout int `json:"tls_timeout" yaml:"tls_timeout" schema:"tls_timeout"`
}

Gateway: Gateway information.

type GetEntityType added in v0.2.27

type GetEntityType struct {
	// EntityType: The type of the entity.
	EntityType EntityType `json:"entity_type" yaml:"entity_type" schema:"entity_type,required"`
}

GetEntityType: The response from the `GetEntityType` command.

type GetNumObjects added in v0.2.33

type GetNumObjects struct {
	// NumObjects: The number of objects in the scene.
	NumObjects int `json:"num_objects" yaml:"num_objects" schema:"num_objects,required"`
}

GetNumObjects: The response from the `GetNumObjects` command.

type GetSketchModePlane added in v0.2.29

type GetSketchModePlane struct {
	// XAxis: The x axis.
	XAxis Point3D `json:"x_axis" yaml:"x_axis" schema:"x_axis,required"`
	// YAxis: The y axis.
	YAxis Point3D `json:"y_axis" yaml:"y_axis" schema:"y_axis,required"`
	// ZAxis: The z axis (normal).
	ZAxis Point3D `json:"z_axis" yaml:"z_axis" schema:"z_axis,required"`
}

GetSketchModePlane: The plane for sketch mode.

type GlobalAxi added in v0.2.29

type GlobalAxi string

GlobalAxi: The global axes.

const (
	// GlobalAxiX: The X axis
	GlobalAxiX GlobalAxi = "x"
	// GlobalAxiY: The Y axis
	GlobalAxiY GlobalAxi = "y"
	// GlobalAxiZ: The Z axis
	GlobalAxiZ GlobalAxi = "z"
)

type GltfPresentation added in v0.2.27

type GltfPresentation string

GltfPresentation: Describes the presentation style of the glTF JSON.

const (
	// GltfPresentationCompact: Condense the JSON into the smallest possible size.
	GltfPresentationCompact GltfPresentation = "compact"
	// GltfPresentationPretty: Expand the JSON into a more human readable format.
	//
	// This is the default setting.
	GltfPresentationPretty GltfPresentation = "pretty"
)

type GltfStorage added in v0.2.27

type GltfStorage string

GltfStorage: Describes the storage format of a glTF 2.0 scene.

const (
	// GltfStorageBinary: Binary glTF 2.0.
	//
	// This is a single binary with .glb extension.
	GltfStorageBinary GltfStorage = "binary"
	// GltfStorageStandard: Standard glTF 2.0.
	//
	// This is a JSON file with .gltf extension paired with a separate binary blob file with .bin extension.
	GltfStorageStandard GltfStorage = "standard"
	// GltfStorageEmbedded: Embedded glTF 2.0.
	//
	// Single JSON file with .gltf extension binary data encoded as base64 data URIs.
	//
	// This is the default setting.
	GltfStorageEmbedded GltfStorage = "embedded"
)

type HTTPError

type HTTPError struct {
	// URL is the URL that was being accessed when the error occurred.
	// It will always be populated.
	URL *url.URL
	// StatusCode is the HTTP response status code and will always be populated.
	StatusCode int
	// Message is the server response message and is only populated when
	// explicitly referenced by the JSON server response.
	Message string
	// Body is the raw response returned by the server.
	// It is often but not always JSON, depending on how the request fails.
	Body string
	// Header contains the response header fields from the server.
	Header http.Header
}

HTTPError is an error returned by a failed API call.

func (HTTPError) Error

func (err HTTPError) Error() string

Error converts the Error type to a readable string.

type HiddenService added in v0.1.4

type HiddenService service

HiddenService: Hidden API endpoints that should not show up in the docs.

func (*HiddenService) AuthEmail added in v0.2.4

AuthEmail: Create an email verification request for a user. Parameters

  • `body`: The body of the form for email authentication.
Example

AuthEmail: Create an email verification request for a user. Parameters

  • `body`: The body of the form for email authentication.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Hidden.AuthEmail(kittycad.EmailAuthenticationForm{CallbackUrl: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, Email: "example@example.com"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*HiddenService) AuthEmailCallback added in v0.2.4

func (s *HiddenService) AuthEmailCallback(callbackUrl URL, email string, token string) error

AuthEmailCallback: Listen for callbacks for email verification for users. Parameters

  • `callbackUrl`
  • `email`
  • `token`
Example

AuthEmailCallback: Listen for callbacks for email verification for users. Parameters

  • `callbackUrl`
  • `email`
  • `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Hidden.AuthEmailCallback(kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, "example@example.com", "some-string"); err != nil {
	panic(err)
}
Output:

func (*HiddenService) GetAuthSaml added in v0.2.33

func (s *HiddenService) GetAuthSaml(providerId UUID, callbackUrl URL) error

GetAuthSaml: Get a redirect straight to the SAML IdP. The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.

Parameters

  • `providerId`: A UUID usually v4 or v7
  • `callbackUrl`
Example

GetAuthSaml: Get a redirect straight to the SAML IdP. The UI uses this to avoid having to ask the API anything about the IdP. It already knows the SAML IdP ID from the path, so it can just link to this path and rely on the API to redirect to the actual IdP.

Parameters

  • `providerId`: A UUID usually v4 or v7
  • `callbackUrl`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Hidden.GetAuthSaml(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}); err != nil {
	panic(err)
}
Output:

func (*HiddenService) Logout added in v0.1.9

func (s *HiddenService) Logout() error

Logout: This endpoint removes the session cookie for a user. This is used in logout scenarios.

Example

Logout: This endpoint removes the session cookie for a user. This is used in logout scenarios.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Hidden.Logout(); err != nil {
	panic(err)
}
Output:

func (*HiddenService) PostAuthSaml added in v0.2.33

func (s *HiddenService) PostAuthSaml(providerId UUID, body []byte) error

PostAuthSaml: Authenticate a user via SAML Parameters

  • `providerId`: A UUID usually v4 or v7
  • `body`
Example

PostAuthSaml: Authenticate a user via SAML Parameters

  • `providerId`: A UUID usually v4 or v7
  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Hidden.PostAuthSaml(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), []byte("some-binary")); err != nil {
	panic(err)
}
Output:

type HighlightSetEntity added in v0.2.27

type HighlightSetEntity struct {
	// EntityID: The UUID of the entity that was highlighted.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"`
	// Sequence: If the client sent a sequence ID with its request, the backend sends it back.
	Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"`
}

HighlightSetEntity: The response from the `HighlightSetEntity` command.

type IP added in v0.2.4

type IP struct {
	*netaddr.IP
}

IP is a wrapper around ip.IP which marshals to and from empty strings.

func (IP) MarshalJSON added in v0.2.4

func (u IP) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (IP) String added in v0.2.4

func (u IP) String() string

func (*IP) UnmarshalJSON added in v0.2.4

func (u *IP) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

type IceServer added in v0.2.23

type IceServer struct {
	// Credential: Credentials for a given TURN server.
	Credential string `json:"credential" yaml:"credential" schema:"credential"`
	// Urls: URLs for a given STUN/TURN server. IceServer urls can either be a string or an array of strings But, we choose to always convert to an array of strings for consistency
	Urls []string `json:"urls" yaml:"urls" schema:"urls,required"`
	// Username: Username for a given TURN server.
	Username string `json:"username" yaml:"username" schema:"username"`
}

IceServer: Representation of an ICE server used for STUN/TURN Used to initiate WebRTC connections based on <https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer>

type IdpMetadataSourceIdpMetadataSourceUrl added in v0.2.33

type IdpMetadataSourceIdpMetadataSourceUrl struct {
	// Data: The base64 encoded XML document containing the identity provider metadata descriptor.
	Data Base64 `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

IdpMetadataSourceIdpMetadataSourceUrl: A base64 encoded XML document containing the identity provider metadata descriptor.

type IdpMetadataSourceUrl added in v0.2.33

type IdpMetadataSourceUrl struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Url: The URL of the identity provider metadata descriptor.
	Url URL `json:"url" yaml:"url" schema:"url,required"`
}

IdpMetadataSourceUrl: A URL to the identity provider metadata descriptor.

type ImageFormat added in v0.2.27

type ImageFormat string

ImageFormat: Enum containing the variety of image formats snapshots may be exported to.

const (
	// ImageFormatPng: .png format
	ImageFormatPng ImageFormat = "png"
	// ImageFormatJpeg: .jpeg format
	ImageFormatJpeg ImageFormat = "jpeg"
)

type ImportFile added in v0.2.28

type ImportFile struct {
	// Data: The raw bytes of the file
	Data []int `json:"data" yaml:"data" schema:"data,required"`
	// Path: The file's full path, including file extension.
	Path string `json:"path" yaml:"path" schema:"path,required"`
}

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 ImportFiles added in v0.2.28

type ImportFiles struct {
	// ObjectID: ID of the imported 3D models within the scene.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
}

ImportFiles: Data from importing the files

type ImportedGeometry added in v0.2.33

type ImportedGeometry struct {
	// ID: ID of the imported 3D models within the scene.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Value: The original file paths that held the geometry.
	Value []string `json:"value" yaml:"value" schema:"value,required"`
}

ImportedGeometry: Data from importing the files

type InputFormatCoords added in v0.2.27

type InputFormatCoords struct {
	// Coords: Co-ordinate system of input data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
	Coords System `json:"coords" yaml:"coords" schema:"coords,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Units: The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc.
	//
	// Defaults to meters.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

InputFormatCoords: Wavefront OBJ format.

type InputFormatFbx added in v0.2.27

type InputFormatFbx struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormatFbx: Autodesk Filmbox (FBX) format.

type InputFormatGltf added in v0.2.18

type InputFormatGltf struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormatGltf: Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).

type InputFormatInputFormatCoords added in v0.2.27

type InputFormatInputFormatCoords struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormatInputFormatCoords: ISO 10303-21 (STEP) format.

type InputFormatObj added in v0.2.19

type InputFormatObj struct {
	// Coords: Co-ordinate system of input data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
	Coords System `json:"coords" yaml:"coords" schema:"coords,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Units: The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

InputFormatObj: The PLY Polygon File Format.

type InputFormatPly added in v0.2.27

type InputFormatPly struct {
	// Coords: Co-ordinate system of input data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
	Coords System `json:"coords" yaml:"coords" schema:"coords,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Units: The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

InputFormatPly: *ST**ereo**L**ithography format.

type InputFormatUnits added in v0.2.22

type InputFormatUnits struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormatUnits: SolidWorks part (SLDPRT) format.

type Invoice added in v0.1.4

type Invoice struct {
	// AmountDue: Final amount due at this time for this invoice.
	//
	// If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
	AmountDue float64 `json:"amount_due" yaml:"amount_due" schema:"amount_due"`
	// AmountPaid: The amount, in USD, that was paid.
	AmountPaid float64 `json:"amount_paid" yaml:"amount_paid" schema:"amount_paid"`
	// AmountRemaining: The amount remaining, in USD, that is due.
	AmountRemaining float64 `json:"amount_remaining" yaml:"amount_remaining" schema:"amount_remaining"`
	// AttemptCount: Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.
	//
	// Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
	AttemptCount int `json:"attempt_count" yaml:"attempt_count" schema:"attempt_count"`
	// Attempted: Whether an attempt has been made to pay the invoice.
	//
	// An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
	Attempted bool `json:"attempted" yaml:"attempted" schema:"attempted"`
	// CreatedAt: Time at which the object was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Currency: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
	Currency string `json:"currency" yaml:"currency" schema:"currency"`
	// CustomerEmail: The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.
	CustomerEmail string `json:"customer_email" yaml:"customer_email" schema:"customer_email"`
	// CustomerID: Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.
	CustomerID string `json:"customer_id" yaml:"customer_id" schema:"customer_id"`
	// DefaultPaymentMethod: Default payment method.
	DefaultPaymentMethod string `json:"default_payment_method" yaml:"default_payment_method" schema:"default_payment_method"`
	// Description: Description of the invoice.
	Description string `json:"description" yaml:"description" schema:"description"`
	// Discounts: The discounts applied to the invoice. This is an array of discount objects.
	Discounts []Discount `json:"discounts" yaml:"discounts" schema:"discounts"`
	// ID: Unique identifier for the object.
	ID string `json:"id" yaml:"id" schema:"id"`
	// Lines: The individual line items that make up the invoice.
	//
	// `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
	Lines []InvoiceLineItem `json:"lines" yaml:"lines" schema:"lines"`
	// Metadata: Set of key-value pairs.
	Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
	// Number: A unique, identifying string that appears on emails sent to the customer for this invoice.
	Number string `json:"number" yaml:"number" schema:"number"`
	// Paid: Whether payment was successfully collected for this invoice.
	//
	// An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.
	Paid bool `json:"paid" yaml:"paid" schema:"paid"`
	// Pdf: The link to download the PDF for the invoice.
	Pdf URL `json:"pdf" yaml:"pdf" schema:"pdf"`
	// ReceiptNumber: This is the transaction number that appears on email receipts sent for this invoice.
	ReceiptNumber string `json:"receipt_number" yaml:"receipt_number" schema:"receipt_number"`
	// StatementDescriptor: Extra information about an invoice for the customer's credit card statement.
	StatementDescriptor string `json:"statement_descriptor" yaml:"statement_descriptor" schema:"statement_descriptor"`
	// Status: The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.
	Status InvoiceStatus `json:"status" yaml:"status" schema:"status"`
	// Subtotal: Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied.
	//
	// Item discounts are already incorporated.
	Subtotal float64 `json:"subtotal" yaml:"subtotal" schema:"subtotal"`
	// Tax: The amount of tax on this invoice.
	//
	// This is the sum of all the tax amounts on this invoice.
	Tax float64 `json:"tax" yaml:"tax" schema:"tax"`
	// Total: Total after discounts and taxes.
	Total float64 `json:"total" yaml:"total" schema:"total"`
	// Url: The URL for the hosted invoice page, which allows customers to view and pay an invoice.
	Url URL `json:"url" yaml:"url" schema:"url"`
}

Invoice: An invoice.

type InvoiceLineItem added in v0.1.4

type InvoiceLineItem struct {
	// Amount: The amount, in USD.
	Amount float64 `json:"amount" yaml:"amount" schema:"amount"`
	// Currency: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
	Currency string `json:"currency" yaml:"currency" schema:"currency"`
	// Description: The description.
	Description string `json:"description" yaml:"description" schema:"description"`
	// ID: Unique identifier for the object.
	ID string `json:"id" yaml:"id" schema:"id"`
	// InvoiceItem: The ID of the invoice item associated with this line item if any.
	InvoiceItem string `json:"invoice_item" yaml:"invoice_item" schema:"invoice_item"`
	// Metadata: Set of key-value pairs.
	Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
}

InvoiceLineItem: An invoice line item.

type InvoiceStatus added in v0.1.4

type InvoiceStatus string

InvoiceStatus: An enum representing the possible values of an `Invoice`'s `status` field.

const (
	// InvoiceStatusDraft: Draft.
	InvoiceStatusDraft InvoiceStatus = "draft"
	// InvoiceStatusOpen: Open.
	InvoiceStatusOpen InvoiceStatus = "open"
	// InvoiceStatusPaid: Paid.
	InvoiceStatusPaid InvoiceStatus = "paid"
	// InvoiceStatusUncollectible: Uncollectible.
	InvoiceStatusUncollectible InvoiceStatus = "uncollectible"
	// InvoiceStatusVoid: Void.
	InvoiceStatusVoid InvoiceStatus = "void"
)

type IpAddrInfo added in v0.2.33

type IpAddrInfo struct {
	// Asn: Autonomous System Number.
	Asn int `json:"asn" yaml:"asn" schema:"asn"`
	// City: City name.
	City string `json:"city" yaml:"city" schema:"city"`
	// ContinentCode: Continent code (e.g., "EU" for Europe).
	ContinentCode string `json:"continent_code" yaml:"continent_code" schema:"continent_code"`
	// Country: Country name.
	Country string `json:"country" yaml:"country" schema:"country"`
	// CountryCode: Two-letter country code (e.g., "NL" for Netherlands).
	CountryCode string `json:"country_code" yaml:"country_code" schema:"country_code"`
	// CountryCode3: Three-letter country code (e.g., "NLD" for Netherlands).
	CountryCode3 string `json:"country_code3" yaml:"country_code3" schema:"country_code3"`
	// Ip: IP address of the user.
	Ip IP `json:"ip" yaml:"ip" schema:"ip"`
	// IsInEuropeanUnion: Flag indicating whether the country is in the European Union.
	IsInEuropeanUnion bool `json:"is_in_european_union" yaml:"is_in_european_union" schema:"is_in_european_union"`
	// Latitude: Geographic latitude.
	Latitude float64 `json:"latitude" yaml:"latitude" schema:"latitude"`
	// Longitude: Geographic longitude.
	Longitude float64 `json:"longitude" yaml:"longitude" schema:"longitude"`
	// Offset: Time offset in seconds from UTC.
	Offset int `json:"offset" yaml:"offset" schema:"offset"`
	// Organization: Organization name (e.g., "RIPE NCC").
	Organization string `json:"organization" yaml:"organization" schema:"organization"`
	// PostalCode: Postal code.
	PostalCode string `json:"postal_code" yaml:"postal_code" schema:"postal_code"`
	// Region: Name of the region (e.g., "North Holland").
	Region string `json:"region" yaml:"region" schema:"region"`
	// RegionCode: Region code (e.g., "NH" for North Holland).
	RegionCode string `json:"region_code" yaml:"region_code" schema:"region_code"`
	// Timezone: Timezone (e.g., "Europe/Amsterdam").
	Timezone string `json:"timezone" yaml:"timezone" schema:"timezone"`
}

IpAddrInfo: Information about an ip address. Represents geographical and network-related information.

type Jetstream added in v0.1.1

type Jetstream struct {
	// Config: The Jetstream config.
	Config JetstreamConfig `json:"config" yaml:"config" schema:"config"`
	// Meta: Meta information about the cluster.
	Meta MetaClusterInfo `json:"meta" yaml:"meta" schema:"meta"`
	// Stats: Jetstream statistics.
	Stats JetstreamStats `json:"stats" yaml:"stats" schema:"stats"`
}

Jetstream: Jetstream information.

type JetstreamAPIStats added in v0.1.1

type JetstreamAPIStats struct {
	// Errors: The number of errors.
	Errors int `json:"errors" yaml:"errors" schema:"errors"`
	// Inflight: The number of inflight requests.
	Inflight int `json:"inflight" yaml:"inflight" schema:"inflight"`
	// Total: The number of requests.
	Total int `json:"total" yaml:"total" schema:"total"`
}

JetstreamAPIStats: Jetstream API statistics.

type JetstreamConfig added in v0.1.1

type JetstreamConfig struct {
	// Domain: The domain.
	Domain string `json:"domain" yaml:"domain" schema:"domain"`
	// MaxMemory: The max memory.
	MaxMemory int `json:"max_memory" yaml:"max_memory" schema:"max_memory"`
	// MaxStorage: The max storage.
	MaxStorage int `json:"max_storage" yaml:"max_storage" schema:"max_storage"`
	// StoreDir: The store directory.
	StoreDir string `json:"store_dir" yaml:"store_dir" schema:"store_dir"`
}

JetstreamConfig: Jetstream configuration.

type JetstreamStats added in v0.1.1

type JetstreamStats struct {
	// Accounts: The number of accounts.
	Accounts int `json:"accounts" yaml:"accounts" schema:"accounts"`
	// API: API stats.
	API JetstreamAPIStats `json:"api" yaml:"api" schema:"api"`
	// HaAssets: The number of HA assets.
	HaAssets int `json:"ha_assets" yaml:"ha_assets" schema:"ha_assets"`
	// Memory: The memory used by the Jetstream server.
	Memory int `json:"memory" yaml:"memory" schema:"memory"`
	// ReservedMemory: The reserved memory for the Jetstream server.
	ReservedMemory int `json:"reserved_memory" yaml:"reserved_memory" schema:"reserved_memory"`
	// ReservedStore: The reserved storage for the Jetstream server.
	ReservedStore int `json:"reserved_store" yaml:"reserved_store" schema:"reserved_store"`
	// Store: The storage used by the Jetstream server.
	Store int `json:"store" yaml:"store" schema:"store"`
}

JetstreamStats: Jetstream statistics.

type KclCodeCompletionParams added in v0.2.33

type KclCodeCompletionParams struct {
	// Language: The language of the code.
	Language string `json:"language" yaml:"language" schema:"language"`
	// NextIndent: The next indent of the code.
	NextIndent int `json:"next_indent" yaml:"next_indent" schema:"next_indent"`
	// PromptTokens: The prompt tokens for the completions.
	PromptTokens int `json:"prompt_tokens" yaml:"prompt_tokens" schema:"prompt_tokens"`
	// SuffixTokens: The suffix tokens for the completions.
	SuffixTokens int `json:"suffix_tokens" yaml:"suffix_tokens" schema:"suffix_tokens"`
	// TrimByIndentation: If we should trim by indentation.
	TrimByIndentation bool `json:"trim_by_indentation" yaml:"trim_by_indentation" schema:"trim_by_indentation"`
}

KclCodeCompletionParams: Extra params for the completions.

type KclCodeCompletionRequest added in v0.2.33

type KclCodeCompletionRequest struct {
	// Extra: Extra parameters for the completions.
	Extra KclCodeCompletionParams `json:"extra" yaml:"extra" schema:"extra"`
	// MaxTokens: The maximum number of tokens that can be generated for the completions. The total length of input tokens and generated tokens is limited by the model’s context length.
	MaxTokens int `json:"max_tokens" yaml:"max_tokens" schema:"max_tokens"`
	// N: How many completion choices to generate for each input message.
	N int `json:"n" yaml:"n" schema:"n"`
	// Nwo: For GitHub copilot this is the `{org}/{repo}`. This does not do anything yet. But we wanted the same API as GitHub Copilot. It might be used in the future.
	Nwo string `json:"nwo" yaml:"nwo" schema:"nwo"`
	// Prompt: The prompt for the model.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt"`
	// Stop: Up to 4 sequences where the API will stop generating further tokens.
	Stop []string `json:"stop" yaml:"stop" schema:"stop"`
	// Stream: If set, partial message deltas will be sent, like in ChatGPT or OpenAPI. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message.
	Stream bool `json:"stream" yaml:"stream" schema:"stream"`
	// Suffix: The suffix for the model.
	Suffix string `json:"suffix" yaml:"suffix" schema:"suffix"`
	// Temperature: The temperature for the model.
	Temperature float64 `json:"temperature" yaml:"temperature" schema:"temperature"`
	// TopP: The top p for the model.
	TopP float64 `json:"top_p" yaml:"top_p" schema:"top_p"`
}

KclCodeCompletionRequest: A request to generate KCL code completions.

type KclCodeCompletionResponse added in v0.2.33

type KclCodeCompletionResponse struct {
	// Completions: The completions.
	Completions []string `json:"completions" yaml:"completions" schema:"completions,required"`
}

KclCodeCompletionResponse: A response with KCL code completions.

type LeafNode added in v0.1.1

type LeafNode struct {
	// AuthTimeout: The auth timeout of the leaf node.
	AuthTimeout int `json:"auth_timeout" yaml:"auth_timeout" schema:"auth_timeout"`
	// Host: The host of the leaf node.
	Host string `json:"host" yaml:"host" schema:"host"`
	// Port: The port of the leaf node.
	Port int `json:"port" yaml:"port" schema:"port"`
	// TlsTimeout: The TLS timeout for the leaf node.
	TlsTimeout int `json:"tls_timeout" yaml:"tls_timeout" schema:"tls_timeout"`
}

LeafNode: Leaf node information.

type Mass added in v0.2.28

type Mass struct {
	// Mass: The mass.
	Mass float64 `json:"mass" yaml:"mass" schema:"mass,required"`
	// OutputUnit: The output unit for the mass.
	OutputUnit UnitMas `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
}

Mass: The mass response.

type MetaClusterInfo added in v0.1.1

type MetaClusterInfo struct {
	// ClusterSize: The size of the cluster.
	ClusterSize int `json:"cluster_size" yaml:"cluster_size" schema:"cluster_size"`
	// Leader: The leader of the cluster.
	Leader string `json:"leader" yaml:"leader" schema:"leader"`
	// Name: The name of the cluster.
	Name string `json:"name" yaml:"name" schema:"name"`
}

MetaClusterInfo: Jetstream statistics.

type MetaService

type MetaService service

MetaService: Meta information about the API.

func (*MetaService) CreateDebugUploads added in v0.2.33

func (s *MetaService) CreateDebugUploads(body *bytes.Buffer) (*[]URL, error)

CreateDebugUploads: Uploads files to public blob storage for debugging purposes. Do NOT send files here that you don't want to be public.

Parameters

  • `body`
Example

CreateDebugUploads: Uploads files to public blob storage for debugging purposes. Do NOT send files here that you don't want to be public.

Parameters

  • `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

buf := new(bytes.Buffer)

result, err := client.Meta.CreateDebugUploads(buf)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*MetaService) CreateEvent added in v0.2.33

func (s *MetaService) CreateEvent(body *bytes.Buffer) error

CreateEvent: Creates an internal telemetry event. We collect anonymous telemetry data for improving our product.

Parameters

  • `body`: Telemetry data we are collecting
Example

CreateEvent: Creates an internal telemetry event. We collect anonymous telemetry data for improving our product.

Parameters

  • `body`: Telemetry data we are collecting
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

buf := new(bytes.Buffer)

if err := client.Meta.CreateEvent(buf); err != nil {
	panic(err)
}
Output:

func (*MetaService) GetIpinfo added in v0.2.33

func (s *MetaService) GetIpinfo() (*IpAddrInfo, error)

GetIpinfo: Get ip address information.

Example

GetIpinfo: Get ip address information.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Meta.GetIpinfo()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*MetaService) GetPricingSubscriptions added in v0.2.33

func (s *MetaService) GetPricingSubscriptions() (*map[string][]ZooProductSubscription, error)

GetPricingSubscriptions: Get the pricing for our subscriptions. This is the ultimate source of truth for the pricing of our subscriptions.

Example

GetPricingSubscriptions: Get the pricing for our subscriptions. This is the ultimate source of truth for the pricing of our subscriptions.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Meta.GetPricingSubscriptions()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*MetaService) GetSchema added in v0.0.9

func (s *MetaService) GetSchema() error

GetSchema: Get OpenAPI schema.

Example

GetSchema: Get OpenAPI schema.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Meta.GetSchema(); err != nil {
	panic(err)
}
Output:

func (*MetaService) Getdata added in v0.1.1

func (s *MetaService) Getdata() (*Metadata, 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 Zoo employee to perform this request.

Example

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 Zoo employee to perform this request.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Meta.Getdata()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*MetaService) InternalGetAPITokenForDiscordUser added in v0.2.29

func (s *MetaService) InternalGetAPITokenForDiscordUser(discordId string) (*APIToken, error)

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`
Example

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`
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)
Output:

func (*MetaService) Ping

func (s *MetaService) Ping() (*Pong, error)

Ping: Return pong.

Example

Ping: Return pong.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Meta.Ping()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type Metadata added in v0.1.1

type Metadata struct {
	// Cache: Metadata about our cache.
	Cache CacheMetadata `json:"cache" yaml:"cache" schema:"cache,required"`
	// Environment: The environment we are running in.
	Environment Environment `json:"environment" yaml:"environment" schema:"environment,required"`
	// Fs: Metadata about our file system.
	Fs FileSystemMetadata `json:"fs" yaml:"fs" schema:"fs,required"`
	// GitHash: The git hash of the server.
	GitHash string `json:"git_hash" yaml:"git_hash" schema:"git_hash,required"`
	// Pubsub: Metadata about our pub-sub connection.
	Pubsub Connection `json:"pubsub" yaml:"pubsub" schema:"pubsub,required"`
}

Metadata: Metadata about our currently running server. This is mostly used for internal purposes and debugging.

type Method added in v0.0.9

type Method string

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.

const (
	// MethodOptions: The `OPTIONS` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.2.1).
	MethodOptions Method = "OPTIONS"
	// MethodGet: The `GET` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).
	MethodGet Method = "GET"
	// MethodPost: The `POST` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).
	MethodPost Method = "POST"
	// MethodPut: The `PUT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.1).
	MethodPut Method = "PUT"
	// MethodDelete: The `DELETE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.5).
	MethodDelete Method = "DELETE"
	// MethodHead: The `HEAD` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.2).
	MethodHead Method = "HEAD"
	// MethodTrace: The `TRACE` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3).
	MethodTrace Method = "TRACE"
	// MethodConnect: The `CONNECT` method as defined in [RFC 7231](https://tools.ietf.org/html/rfc7231#section-4.3.6).
	MethodConnect Method = "CONNECT"
	// MethodPatch: The `PATCH` method as defined in [RFC 5789](https://tools.ietf.org/html/rfc5789).
	MethodPatch Method = "PATCH"
	// MethodExtension: A catch all.
	MethodExtension Method = "EXTENSION"
)

type ModelingAppEventType added in v0.2.33

type ModelingAppEventType string

ModelingAppEventType: Type for modeling-app events

const (
	// ModelingAppEventTypeSuccessfulCompileBeforeClose: This event is sent before the modeling app or project is closed. The attachment should contain the contents of the most recent successful compile.
	ModelingAppEventTypeSuccessfulCompileBeforeClose ModelingAppEventType = "successful_compile_before_close"
)

type ModelingAppIndividualSubscriptionTier added in v0.2.33

type ModelingAppIndividualSubscriptionTier string

ModelingAppIndividualSubscriptionTier: The subscription tiers we offer for the Modeling App to individuals.

const (
	// ModelingAppIndividualSubscriptionTierFree: The free tier.
	ModelingAppIndividualSubscriptionTierFree ModelingAppIndividualSubscriptionTier = "free"
	// ModelingAppIndividualSubscriptionTierPro: The pro tier.
	ModelingAppIndividualSubscriptionTierPro ModelingAppIndividualSubscriptionTier = "pro"
)

type ModelingAppOrganizationSubscriptionTier added in v0.2.33

type ModelingAppOrganizationSubscriptionTier string

ModelingAppOrganizationSubscriptionTier: The subscription tiers we offer for the Modeling App to organizations.

const (
	// ModelingAppOrganizationSubscriptionTierTeam: The team tier.
	ModelingAppOrganizationSubscriptionTierTeam ModelingAppOrganizationSubscriptionTier = "team"
	// ModelingAppOrganizationSubscriptionTierEnterprise: The enterprise tier.
	ModelingAppOrganizationSubscriptionTierEnterprise ModelingAppOrganizationSubscriptionTier = "enterprise"
)

type ModelingAppSubscriptionTier added in v0.2.33

type ModelingAppSubscriptionTier struct {
	// Description: A description of the tier.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// Features: Features that are included in the subscription.
	Features []SubscriptionTierFeature `json:"features" yaml:"features" schema:"features"`
	// Name: The name of the tier.
	Name ModelingAppSubscriptionTierName `json:"name" yaml:"name" schema:"name,required"`
	// PayAsYouGoCredits: The amount of pay-as-you-go credits the individual or org gets outside the modeling app.
	PayAsYouGoCredits float64 `json:"pay_as_you_go_credits" yaml:"pay_as_you_go_credits" schema:"pay_as_you_go_credits,required"`
	// Price: The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD.
	Price any `json:"price" yaml:"price" schema:"price,required"`
	// SupportTier: The support tier the subscription provides.
	SupportTier SupportTier `json:"support_tier" yaml:"support_tier" schema:"support_tier,required"`
	// TrainingDataBehavior: The behavior of the users data (can it be used for training, etc).
	TrainingDataBehavior SubscriptionTrainingDataBehavior `json:"training_data_behavior" yaml:"training_data_behavior" schema:"training_data_behavior,required"`
	// Type: If the tier is offered for an individual or an org.
	Type any `json:"type" yaml:"type" schema:"type,required"`
	// ZooToolsIncluded: The Zoo tools that you can call unlimited times with this tier.
	ZooToolsIncluded []ZooTool `json:"zoo_tools_included" yaml:"zoo_tools_included" schema:"zoo_tools_included"`
}

ModelingAppSubscriptionTier: A subscription tier we offer for the Modeling App.

type ModelingAppSubscriptionTierName added in v0.2.33

type ModelingAppSubscriptionTierName string

ModelingAppSubscriptionTierName: An enum representing a Modeling App subscription tier name.

const (
	// ModelingAppSubscriptionTierNameFree: The free tier.
	ModelingAppSubscriptionTierNameFree ModelingAppSubscriptionTierName = "free"
	// ModelingAppSubscriptionTierNamePro: The pro tier.
	ModelingAppSubscriptionTierNamePro ModelingAppSubscriptionTierName = "pro"
	// ModelingAppSubscriptionTierNameTeam: The team tier.
	ModelingAppSubscriptionTierNameTeam ModelingAppSubscriptionTierName = "team"
	// ModelingAppSubscriptionTierNameEnterprise: The enterprise tier.
	ModelingAppSubscriptionTierNameEnterprise ModelingAppSubscriptionTierName = "enterprise"
)

type ModelingCmdAngle added in v0.2.33

type ModelingCmdAngle struct {
	// Center: What the camera is looking at. Center of the camera's field of vision
	Center Point3D `json:"center" yaml:"center" schema:"center,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"`
	// Up: Which way is "up", from the camera's point of view.
	Up Point3D `json:"up" yaml:"up" schema:"up,required"`
	// Vantage: Where the camera is positioned
	Vantage Point3D `json:"vantage" yaml:"vantage" schema:"vantage,required"`
}

ModelingCmdAngle: Change what the default camera is looking at.

type ModelingCmdAnimated added in v0.2.22

type ModelingCmdAnimated 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"`
}

ModelingCmdAnimated: Fade entity in or out.

type ModelingCmdArcDegrees added in v0.2.33

type ModelingCmdArcDegrees struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Unit: Which units the scene uses.
	Unit UnitLength `json:"unit" yaml:"unit" schema:"unit,required"`
}

ModelingCmdArcDegrees: Set the units of the scene. For all following commands, the units will be interpreted as the given units.

type ModelingCmdAxis added in v0.2.33

type ModelingCmdAxis struct {
	// Center: What the camera is looking at. Center of the camera's field of vision
	Center Point3D `json:"center" yaml:"center" schema:"center,required"`
	// FovY: The field of view angle in the y direction, in degrees.
	FovY float64 `json:"fov_y" yaml:"fov_y" schema:"fov_y,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"`
	// Up: Which way is "up", from the camera's point of view.
	Up Point3D `json:"up" yaml:"up" schema:"up,required"`
	// Vantage: Where the camera is positioned
	Vantage Point3D `json:"vantage" yaml:"vantage" schema:"vantage,required"`
	// ZFar: The distance to the far clipping plane.
	ZFar float64 `json:"z_far" yaml:"z_far" schema:"z_far,required"`
	// ZNear: The distance to the near clipping plane.
	ZNear float64 `json:"z_near" yaml:"z_near" schema:"z_near,required"`
}

ModelingCmdAxis: Change what the default camera is looking at.

type ModelingCmdAxisIs2D added in v0.2.33

type ModelingCmdAxisIs2D struct {
	// Magnitude: Move the camera forward along the vector it's looking at, by this magnitudedefaultCameraZoom. Basically, how much should the camera move forward by.
	Magnitude float64 `json:"magnitude" yaml:"magnitude" schema:"magnitude,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdAxisIs2D: Adjust zoom of the default camera.

type ModelingCmdCameraDragEnd added in v0.2.18

type ModelingCmdCameraDragEnd 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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdCameraDragEnd: Create a new annotation

type ModelingCmdCameraDragMove added in v0.2.18

type ModelingCmdCameraDragMove 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: Replaces current selection with these entities (by UUID).

type ModelingCmdCameraDragStart added in v0.2.18

type ModelingCmdCameraDragStart 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"`
}

ModelingCmdCameraDragStart: Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected.

type ModelingCmdCap added in v0.2.22

type ModelingCmdCap struct {
	// Interaction: The type of camera drag interaction.
	Interaction CameraDragInteractionType `json:"interaction" yaml:"interaction" schema:"interaction,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Window: The initial mouse position.
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdCap: Camera drag started.

type ModelingCmdCenter added in v0.2.22

type ModelingCmdCenter 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"`
}

ModelingCmdCenter: Bring an object to the front of the scene

type ModelingCmdChildIndex added in v0.2.27

type ModelingCmdChildIndex 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"`
}

ModelingCmdChildIndex: Get control points of the given curve.

type ModelingCmdClosePath added in v0.2.18

type ModelingCmdClosePath struct {
	// CylinderID: ID of the cylinder.
	CylinderID UUID `json:"cylinder_id" yaml:"cylinder_id" schema:"cylinder_id,required"`
	// IsClockwise: Is the helix rotation clockwise?
	IsClockwise bool `json:"is_clockwise" yaml:"is_clockwise" schema:"is_clockwise,required"`
	// Length: Length of the helix.
	Length float64 `json:"length" yaml:"length" schema:"length,required"`
	// Revolutions: Number of revolutions.
	Revolutions float64 `json:"revolutions" yaml:"revolutions" schema:"revolutions,required"`
	// StartAngle: Start angle (in degrees).
	StartAngle Angle `json:"start_angle" yaml:"start_angle" schema:"start_angle,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdClosePath: Create a helix using the input cylinder and other specified parameters.

type ModelingCmdCylinderID added in v0.2.33

type ModelingCmdCylinderID struct {
	// SelectionType: What type of selection should occur when you select something?
	SelectionType SceneSelectionType `json:"selection_type" yaml:"selection_type" schema:"selection_type,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdCylinderID: When you select some entity with the current tool, what should happen to the entity?

type ModelingCmdDefaultCameraDisableSketchMode added in v0.2.22

type ModelingCmdDefaultCameraDisableSketchMode struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdDefaultCameraDisableSketchMode: Disable sketch mode. If you are sketching on a face, be sure to not disable sketch mode until you have extruded. Otherwise, your object will not be fused with the face.

type ModelingCmdDefaultCameraEnableSketchMode added in v0.2.19

type ModelingCmdDefaultCameraEnableSketchMode 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"`
}

ModelingCmdDefaultCameraEnableSketchMode: Send a mouse move event

type ModelingCmdDefaultCameraGetSettings added in v0.2.33

type ModelingCmdDefaultCameraGetSettings 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"`
}

ModelingCmdDefaultCameraGetSettings: Hide or show an object

type ModelingCmdDefaultCameraLookAt added in v0.2.19

type ModelingCmdDefaultCameraLookAt 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"`
}

ModelingCmdDefaultCameraLookAt: What type of entity is this?

type ModelingCmdDefaultCameraPerspectiveSettings added in v0.2.33

type ModelingCmdDefaultCameraPerspectiveSettings 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"`
}

ModelingCmdDefaultCameraPerspectiveSettings: Gets the previous adjacent edge for the given edge, along the given face.

type ModelingCmdDefaultCameraZoom added in v0.2.27

type ModelingCmdDefaultCameraZoom struct {
	// 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"`
}

ModelingCmdDefaultCameraZoom: Set opacity of the entity.

type ModelingCmdDistance added in v0.2.22

type ModelingCmdDistance struct {
	// Interaction: The type of camera drag interaction.
	Interaction CameraDragInteractionType `json:"interaction" yaml:"interaction" schema:"interaction,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"`
	// Window: The current mouse position.
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdDistance: Camera drag continued.

type ModelingCmdDistanceToPlane added in v0.2.22

type ModelingCmdDistanceToPlane 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.
	Hide bool `json:"hide" yaml:"hide" schema:"hide"`
	// Origin: Origin of the plane
	Origin Point3D `json:"origin" yaml:"origin" schema:"origin,required"`
	// Size: What should the plane's span/extent? When rendered visually, this is both the width and height along X and Y axis respectively.
	Size float64 `json:"size" yaml:"size" schema:"size,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// XAxis: What should the plane's X axis be?
	XAxis Point3D `json:"x_axis" yaml:"x_axis" schema:"x_axis,required"`
	// YAxis: What should the plane's Y axis be?
	YAxis Point3D `json:"y_axis" yaml:"y_axis" schema:"y_axis,required"`
}

ModelingCmdDistanceToPlane: Make a new plane

type ModelingCmdDistanceType added in v0.2.33

type ModelingCmdDistanceType 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"`
}

ModelingCmdDistanceType: Obtain vertex ids for a path

type ModelingCmdEdgeID added in v0.2.33

type ModelingCmdEdgeID 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"`
}

ModelingCmdEdgeID: What is the UUID of this entity's n-th child?

type ModelingCmdEditModeEnter added in v0.2.27

type ModelingCmdEditModeEnter struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEditModeEnter: Find all IDs of selected entities

type ModelingCmdEntityCircularPattern added in v0.2.33

type ModelingCmdEntityCircularPattern struct {
	// 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"`
}

ModelingCmdEntityCircularPattern: Focus the default camera upon an object in the scene.

type ModelingCmdEntityGetAllChildUuids added in v0.2.27

type ModelingCmdEntityGetAllChildUuids 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"`
}

ModelingCmdEntityGetAllChildUuids: Obtain curve ids for vertex ids

type ModelingCmdEntityGetChildUuid added in v0.2.27

type ModelingCmdEntityGetChildUuid 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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityGetChildUuid: Add a gizmo showing the axes.

type ModelingCmdEntityGetDistance added in v0.2.33

type ModelingCmdEntityGetDistance struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Window: The mouse position.
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdEntityGetDistance: Stop dragging the mouse.

type ModelingCmdEntityGetNumChildren added in v0.2.27

type ModelingCmdEntityGetNumChildren 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: Get type of the given curve.

type ModelingCmdEntityGetParentID added in v0.2.27

type ModelingCmdEntityGetParentID struct {
	// Color: The color to set the tool line to.
	Color Color `json:"color" yaml:"color" schema:"color"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityGetParentID: Set the properties of the tool lines for the scene.

type ModelingCmdEntityID added in v0.2.27

type ModelingCmdEntityID struct {
	// Color: The color to set the background to.
	Color Color `json:"color" yaml:"color" schema:"color,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityID: Set the background color of the scene.

type ModelingCmdEntityId1 added in v0.2.33

type ModelingCmdEntityId1 struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Window: The mouse position.
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdEntityId1: Start dragging the mouse.

type ModelingCmdEntityId2 added in v0.2.33

type ModelingCmdEntityId2 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"`
}

ModelingCmdEntityId2: Continue dragging the mouse.

type ModelingCmdEntityIds added in v0.2.27

type ModelingCmdEntityIds struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityIds: Get the plane for sketch mode.

type ModelingCmdEntityLinearPattern added in v0.2.33

type ModelingCmdEntityLinearPattern struct {
	// Files: Files to import.
	Files []ImportFile `json:"files" yaml:"files" schema:"files,required"`
	// Format: Input file format.
	Format any `json:"format" yaml:"format" schema:"format,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityLinearPattern: Import files to the current model.

type ModelingCmdEntityMakeHelix added in v0.2.33

type ModelingCmdEntityMakeHelix struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityMakeHelix: Exit edit mode

type ModelingCmdExport added in v0.2.19

type ModelingCmdExport struct {
	// AdjustCamera: Should the camera move at all?
	AdjustCamera bool `json:"adjust_camera" yaml:"adjust_camera" schema:"adjust_camera,required"`
	// 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"`
}

ModelingCmdExport: Sketch on some entity (e.g. a plane, a face).

type ModelingCmdExtendPath added in v0.2.18

type ModelingCmdExtendPath struct {
	// PathID: Which path to close.
	PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdExtendPath: Closes a path, converting it to a 2D solid.

type ModelingCmdExtrude added in v0.2.16

type ModelingCmdExtrude struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdExtrude: Gets the default camera's camera settings

type ModelingCmdFormat added in v0.2.27

type ModelingCmdFormat 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"`
}

ModelingCmdFormat: Get the plane for sketch mode.

type ModelingCmdFovY added in v0.2.33

type ModelingCmdFovY 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"`
}

ModelingCmdFovY: Gets the edge opposite the given edge, along the given face.

type ModelingCmdInteraction added in v0.2.27

type ModelingCmdInteraction struct {
	// Target: The edit target
	Target UUID `json:"target" yaml:"target" schema:"target,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdInteraction: Enter edit mode

type ModelingCmdIsClockwise added in v0.2.33

type ModelingCmdIsClockwise struct {
	// Filter: If vector is empty, clear all filters. If vector is non-empty, only the given entity types will be selectable.
	Filter []EntityType `json:"filter" yaml:"filter" schema:"filter,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdIsClockwise: What kind of entities can be selected?

type ModelingCmdLength added in v0.2.33

type ModelingCmdLength struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdLength: Use orthographic projection.

type ModelingCmdMagnitude added in v0.2.27

type ModelingCmdMagnitude 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"`
}

ModelingCmdMagnitude: Send object to front or back.

type ModelingCmdModelingCmdAngle added in v0.2.33

type ModelingCmdModelingCmdAngle 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"`
}

ModelingCmdModelingCmdAngle: How many children does the entity have?

type ModelingCmdModelingCmdAxis added in v0.2.33

type ModelingCmdModelingCmdAxis 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 []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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdAxis: Get the mass of entities in the scene or the default scene.

type ModelingCmdModelingCmdCenter added in v0.2.33

type ModelingCmdModelingCmdCenter 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 []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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdCenter: Get the density of entities in the scene or the default scene.

type ModelingCmdModelingCmdEntityID added in v0.2.27

type ModelingCmdModelingCmdEntityID 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 []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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdEntityID: Get the volume of entities in the scene or the default scene.

type ModelingCmdModelingCmdInteraction added in v0.2.27

type ModelingCmdModelingCmdInteraction struct {
	// Entities: Highlight these entities.
	Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdInteraction: Changes the current highlighted entity to these entities.

type ModelingCmdModelingCmdNumRepetitions added in v0.2.33

type ModelingCmdModelingCmdNumRepetitions 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 []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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdNumRepetitions: Get the center of mass of entities in the scene or the default scene.

type ModelingCmdModelingCmdOrigin added in v0.2.33

type ModelingCmdModelingCmdOrigin struct {
	// Color: What color it should be.
	Color Color `json:"color" yaml:"color" schema:"color,required"`
	// PlaneID: Which plane is being changed.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdOrigin: Set the color of a plane.

type ModelingCmdModelingCmdPath added in v0.2.27

type ModelingCmdModelingCmdPath struct {
	// Angle: The signed angle of revolution (in degrees, must be <= 360 in either direction)
	Angle Angle `json:"angle" yaml:"angle" schema:"angle,required"`
	// Axis: The axis of the extrusion (taken from the origin)
	Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
	// AxisIs2D: If true, the axis is interpreted within the 2D space of the solid 2D's plane
	AxisIs2D bool `json:"axis_is_2d" yaml:"axis_is_2d" schema:"axis_is_2d,required"`
	// Origin: The origin of the extrusion axis
	Origin Point3D `json:"origin" yaml:"origin" schema:"origin,required"`
	// Target: Which sketch to revolve. Must be a closed 2D solid.
	Target UUID `json:"target" yaml:"target" schema:"target,required"`
	// Tolerance: The maximum acceptable surface gap computed between the revolution surface joints. Must be positive (i.e. greater than zero).
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdPath: Command for revolving a solid 2d.

type ModelingCmdModelingCmdSequence added in v0.2.29

type ModelingCmdModelingCmdSequence 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"`
}

ModelingCmdModelingCmdSequence: Gets the next adjacent edge for the given edge, along the given face.

type ModelingCmdModelingCmdTarget added in v0.2.27

type ModelingCmdModelingCmdTarget struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdTarget: Clear the selection

type ModelingCmdModelingCmdTolerance added in v0.2.33

type ModelingCmdModelingCmdTolerance 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"`
}

ModelingCmdModelingCmdTolerance: What is the distance between these two entities?

type ModelingCmdModelingCmdUp added in v0.2.33

type ModelingCmdModelingCmdUp struct {
	// EdgeID: Which edge you want to fillet.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// ObjectID: Which object is being filletted.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Radius: The radius of the fillet. Measured in length (using the same units that the current sketch uses). Must be positive (i.e. greater than zero).
	Radius float64 `json:"radius" yaml:"radius" schema:"radius,required"`
	// Tolerance: The maximum acceptable surface gap computed between the filleted surfaces. Must be positive (i.e. greater than zero).
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdUp: Fillets the given edge with the specified radius.

type ModelingCmdModelingCmdVantage added in v0.2.33

type ModelingCmdModelingCmdVantage struct {
	// ObjectID: Which face 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"`
}

ModelingCmdModelingCmdVantage: Determines whether a brep face is planar and returns its surface-local planar axes if so

type ModelingCmdModelingCmdWindow added in v0.2.27

type ModelingCmdModelingCmdWindow 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.
	Options AnnotationOptions `json:"options" yaml:"options" schema:"options,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdWindow: Update an annotation

type ModelingCmdMovePathPen added in v0.2.18

type ModelingCmdMovePathPen struct {
	// Cap: Whether to cap the extrusion with a face, or not. If true, the resulting solid will be closed on all sides, like a dice. If false, it will be open on one side, like a drinking glass.
	Cap bool `json:"cap" yaml:"cap" schema:"cap,required"`
	// Distance: How far off the plane to extrude
	Distance float64 `json:"distance" yaml:"distance" schema:"distance,required"`
	// Target: Which sketch to extrude. Must be a closed 2D solid.
	Target UUID `json:"target" yaml:"target" schema:"target,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdMovePathPen: Command for extruding a solid 2d.

type ModelingCmdNumRepetitions added in v0.2.33

type ModelingCmdNumRepetitions struct {
	// CurveID: ID of the curve being queried.
	CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdNumRepetitions: Find the start and end of a curve.

type ModelingCmdOrigin added in v0.2.22

type ModelingCmdOrigin struct {
	// Animated: Should we animate or snap for the camera transition?
	Animated bool `json:"animated" yaml:"animated" schema:"animated,required"`
	// DistanceToPlane: How far to the sketching plane?
	DistanceToPlane float64 `json:"distance_to_plane" yaml:"distance_to_plane" schema:"distance_to_plane,required"`
	// Origin: What's the origin of the sketching plane?
	Origin Point3D `json:"origin" yaml:"origin" schema:"origin,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"`
	// XAxis: Which 3D axis of the scene should be the X axis of the sketching plane?
	XAxis Point3D `json:"x_axis" yaml:"x_axis" schema:"x_axis,required"`
	// YAxis: Which 3D axis of the scene should be the Y axis of the sketching plane?
	YAxis Point3D `json:"y_axis" yaml:"y_axis" schema:"y_axis,required"`
}

ModelingCmdOrigin: Enable sketch mode, where users can sketch 2D geometry. Users choose a plane to sketch on.

type ModelingCmdOrtho added in v0.2.22

type ModelingCmdOrtho 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"`
}

ModelingCmdOrtho: Set the current tool.

type ModelingCmdPath added in v0.2.27

type ModelingCmdPath struct {
	// Path: The ID of the command which created the path.
	Path UUID `json:"path" yaml:"path" schema:"path,required"`
	// To: Where the path's pen should be.
	To Point3D `json:"to" yaml:"to" schema:"to,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdPath: Move the path's "pen".

type ModelingCmdPathID added in v0.2.22

type ModelingCmdPathID struct {
	// ArcDegrees: Arc angle (in degrees) to place repetitions along.
	ArcDegrees float64 `json:"arc_degrees" yaml:"arc_degrees" schema:"arc_degrees,required"`
	// Axis: Axis around which to make the copies. For Solid2d patterns, this is ignored.
	Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
	// Center: Point around which to make the copies. For Solid2d patterns, the z component is ignored.
	Center Point3D `json:"center" yaml:"center" schema:"center,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"`
	// RotateDuplicates: Whether or not to rotate the objects as they are copied.
	RotateDuplicates bool `json:"rotate_duplicates" yaml:"rotate_duplicates" schema:"rotate_duplicates,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdPathID: Create a circular pattern using this entity.

type ModelingCmdReq added in v0.2.16

type ModelingCmdReq struct {
	// Cmd: Which command to submit to the Kittycad engine.
	Cmd any `json:"cmd" yaml:"cmd" schema:"cmd,required"`
	// CmdID: ID of command being submitted.
	CmdID UUID `json:"cmd_id" yaml:"cmd_id" schema:"cmd_id,required"`
}

ModelingCmdReq: A graphics command submitted to the KittyCAD engine via the Modeling API.

type ModelingCmdRevolutions added in v0.2.33

type ModelingCmdRevolutions struct {
	// Parameters: If this is not given, use the same parameters as last time the perspective camera was used.
	Parameters PerspectiveCameraParameters `json:"parameters" yaml:"parameters" schema:"parameters"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdRevolutions: Use perspective projection.

type ModelingCmdRevolve added in v0.2.33

type ModelingCmdRevolve 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"`
}

ModelingCmdRevolve: What is this entity's parent?

type ModelingCmdRevolveAboutEdge added in v0.2.33

type ModelingCmdRevolveAboutEdge struct {
	// Axis: Axis along which to make the copies. For Solid2d patterns, the z component is ignored.
	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"`
}

ModelingCmdRevolveAboutEdge: Create a linear pattern using this entity.

type ModelingCmdRotateDuplicates added in v0.2.33

type ModelingCmdRotateDuplicates 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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdRotateDuplicates: Get the surface area of entities in the scene or the default scene.

type ModelingCmdSegment added in v0.2.22

type ModelingCmdSegment struct {
	// Angle: The signed angle of revolution (in degrees, must be <= 360 in either direction)
	Angle Angle `json:"angle" yaml:"angle" schema:"angle,required"`
	// EdgeID: The edge to use as the axis of revolution, must be linear and lie in the plane of the solid
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// Target: Which sketch to revolve. Must be a closed 2D solid.
	Target UUID `json:"target" yaml:"target" schema:"target,required"`
	// Tolerance: The maximum acceptable surface gap computed between the revolution surface joints. Must be positive (i.e. greater than zero).
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdSegment: Command for revolving a solid 2d about a brep edge

type ModelingCmdSelectedAtWindow added in v0.2.27

type ModelingCmdSelectedAtWindow struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdSelectedAtWindow: Get the number of objects in the scene

type ModelingCmdSequence added in v0.2.22

type ModelingCmdSequence struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdSequence: Removes all of the Objects in the scene

type ModelingCmdSpacing added in v0.2.33

type ModelingCmdSpacing struct {
	// 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"`
}

ModelingCmdSpacing: Reconfigure the stream.

type ModelingCmdStartAngle added in v0.2.33

type ModelingCmdStartAngle struct {
	// EdgeID: Any edge that lies on the extrusion base path.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// ObjectID: The Solid3d object whose extrusion 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"`
}

ModelingCmdStartAngle: Get a concise description of all of an extrusion's faces.

type ModelingCmdStartPath added in v0.2.22

type ModelingCmdStartPath struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdStartPath: Start a new path.

type ModelingCmdTarget added in v0.2.22

type ModelingCmdTarget struct {
	// Interaction: The type of camera drag interaction.
	Interaction CameraDragInteractionType `json:"interaction" yaml:"interaction" schema:"interaction,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Window: The final mouse position.
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdTarget: Camera drag ended

type ModelingCmdTo added in v0.2.22

type ModelingCmdTo struct {
	// Path: The ID of the command which created the path.
	Path UUID `json:"path" yaml:"path" schema:"path,required"`
	// Segment: Segment to append to the path. This segment will implicitly begin at the current "pen" location.
	Segment any `json:"segment" yaml:"segment" schema:"segment,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTo: Extend a path by adding a new segment which starts at the path's "pen". If no "pen" location has been set before (via `MovePen`), then the pen is at the origin.

type ModelingCmdTolerance added in v0.2.33

type ModelingCmdTolerance 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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTolerance: Export the scene to a file.

type ModelingCmdUp added in v0.2.22

type ModelingCmdUp struct {
	// 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"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdUp: Gets all faces which use the given edge.

type ModelingCmdVantage added in v0.2.22

type ModelingCmdVantage 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.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdVantage: Add a hole to a Solid2d object before extruding it.

type ModelingCmdWindow added in v0.2.27

type ModelingCmdWindow 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"`
}

ModelingCmdWindow: Adds one or more entities (by UUID) to the selection.

type ModelingCmdXaxis added in v0.2.27

type ModelingCmdXaxis struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Window: Where the mouse is
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdXaxis: Send a mouse click event Updates modified/selected entities.

type ModelingCmdYaxis added in v0.2.27

type ModelingCmdYaxis 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"`
}

ModelingCmdYaxis: Enable sketch mode on the given plane. If you want to sketch on a face, use `enable_sketch_mode` instead.

type ModelingCmdZfar added in v0.2.33

type ModelingCmdZfar struct {
	// ObjectID: Which face 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"`
	// Uv: The 2D paramter-space u,v position to evaluate the surface at
	Uv Point2D `json:"uv" yaml:"uv" schema:"uv,required"`
}

ModelingCmdZfar: Determines a position on a brep face evaluated by parameters u,v

type ModelingCmdZnear added in v0.2.33

type ModelingCmdZnear struct {
	// ObjectID: Which face 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"`
	// Uv: The 2D paramter-space u,v position to evaluate the surface at
	Uv Point2D `json:"uv" yaml:"uv" schema:"uv,required"`
}

ModelingCmdZnear: Determines the gradient (dFdu, dFdv) + normal vector on a brep face evaluated by parameters u,v

type ModelingService added in v0.2.16

type ModelingService service

ModelingService: Modeling API for updating your 3D files using the Zoo engine.

func (*ModelingService) CommandsWs added in v0.2.16

func (s *ModelingService) CommandsWs(fps int, pool string, postEffect PostEffectType, unlockedFramerate bool, videoResHeight int, videoResWidth int, webrtc bool, body any) (*websocket.Conn, error)

CommandsWs: Open a websocket which accepts modeling commands. Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.

Parameters

  • `fps`
  • `pool`
  • `postEffect`: Post effect type
  • `unlockedFramerate`
  • `videoResHeight`
  • `videoResWidth`
  • `webrtc`
  • `body`: The websocket messages the server receives.
Example

CommandsWs: Open a websocket which accepts modeling commands. Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.

Parameters

  • `fps`
  • `pool`
  • `postEffect`: Post effect type
  • `unlockedFramerate`
  • `videoResHeight`
  • `videoResWidth`
  • `webrtc`
  • `body`: The websocket messages the server receives.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

// Create the websocket connection.
ws, err := client.Modeling.CommandsWs(123, "some-string", kittycad.PostEffectTypePhosphor, true, 123, 123, true, "")
if err != nil {
	panic(err)
}

defer ws.Close()

done := make(chan struct{})

go func() {
	defer close(done)
	for {
		_, message, err := ws.ReadMessage()
		if err != nil {
			log.Println("read:", err)
			return
		}
		log.Printf("recv: %s", message)
	}
}()

ticker := time.NewTicker(time.Second)
defer ticker.Stop()

interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt)

for {
	select {
	case <-done:
		return
	case t := <-ticker.C:
		err := ws.WriteMessage(websocket.TextMessage, []byte(t.String()))
		if err != nil {
			log.Println("write:", err)
			return
		}
	case <-interrupt:
		log.Println("interrupt")

		// Cleanly close the connection by sending a close message and then
		// waiting (with timeout) for the server to close the connection.
		err := ws.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
		if err != nil {
			log.Println("write close:", err)
			return
		}
		select {
		case <-done:
		case <-time.After(time.Second):
		}
		return
	}
}
Output:

type MouseClick added in v0.2.27

type MouseClick struct {
	// EntitiesModified: Entities that are modified.
	EntitiesModified []UUID `json:"entities_modified" yaml:"entities_modified" schema:"entities_modified,required"`
	// EntitiesSelected: Entities that are selected.
	EntitiesSelected []UUID `json:"entities_selected" yaml:"entities_selected" schema:"entities_selected,required"`
}

MouseClick: The response from the `MouseClick` command.

type Oauth2ClientInfo added in v0.2.19

type Oauth2ClientInfo struct {
	// CsrfToken: Value used for [CSRF](https://tools.ietf.org/html/rfc6749#section-10.12) protection via the `state` parameter.
	CsrfToken string `json:"csrf_token" yaml:"csrf_token" schema:"csrf_token"`
	// PkceCodeVerifier: Code Verifier used for [PKCE]((https://tools.ietf.org/html/rfc7636)) protection via the `code_verifier` parameter. The value must have a minimum length of 43 characters and a maximum length of 128 characters.  Each character must be ASCII alphanumeric or one of the characters "-" / "." / "_" / "~".
	PkceCodeVerifier string `json:"pkce_code_verifier" yaml:"pkce_code_verifier" schema:"pkce_code_verifier"`
	// Url: The URL for consent.
	Url string `json:"url" yaml:"url" schema:"url"`
}

Oauth2ClientInfo: Information about an OAuth 2.0 client.

type Oauth2GrantType added in v0.2.19

type Oauth2GrantType string

Oauth2GrantType: An OAuth 2.0 Grant Type. These are documented here: <https://oauth.net/2/grant-types/>.

const (
	// Oauth2GrantTypeUrnietfparamsoauthgrantTypedeviceCode: An OAuth 2.0 Device Authorization Grant.
	Oauth2GrantTypeUrnietfparamsoauthgrantTypedeviceCode Oauth2GrantType = "urn:ietf:params:oauth:grant-type:device_code"
)

type Oauth2Service added in v0.1.9

type Oauth2Service service

Oauth2Service: Endpoints that implement OAuth 2.0 grant flows.

func (*Oauth2Service) DeviceAccessToken added in v0.2.4

func (s *Oauth2Service) DeviceAccessToken(body DeviceAccessTokenRequestForm) 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.
Example

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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Oauth2.DeviceAccessToken(kittycad.DeviceAccessTokenRequestForm{ClientID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), DeviceCode: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), GrantType: ""}); err != nil {
	panic(err)
}
Output:

func (*Oauth2Service) DeviceAuthConfirm added in v0.2.4

func (s *Oauth2Service) DeviceAuthConfirm(body DeviceAuthVerifyParams) 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.
Example

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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Oauth2.DeviceAuthConfirm(kittycad.DeviceAuthVerifyParams{UserCode: "some-string"}); err != nil {
	panic(err)
}
Output:

func (*Oauth2Service) DeviceAuthRequest added in v0.2.4

func (s *Oauth2Service) DeviceAuthRequest(body DeviceAuthRequestForm) 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.
Example

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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Oauth2.DeviceAuthRequest(kittycad.DeviceAuthRequestForm{ClientID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")}); err != nil {
	panic(err)
}
Output:

func (*Oauth2Service) DeviceAuthVerify added in v0.2.4

func (s *Oauth2Service) DeviceAuthVerify(userCode string) error

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`
Example

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`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Oauth2.DeviceAuthVerify("some-string"); err != nil {
	panic(err)
}
Output:

func (*Oauth2Service) ProviderCallback added in v0.2.4

func (s *Oauth2Service) ProviderCallback(provider AccountProvider, code string, idToken string, state string, user string) error

ProviderCallback: Listen for callbacks for the OAuth 2.0 provider. Parameters

  • `provider`: An account provider.
  • `code`
  • `idToken`
  • `state`
  • `user`
Example

ProviderCallback: Listen for callbacks for the OAuth 2.0 provider. Parameters

  • `provider`: An account provider.
  • `code`
  • `idToken`
  • `state`
  • `user`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Oauth2.ProviderCallback("", "some-string", "some-string", "some-string", "some-string"); err != nil {
	panic(err)
}
Output:

func (*Oauth2Service) ProviderCallbackCreate added in v0.2.33

func (s *Oauth2Service) ProviderCallbackCreate(provider AccountProvider, body AuthCallback) error

ProviderCallbackCreate: Listen for callbacks for the OAuth 2.0 provider. This specific endpoint listens for posts of form data.

Parameters

  • `provider`: An account provider.
  • `body`: The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating.
Example

ProviderCallbackCreate: Listen for callbacks for the OAuth 2.0 provider. This specific endpoint listens for posts of form data.

Parameters

  • `provider`: An account provider.
  • `body`: The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Oauth2.ProviderCallbackCreate("", kittycad.AuthCallback{Code: "some-string", IdToken: "some-string", State: "some-string", User: "some-string"}); err != nil {
	panic(err)
}
Output:

func (*Oauth2Service) ProviderConsent added in v0.2.4

func (s *Oauth2Service) ProviderConsent(provider AccountProvider, callbackUrl string) (*Oauth2ClientInfo, error)

ProviderConsent: Get the consent URL and other information for the OAuth 2.0 provider. Parameters

  • `provider`: An account provider.
  • `callbackUrl`
Example

ProviderConsent: Get the consent URL and other information for the OAuth 2.0 provider. Parameters

  • `provider`: An account provider.
  • `callbackUrl`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Oauth2.ProviderConsent("", "some-string")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type OkModelingCmdResponseCameraDragEnd added in v0.2.33

type OkModelingCmdResponseCameraDragEnd struct {
	// 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"`
}

OkModelingCmdResponseCameraDragEnd: The response to the 'Solid3dGetNextAdjacentEdge' endpoint

type OkModelingCmdResponseCameraDragMove added in v0.2.33

type OkModelingCmdResponseCameraDragMove struct {
	// Data: The response from the `Solid3dGetAllOppositeEdges` command.
	Data Solid3DGetAllOppositeEdges `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseCameraDragMove: The response to the 'Solid3dGetAllOppositeEdges' endpoint

type OkModelingCmdResponseCurveGetControlPoints added in v0.2.33

type OkModelingCmdResponseCurveGetControlPoints 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"`
}

OkModelingCmdResponseCurveGetControlPoints: The response to the 'EntityGetDistance' endpoint

type OkModelingCmdResponseCurveGetType added in v0.2.33

type OkModelingCmdResponseCurveGetType struct {
	// Data: The response from the `EntityCircularPattern` command.
	Data EntityCircularPattern `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseCurveGetType: The response to the 'EntityCircularPattern' endpoint

type OkModelingCmdResponseData added in v0.2.27

type OkModelingCmdResponseData struct {
	// Data: The response from the `Export` endpoint.
	Data Export `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseData: The response to the 'Export' endpoint

type OkModelingCmdResponseDefaultCameraFocusOn added in v0.2.33

type OkModelingCmdResponseDefaultCameraFocusOn struct {
	// Data: Info about a path segment
	Data PathSegmentInfo `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseDefaultCameraFocusOn: The response to the 'PathSegmentInfo' endpoint

type OkModelingCmdResponseDefaultCameraGetSettings added in v0.2.33

type OkModelingCmdResponseDefaultCameraGetSettings struct {
	// Data: The response from the `GetEntityType` command.
	Data GetEntityType `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseDefaultCameraGetSettings: The response to the 'GetEntityType' endpoint

type OkModelingCmdResponseDefaultCameraZoom added in v0.2.33

type OkModelingCmdResponseDefaultCameraZoom struct {
	// 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"`
}

OkModelingCmdResponseDefaultCameraZoom: The response to the 'CurveGetType' endpoint

type OkModelingCmdResponseEmpty added in v0.2.22

type OkModelingCmdResponseEmpty struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEmpty: An empty response, used for any command that does not explicitly have a response defined here.

type OkModelingCmdResponseEntityGetAllChildUuids added in v0.2.27

type OkModelingCmdResponseEntityGetAllChildUuids struct {
	// Data: The response from the `SelectGet` command.
	Data SelectGet `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEntityGetAllChildUuids: The response to the 'SelectGet' endpoint

type OkModelingCmdResponseEntityGetChildUuid added in v0.2.22

type OkModelingCmdResponseEntityGetChildUuid struct {
	// Data: The response from the `CameraDragMove` command. Note this is an "unreliable" channel message, so this data may need more data like a "sequence"
	Data CameraDragMove `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEntityGetChildUuid: The response to the 'CameraDragMove' endpoint

type OkModelingCmdResponseEntityGetNumChildren added in v0.2.22

type OkModelingCmdResponseEntityGetNumChildren struct {
	// Data: The response from the `DefaultCameraGetSettings` command.
	Data DefaultCameraGetSettings `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEntityGetNumChildren: The response to the 'DefaultCameraGetSettings' endpoint

type OkModelingCmdResponseEntityGetParentID added in v0.2.22

type OkModelingCmdResponseEntityGetParentID struct {
	// Data: The response from the `GetNumObjects` command.
	Data GetNumObjects `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEntityGetParentID: The response to the 'GetNumObjects' endpoint

type OkModelingCmdResponseExport added in v0.2.22

type OkModelingCmdResponseExport struct {
	// Data: The response from the `SelectWithPoint` command.
	Data SelectWithPoint `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseExport: The response to the 'SelectWithPoint' endpoint

type OkModelingCmdResponseGetEntityType added in v0.2.27

type OkModelingCmdResponseGetEntityType struct {
	// Data: The center of mass response.
	Data CenterOfMass `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseGetEntityType: The response to the 'CenterOfMass' endpoint

type OkModelingCmdResponseGetNumObjects added in v0.2.33

type OkModelingCmdResponseGetNumObjects 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"`
}

OkModelingCmdResponseGetNumObjects: The response to the 'TakeSnapshot' endpoint

type OkModelingCmdResponseHighlightSetEntity added in v0.2.22

type OkModelingCmdResponseHighlightSetEntity struct {
	// Data: The response from the `EntityGetParentId` command.
	Data EntityGetParentID `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseHighlightSetEntity: The response to the 'EntityGetParentId' endpoint

type OkModelingCmdResponseMouseClick added in v0.2.33

type OkModelingCmdResponseMouseClick struct {
	// Data: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
	Data ExtrusionFaceInfo `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseMouseClick: The response to the 'ExtrusionFaceInfo' endpoint

type OkModelingCmdResponseOkModelingCmdResponseData added in v0.2.27

type OkModelingCmdResponseOkModelingCmdResponseData struct {
	// Data: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
	Data Solid3DGetExtrusionFaceInfo `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseOkModelingCmdResponseData: The response to the 'Solid3dGetExtrusionFaceInfo' endpoint

type OkModelingCmdResponseSelectGet added in v0.2.27

type OkModelingCmdResponseSelectGet struct {
	// Data: The response from the `PathGetVertexUuids` command.
	Data PathGetVertexUuids `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseSelectGet: The response to the 'PathGetVertexUuids' endpoint

type OkModelingCmdResponseSelectWithPoint added in v0.2.22

type OkModelingCmdResponseSelectWithPoint struct {
	// Data: The response from the `EntityGetChildUuid` command.
	Data EntityGetChildUuid `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseSelectWithPoint: The response to the 'EntityGetChildUuid' endpoint

type OkModelingCmdResponseSolid3DgetAllEdgeFaces added in v0.2.28

type OkModelingCmdResponseSolid3DgetAllEdgeFaces struct {
	// Data: Surface-local planar axes (if available)
	Data FaceIsPlanar `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseSolid3DgetAllEdgeFaces: The response to the 'FaceIsPlanar' endpoint

type OkModelingCmdResponseSolid3DgetAllOppositeEdges added in v0.2.28

type OkModelingCmdResponseSolid3DgetAllOppositeEdges struct {
	// Data: The gradient (dFdu, dFdv) + normal vector on a brep face
	Data FaceGetGradient `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseSolid3DgetAllOppositeEdges: The response to the 'FaceGetGradient' endpoint

type OkModelingCmdResponseSolid3DgetNextAdjacentEdge added in v0.2.28

type OkModelingCmdResponseSolid3DgetNextAdjacentEdge struct {
	// Data: The mass response.
	Data Mass `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseSolid3DgetNextAdjacentEdge: The response to the 'Mass' endpoint

type OkModelingCmdResponseSolid3DgetOppositeEdge added in v0.2.28

type OkModelingCmdResponseSolid3DgetOppositeEdge struct {
	// 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"`
}

OkModelingCmdResponseSolid3DgetOppositeEdge: The response to the 'ImportFiles' endpoint

type OkModelingCmdResponseSolid3DgetPrevAdjacentEdge added in v0.2.28

type OkModelingCmdResponseSolid3DgetPrevAdjacentEdge struct {
	// Data: The density response.
	Data Density `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseSolid3DgetPrevAdjacentEdge: The response to the 'Density' endpoint

type OkWebSocketResponseDataData added in v0.2.27

type OkWebSocketResponseDataData struct {
	// Data:
	Data Data `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkWebSocketResponseDataData: Information about the ICE servers.

type OkWebSocketResponseDataIceServerInfo added in v0.2.27

type OkWebSocketResponseDataIceServerInfo struct {
	// Data:
	Data Data `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkWebSocketResponseDataIceServerInfo: The trickle ICE candidate response.

type OkWebSocketResponseDataOkWebSocketResponseDataData added in v0.2.27

type OkWebSocketResponseDataOkWebSocketResponseDataData struct {
	// Data:
	Data Data `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkWebSocketResponseDataOkWebSocketResponseDataData: Pong response to a Ping message.

type OkWebSocketResponseDataSdpAnswer added in v0.2.28

type OkWebSocketResponseDataSdpAnswer struct {
	// Data:
	Data Data `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkWebSocketResponseDataSdpAnswer: Request a collection of metrics, to include WebRTC.

type OkWebSocketResponseDataTrickleIce added in v0.2.27

type OkWebSocketResponseDataTrickleIce struct {
	// Data:
	Data Data `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkWebSocketResponseDataTrickleIce: The modeling command response.

type Onboarding added in v0.2.8

type Onboarding struct {
	// FirstCallFromModelingAppDate: When the user first used the modeling app.
	FirstCallFromModelingAppDate Time `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 Time `json:"first_call_from_text_to_cad_date" yaml:"first_call_from_text_to_cad_date" schema:"first_call_from_text_to_cad_date"`
	// FirstTokenDate: When the user created their first token.
	FirstTokenDate Time `json:"first_token_date" yaml:"first_token_date" schema:"first_token_date"`
}

Onboarding: Onboarding details

type Org added in v0.2.32

type Org struct {
	// AllowUsersInDomainToAutoJoin: If we should allow all future users who are created with email addresses from this domain to join the org.
	AllowUsersInDomainToAutoJoin bool `` /* 127-byte string literal not displayed */
	// BillingEmail: The billing email address of the org.
	BillingEmail string `json:"billing_email" yaml:"billing_email" schema:"billing_email"`
	// BillingEmailVerified: The date and time the billing email address was verified.
	BillingEmailVerified Time `json:"billing_email_verified" yaml:"billing_email_verified" schema:"billing_email_verified"`
	// Block: If the org should be blocked and the reason why.
	Block BlockReason `json:"block" yaml:"block" schema:"block"`
	// CanTrainOnData: If we can train on the orgs's data. This value overrides any individual user's `can_train_on_data` value if they are a member of the org.
	CanTrainOnData bool `json:"can_train_on_data" yaml:"can_train_on_data" schema:"can_train_on_data"`
	// CreatedAt: The date and time the org was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Domain: The org's domain.
	Domain string `json:"domain" yaml:"domain" schema:"domain"`
	// ID: The unique identifier for the org.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Image: The image for the org. This is a URL.
	Image URL `json:"image" yaml:"image" schema:"image"`
	// Name: The name of the org.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The org's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
	// StripeID: The org's stripe id.
	StripeID string `json:"stripe_id" yaml:"stripe_id" schema:"stripe_id"`
	// UpdatedAt: The date and time the org was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

Org: An organization.

type OrgDetails added in v0.2.32

type OrgDetails struct {
	// AllowUsersInDomainToAutoJoin: If we should allow all future users who are created with email addresses from this domain to join the org.
	AllowUsersInDomainToAutoJoin bool `` /* 127-byte string literal not displayed */
	// BillingEmail: The billing email address of the org.
	BillingEmail string `json:"billing_email" yaml:"billing_email" schema:"billing_email"`
	// Domain: The org's domain.
	Domain string `json:"domain" yaml:"domain" schema:"domain"`
	// Image: The image for the org. This is a URL.
	Image URL `json:"image" yaml:"image" schema:"image"`
	// Name: The name of the org.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The org's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
}

OrgDetails: The user-modifiable parts of an organization.

type OrgMember added in v0.2.32

type OrgMember struct {
	// Company: The user's company.
	Company string `json:"company" yaml:"company" schema:"company"`
	// CreatedAt: The date and time the user was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Discord: The user's Discord handle.
	Discord string `json:"discord" yaml:"discord" schema:"discord"`
	// Email: The email address of the user.
	Email string `json:"email" yaml:"email" schema:"email"`
	// EmailVerified: The date and time the email address was verified.
	EmailVerified Time `json:"email_verified" yaml:"email_verified" schema:"email_verified"`
	// FirstName: The user's first name.
	FirstName string `json:"first_name" yaml:"first_name" schema:"first_name"`
	// Github: The user's GitHub handle.
	Github string `json:"github" yaml:"github" schema:"github"`
	// ID: The unique identifier for the user.
	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.
	LastName string `json:"last_name" yaml:"last_name" schema:"last_name"`
	// Name: The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The user's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
	// Role: The user's role in the org.
	Role OrgRole `json:"role" yaml:"role" schema:"role,required"`
	// UpdatedAt: The date and time the user was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

OrgMember: A member of an organization.

type OrgMemberResultsPage added in v0.2.32

type OrgMemberResultsPage struct {
	// Items: list of items on this page of results
	Items []OrgMember `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"`
}

OrgMemberResultsPage: A single page of results

type OrgResultsPage added in v0.2.33

type OrgResultsPage struct {
	// Items: list of items on this page of results
	Items []Org `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"`
}

OrgResultsPage: A single page of results

type OrgRole added in v0.2.32

type OrgRole string

OrgRole: The roles in an organization.

const (
	// OrgRoleAdmin: Admins can do anything in the org.
	OrgRoleAdmin OrgRole = "admin"
	// OrgRoleMember: Members of an org can not modify an org, but they belong in the org.
	OrgRoleMember OrgRole = "member"
	// OrgRoleServiceAccount: A service account role.
	OrgRoleServiceAccount OrgRole = "service_account"
)

type OrgService added in v0.2.32

type OrgService service

OrgService: An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs.

func (*OrgService) Create added in v0.2.32

func (s *OrgService) Create(body OrgDetails) (*Org, error)

Create: Create an org. This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.

Parameters

  • `body`: The user-modifiable parts of an organization.
Example

Create: Create an org. This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.

Parameters

  • `body`: The user-modifiable parts of an organization.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.Create(kittycad.OrgDetails{AllowUsersInDomainToAutoJoin: true, BillingEmail: "example@example.com", Domain: "some-string", Image: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) CreateMember added in v0.2.32

func (s *OrgService) CreateMember(body AddOrgMember) (*OrgMember, error)

CreateMember: Add a member to your org. If the user exists, this will add them to your org. If they do not exist, this will create a new user and add them to your org. In both cases the user gets an email that they have been added to the org. If the user is already in your org, this will return a 400 and a message. If the user is already in a different org, this will return a 400 and a message. This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.

Parameters

  • `body`: Data for adding a member to an org.
Example

CreateMember: Add a member to your org. If the user exists, this will add them to your org. If they do not exist, this will create a new user and add them to your org. In both cases the user gets an email that they have been added to the org. If the user is already in your org, this will return a 400 and a message. If the user is already in a different org, this will return a 400 and a message. This endpoint requires authentication by an org admin. It adds the specified member to the authenticated user's org.

Parameters

  • `body`: Data for adding a member to an org.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.CreateMember(kittycad.AddOrgMember{Email: "example@example.com", Role: ""})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) CreateSamlIdp added in v0.2.33

CreateSamlIdp: Create a SAML identity provider. This endpoint requires authentication by an org admin.

Parameters

  • `body`: Parameters for creating a SAML identity provider.
Example

CreateSamlIdp: Create a SAML identity provider. This endpoint requires authentication by an org admin.

Parameters

  • `body`: Parameters for creating a SAML identity provider.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.CreateSamlIdp(kittycad.SamlIdentityProviderCreate{IdpEntityID: "some-string", IdpMetadataSource: "", SigningKeypair: kittycad.DerEncodedKeyPair{PrivateKey: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}, PublicCert: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}}, TechnicalContactEmail: "example@example.com"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) Delete added in v0.2.32

func (s *OrgService) Delete() error

Delete: Delete an org. In order to delete an org, you must first delete all of its members, except yourself. You must also have no outstanding invoices or unpaid balances. This endpoint requires authentication by an org admin. It deletes the authenticated user's org.

Example

Delete: Delete an org. In order to delete an org, you must first delete all of its members, except yourself. You must also have no outstanding invoices or unpaid balances. This endpoint requires authentication by an org admin. It deletes the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Org.Delete(); err != nil {
	panic(err)
}
Output:

func (*OrgService) DeleteMember added in v0.2.32

func (s *OrgService) DeleteMember(userId UUID) error

DeleteMember: Remove a member from your org. This endpoint requires authentication by an org admin. It removes the specified member from the authenticated user's org.

Parameters

  • `userId`: A UUID usually v4 or v7
Example

DeleteMember: Remove a member from your org. This endpoint requires authentication by an org admin. It removes the specified member from the authenticated user's org.

Parameters

  • `userId`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Org.DeleteMember(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")); err != nil {
	panic(err)
}
Output:

func (*OrgService) DeleteSamlIdp added in v0.2.33

func (s *OrgService) DeleteSamlIdp() error

DeleteSamlIdp: Delete an SAML identity provider. This endpoint requires authentication by an org admin.

Example

DeleteSamlIdp: Delete an SAML identity provider. This endpoint requires authentication by an org admin.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Org.DeleteSamlIdp(); err != nil {
	panic(err)
}
Output:

func (*OrgService) Get added in v0.2.32

func (s *OrgService) Get() (*Org, error)

Get: Get an org. This endpoint requires authentication by an org admin. It gets the authenticated user's org.

Example

Get: Get an org. This endpoint requires authentication by an org admin. It gets the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.Get()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) GetAny added in v0.2.33

func (s *OrgService) GetAny(id UUID) (*Org, error)

GetAny: Get an org. This endpoint requires authentication by a Zoo employee. It gets the information for the specified org.

Parameters

  • `id`: A UUID usually v4 or v7
Example

GetAny: Get an org. This endpoint requires authentication by a Zoo employee. It gets the information for the specified org.

Parameters

  • `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.GetAny(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) GetMember added in v0.2.32

func (s *OrgService) GetMember(userId UUID) (*OrgMember, error)

GetMember: Get a member of your org. This endpoint requires authentication by an org admin. It gets the specified member of the authenticated user's org.

Parameters

  • `userId`: A UUID usually v4 or v7
Example

GetMember: Get a member of your org. This endpoint requires authentication by an org admin. It gets the specified member of the authenticated user's org.

Parameters

  • `userId`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.GetMember(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) GetPrivacySettings added in v0.2.33

func (s *OrgService) GetPrivacySettings() (*PrivacySettings, error)

GetPrivacySettings: Get the privacy settings for an org. This endpoint requires authentication by an org admin. It gets the privacy settings for the authenticated user's org.

Example

GetPrivacySettings: Get the privacy settings for an org. This endpoint requires authentication by an org admin. It gets the privacy settings for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.GetPrivacySettings()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) GetSamlIdp added in v0.2.33

func (s *OrgService) GetSamlIdp() (*SamlIdentityProvider, error)

GetSamlIdp: Get the SAML identity provider. This endpoint requires authentication by an org admin.

Example

GetSamlIdp: Get the SAML identity provider. This endpoint requires authentication by an org admin.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.GetSamlIdp()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) GetUser added in v0.2.32

func (s *OrgService) GetUser() (*UserOrgInfo, error)

GetUser: Get a user's org. This endpoint requires authentication by any Zoo user. It gets the authenticated user's org. If the user is not a member of an org, this endpoint will return a 404.

Example

GetUser: Get a user's org. This endpoint requires authentication by any Zoo user. It gets the authenticated user's org. If the user is not a member of an org, this endpoint will return a 404.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.GetUser()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) List added in v0.2.33

func (s *OrgService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*OrgResultsPage, error)

List: List orgs. This endpoint requires authentication by a Zoo employee. The orgs are returned in order of creation, with the most recently created orgs first.

Parameters

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

Example

List: List orgs. This endpoint requires authentication by a Zoo employee. The orgs are returned in order of creation, with the most recently created orgs first.

Parameters

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.List(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) ListMembers added in v0.2.32

func (s *OrgService) ListMembers(limit int, pageToken string, sortBy CreatedAtSortMode, role UserOrgRole) (*OrgMemberResultsPage, error)

ListMembers: List members of your org. This endpoint requires authentication by an org admin. It lists the members of the authenticated user's org.

Parameters

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

  • `role`: The roles for users in an organization.

Example

ListMembers: List members of your org. This endpoint requires authentication by an org admin. It lists the members of the authenticated user's org.

Parameters

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

  • `role`: The roles for users in an organization.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.ListMembers(123, "some-string", "", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) Update added in v0.2.32

func (s *OrgService) Update(body OrgDetails) (*Org, error)

Update: Update an org. This endpoint requires authentication by an org admin. It updates the authenticated user's org.

Parameters

  • `body`: The user-modifiable parts of an organization.
Example

Update: Update an org. This endpoint requires authentication by an org admin. It updates the authenticated user's org.

Parameters

  • `body`: The user-modifiable parts of an organization.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.Update(kittycad.OrgDetails{AllowUsersInDomainToAutoJoin: true, BillingEmail: "example@example.com", Domain: "some-string", Image: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) UpdateEnterprisePricingFor added in v0.2.33

func (s *OrgService) UpdateEnterprisePricingFor(id UUID, body any) (*ZooProductSubscriptions, error)

UpdateEnterprisePricingFor: Set the enterprise price for an organization. You must be a Zoo employee to perform this request.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: The price for a subscription tier.
Example

UpdateEnterprisePricingFor: Set the enterprise price for an organization. You must be a Zoo employee to perform this request.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: The price for a subscription tier.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.UpdateEnterprisePricingFor(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) UpdateMember added in v0.2.32

func (s *OrgService) UpdateMember(userId UUID, body UpdateMemberToOrgBody) (*OrgMember, error)

UpdateMember: Update a member of your org. This endpoint requires authentication by an org admin. It updates the specified member of the authenticated user's org.

Parameters

  • `userId`: A UUID usually v4 or v7
  • `body`: Data for updating a member of an org.
Example

UpdateMember: Update a member of your org. This endpoint requires authentication by an org admin. It updates the specified member of the authenticated user's org.

Parameters

  • `userId`: A UUID usually v4 or v7
  • `body`: Data for updating a member of an org.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.UpdateMember(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdateMemberToOrgBody{Role: ""})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) UpdatePrivacySettings added in v0.2.33

func (s *OrgService) UpdatePrivacySettings(body PrivacySettings) (*PrivacySettings, error)

UpdatePrivacySettings: Update the privacy settings for an org. This endpoint requires authentication by an org admin. It updates the privacy settings for the authenticated user's org.

Parameters

  • `body`: Privacy settings for an org or user.
Example

UpdatePrivacySettings: Update the privacy settings for an org. This endpoint requires authentication by an org admin. It updates the privacy settings for the authenticated user's org.

Parameters

  • `body`: Privacy settings for an org or user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.UpdatePrivacySettings(kittycad.PrivacySettings{CanTrainOnData: true})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*OrgService) UpdateSamlIdp added in v0.2.33

UpdateSamlIdp: Update the SAML identity provider. This endpoint requires authentication by an org admin.

Parameters

  • `body`: Parameters for creating a SAML identity provider.
Example

UpdateSamlIdp: Update the SAML identity provider. This endpoint requires authentication by an org admin.

Parameters

  • `body`: Parameters for creating a SAML identity provider.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Org.UpdateSamlIdp(kittycad.SamlIdentityProviderCreate{IdpEntityID: "some-string", IdpMetadataSource: "", SigningKeypair: kittycad.DerEncodedKeyPair{PrivateKey: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}, PublicCert: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}}, TechnicalContactEmail: "example@example.com"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type OutputFile added in v0.1.6

type OutputFile struct {
	// Contents: The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.
	Contents string `json:"contents" yaml:"contents" schema:"contents"`
	// Name: The name of the file.
	Name string `json:"name" yaml:"name" schema:"name"`
}

OutputFile: Output file contents. <details><summary>JSON schema</summary>

```json { "description": "Output file contents.", "type": "object", "properties": { "contents": { "description": "The contents of the file. This is base64 encoded so we can ensure it is UTF-8 for JSON.", "type": "string" }, "name": { "description": "The name of the file.", "default": "", "type": "string" } } } ``` </details>

type OutputFormatCoords added in v0.2.18

type OutputFormatCoords struct {
	// Coords: Co-ordinate system of output data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [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:
	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"`
}

OutputFormatCoords: *ST**ereo**L**ithography format.

type OutputFormatFbx added in v0.2.27

type OutputFormatFbx struct {
	// Presentation: Specifies how the JSON will be presented.
	Presentation GltfPresentation `json:"presentation" yaml:"presentation" schema:"presentation,required"`
	// Storage: Specifies which kind of glTF 2.0 will be exported.
	Storage GltfStorage `json:"storage" yaml:"storage" schema:"storage,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,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.

type OutputFormatGltf added in v0.2.18

type OutputFormatGltf struct {
	// Coords: Co-ordinate system of output data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
	Coords System `json:"coords" yaml:"coords" schema:"coords,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OutputFormatGltf: ISO 10303-21 (STEP) format.

type OutputFormatOutputFormatStorage added in v0.2.27

type OutputFormatOutputFormatStorage struct {
	// Coords: Co-ordinate system of output data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [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"`
}

OutputFormatOutputFormatStorage: The PLY Polygon File Format.

type OutputFormatPresentation added in v0.2.27

type OutputFormatPresentation struct {
	// Coords: Co-ordinate system of output data.
	//
	// Defaults to the [KittyCAD co-ordinate system].
	//
	// [KittyCAD co-ordinate system]: ../coord/constant.KITTYCAD.html
	Coords System `json:"coords" yaml:"coords" schema:"coords,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.

type OutputFormatStorage added in v0.2.18

type OutputFormatStorage struct {
	// Storage: Specifies which kind of FBX will be exported.
	Storage FbxStorage `json:"storage" yaml:"storage" schema:"storage,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OutputFormatStorage: Autodesk Filmbox (FBX) format.

type PathCommand added in v0.2.27

type PathCommand string

PathCommand: The path component command type (within a Path)

const (
	// PathCommandMoveTo represents the PathCommand `"move_to"`.
	PathCommandMoveTo PathCommand = "move_to"
	// PathCommandLineTo represents the PathCommand `"line_to"`.
	PathCommandLineTo PathCommand = "line_to"
	// PathCommandBezCurveTo represents the PathCommand `"bez_curve_to"`.
	PathCommandBezCurveTo PathCommand = "bez_curve_to"
	// PathCommandNurbsCurveTo represents the PathCommand `"nurbs_curve_to"`.
	PathCommandNurbsCurveTo PathCommand = "nurbs_curve_to"
	// PathCommandAddArc represents the PathCommand `"add_arc"`.
	PathCommandAddArc PathCommand = "add_arc"
)

type PathComponentConstraintBound added in v0.2.29

type PathComponentConstraintBound string

PathComponentConstraintBound: The path component constraint bounds type

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"
)

type PathComponentConstraintType added in v0.2.29

type PathComponentConstraintType string

PathComponentConstraintType: The path component constraint type

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"
)

type PathGetCurveUuidsForVertices added in v0.2.28

type PathGetCurveUuidsForVertices struct {
	// CurveIds: The UUIDs of the curve entities.
	CurveIds []UUID `json:"curve_ids" yaml:"curve_ids" schema:"curve_ids,required"`
}

PathGetCurveUuidsForVertices: The response from the `PathGetCurveUuidsForVertices` command.

type PathGetInfo added in v0.2.27

type PathGetInfo struct {
	// Segments: All segments in the path, in the order they were added.
	Segments []PathSegmentInfo `json:"segments" yaml:"segments" schema:"segments,required"`
}

PathGetInfo: The response from the `PathGetInfo` command.

type PathGetVertexUuids added in v0.2.29

type PathGetVertexUuids struct {
	// VertexIds: The UUIDs of the vertex entities.
	VertexIds []UUID `json:"vertex_ids" yaml:"vertex_ids" schema:"vertex_ids,required"`
}

PathGetVertexUuids: The response from the `PathGetVertexUuids` command.

type PathSegmentCenter added in v0.2.29

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.
	Radius float64 `json:"radius" yaml:"radius" schema:"radius,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentCenter: Adds a tangent arc from current pen position with the given radius and angle.

type PathSegmentEnd added in v0.2.22

type PathSegmentEnd struct {
	// End: End point of the line.
	End Point3D `json:"end" yaml:"end" schema:"end,required"`
	// Relative: Whether or not this line is a relative offset
	Relative bool `json:"relative" yaml:"relative" schema:"relative,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 PathSegmentInfo added in v0.2.27

type PathSegmentInfo struct {
	// Command: What is the path segment?
	Command PathCommand `json:"command" yaml:"command" schema:"command,required"`
	// CommandID: Which command created this path? This field is absent if the path command is not actually creating a path segment, e.g. moving the pen doesn't create a path segment.
	CommandID UUID `json:"command_id" yaml:"command_id" schema:"command_id"`
	// Relative: Whether or not this segment is a relative offset
	Relative bool `json:"relative" yaml:"relative" schema:"relative,required"`
}

PathSegmentInfo: Info about a path segment

type PathSegmentLine added in v0.2.18

type PathSegmentLine struct {
	// Control1: First control point.
	Control1 Point3D `json:"control1" yaml:"control1" schema:"control1,required"`
	// Control2: Second control point.
	Control2 Point3D `json:"control2" yaml:"control2" schema:"control2,required"`
	// End: Final control point.
	End Point3D `json:"end" yaml:"end" schema:"end,required"`
	// Relative: Whether or not this bezier is a relative offset
	Relative bool `json:"relative" yaml:"relative" schema:"relative,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentLine: A cubic bezier curve segment. Start at the end of the current line, go through control point 1 and 2, then end at a given point.

type PathSegmentPathSegmentEnd added in v0.2.29

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"`
}

PathSegmentPathSegmentEnd: Adds a tangent arc from current pen position to the new position.

type PathSegmentRelative added in v0.2.28

type PathSegmentRelative struct {
	// Center: Center of the circle
	Center Point2D `json:"center" yaml:"center" schema:"center,required"`
	// 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.
	Start Angle `json:"start" yaml:"start" schema:"start,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentRelative: A circular arc segment.

type PaymentIntent added in v0.1.4

type PaymentIntent struct {
	// ClientSecret: The client secret is used for client-side retrieval using a publishable key. The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
	ClientSecret string `json:"client_secret" yaml:"client_secret" schema:"client_secret,required"`
}

PaymentIntent: A payment intent response.

type PaymentMethod added in v0.1.4

type PaymentMethod struct {
	// BillingInfo: The billing info for the payment method.
	BillingInfo BillingInfo `json:"billing_info" yaml:"billing_info" schema:"billing_info,required"`
	// Card: The card, if it is one. For our purposes, this is the only type of payment method that we support.
	Card CardDetails `json:"card" yaml:"card" schema:"card"`
	// CreatedAt: Time at which the object was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: Unique identifier for the object.
	ID string `json:"id" yaml:"id" schema:"id"`
	// Metadata: Set of key-value pairs.
	Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
	// Type: The type of payment method.
	Type PaymentMethodType `json:"type" yaml:"type" schema:"type,required"`
}

PaymentMethod: A payment method.

type PaymentMethodCardChecks added in v0.1.4

type PaymentMethodCardChecks struct {
	// AddressLine1Check: If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressLine1Check string `json:"address_line1_check" yaml:"address_line1_check" schema:"address_line1_check"`
	// AddressPostalCodeCheck: If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	AddressPostalCodeCheck string `json:"address_postal_code_check" yaml:"address_postal_code_check" schema:"address_postal_code_check"`
	// CvcCheck: If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`.
	CvcCheck string `json:"cvc_check" yaml:"cvc_check" schema:"cvc_check"`
}

PaymentMethodCardChecks: Card checks.

type PaymentMethodType added in v0.1.4

type PaymentMethodType string

PaymentMethodType: An enum representing the possible values of an `PaymentMethod`'s `type` field.

const (
	// PaymentMethodTypeCard: A card payment method.
	PaymentMethodTypeCard PaymentMethodType = "card"
)

type PaymentService added in v0.1.4

type PaymentService service

PaymentService: Operations around payments and billing.

func (*PaymentService) CreateInformationForOrg added in v0.2.32

func (s *PaymentService) CreateInformationForOrg(body BillingInfo) (*Customer, error)

CreateInformationForOrg: Create payment info for your org. This includes billing address, phone, and name. This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.

Parameters

  • `body`: The billing information for payments.
Example

CreateInformationForOrg: Create payment info for your org. This includes billing address, phone, and name. This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.

Parameters

  • `body`: The billing information for payments.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.CreateInformationForOrg(kittycad.BillingInfo{Address: kittycad.AddressDetails{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) CreateInformationForUser added in v0.1.4

func (s *PaymentService) CreateInformationForUser(body BillingInfo) (*Customer, error)

CreateInformationForUser: Create payment info for your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.

Parameters

  • `body`: The billing information for payments.
Example

CreateInformationForUser: Create payment info for your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.

Parameters

  • `body`: The billing information for payments.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.AddressDetails{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) CreateIntentForOrg added in v0.2.32

func (s *PaymentService) CreateIntentForOrg() (*PaymentIntent, error)

CreateIntentForOrg: Create a payment intent for your org. This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.

Example

CreateIntentForOrg: Create a payment intent for your org. This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.CreateIntentForOrg()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) CreateIntentForUser added in v0.1.4

func (s *PaymentService) CreateIntentForUser() (*PaymentIntent, error)

CreateIntentForUser: Create a payment intent for your user. This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.

Example

CreateIntentForUser: Create a payment intent for your user. This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.CreateIntentForUser()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) CreateOrgSubscription added in v0.2.33

CreateOrgSubscription: Create the subscription for an org. This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.

Parameters

  • `body`: A struct of Zoo product subscriptions an organization can request.
Example

CreateOrgSubscription: Create the subscription for an org. This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.

Parameters

  • `body`: A struct of Zoo product subscriptions an organization can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.CreateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: ""})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) CreateUserSubscription added in v0.2.33

CreateUserSubscription: Create the subscription for a user. This endpoint requires authentication by any Zoo user. It creates the subscription for the user.

Parameters

  • `body`: A struct of Zoo product subscriptions a user can request.
Example

CreateUserSubscription: Create the subscription for a user. This endpoint requires authentication by any Zoo user. It creates the subscription for the user.

Parameters

  • `body`: A struct of Zoo product subscriptions a user can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.CreateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: ""})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) DeleteInformationForOrg added in v0.2.32

func (s *PaymentService) DeleteInformationForOrg() error

DeleteInformationForOrg: Delete payment info for your org. This includes billing address, phone, and name. This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.

Example

DeleteInformationForOrg: Delete payment info for your org. This includes billing address, phone, and name. This endpoint requires authentication by an org admin. It deletes the payment information for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Payment.DeleteInformationForOrg(); err != nil {
	panic(err)
}
Output:

func (*PaymentService) DeleteInformationForUser added in v0.1.4

func (s *PaymentService) DeleteInformationForUser() error

DeleteInformationForUser: Delete payment info for your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.

Example

DeleteInformationForUser: Delete payment info for your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It deletes the payment information for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Payment.DeleteInformationForUser(); err != nil {
	panic(err)
}
Output:

func (*PaymentService) DeleteMethodForOrg added in v0.2.32

func (s *PaymentService) DeleteMethodForOrg(id string) error

DeleteMethodForOrg: Delete a payment method for your org. This endpoint requires authentication by an org admin. It deletes the specified payment method for the authenticated user's org.

Parameters

  • `id`
Example

DeleteMethodForOrg: Delete a payment method for your org. This endpoint requires authentication by an org admin. It deletes the specified payment method for the authenticated user's org.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Payment.DeleteMethodForOrg("some-string"); err != nil {
	panic(err)
}
Output:

func (*PaymentService) DeleteMethodForUser added in v0.1.4

func (s *PaymentService) DeleteMethodForUser(id string) error

DeleteMethodForUser: Delete a payment method for your user. This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.

Parameters

  • `id`
Example

DeleteMethodForUser: Delete a payment method for your user. This endpoint requires authentication by any Zoo user. It deletes the specified payment method for the authenticated user.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Payment.DeleteMethodForUser("some-string"); err != nil {
	panic(err)
}
Output:

func (*PaymentService) GetBalanceForAnyOrg added in v0.2.33

func (s *PaymentService) GetBalanceForAnyOrg(id UUID) (*CustomerBalance, error)

GetBalanceForAnyOrg: Get balance for an org. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.

Parameters

  • `id`: A UUID usually v4 or v7
Example

GetBalanceForAnyOrg: Get balance for an org. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.

Parameters

  • `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetBalanceForAnyOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetBalanceForAnyUser added in v0.2.33

func (s *PaymentService) GetBalanceForAnyUser(id UUID) (*CustomerBalance, error)

GetBalanceForAnyUser: Get balance for an user. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.

Parameters

  • `id`: A UUID usually v4 or v7
Example

GetBalanceForAnyUser: Get balance for an user. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.

Parameters

  • `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetBalanceForAnyUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetBalanceForOrg added in v0.2.32

func (s *PaymentService) GetBalanceForOrg() (*CustomerBalance, error)

GetBalanceForOrg: Get balance for your org. This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.

Example

GetBalanceForOrg: Get balance for your org. This endpoint requires authentication by an org admin. It gets the balance information for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetBalanceForOrg()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetBalanceForUser added in v0.2.3

func (s *PaymentService) GetBalanceForUser() (*CustomerBalance, error)

GetBalanceForUser: Get balance for your user. This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.

Example

GetBalanceForUser: Get balance for your user. This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetBalanceForUser()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetInformationForOrg added in v0.2.32

func (s *PaymentService) GetInformationForOrg() (*Customer, error)

GetInformationForOrg: Get payment info about your org. This includes billing address, phone, and name. This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.

Example

GetInformationForOrg: Get payment info about your org. This includes billing address, phone, and name. This endpoint requires authentication by an org admin. It gets the payment information for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetInformationForOrg()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetInformationForUser added in v0.1.4

func (s *PaymentService) GetInformationForUser() (*Customer, error)

GetInformationForUser: Get payment info about your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.

Example

GetInformationForUser: Get payment info about your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It gets the payment information for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetInformationForUser()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetOrgSubscription added in v0.2.33

func (s *PaymentService) GetOrgSubscription() (*ZooProductSubscriptions, error)

GetOrgSubscription: Get the subscription for an org. This endpoint requires authentication by an org admin. It gets the subscription for the authenticated user's org.

Example

GetOrgSubscription: Get the subscription for an org. This endpoint requires authentication by an org admin. It gets the subscription for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetOrgSubscription()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) GetUserSubscription added in v0.2.33

func (s *PaymentService) GetUserSubscription() (*ZooProductSubscriptions, error)

GetUserSubscription: Get the subscription for a user. This endpoint requires authentication by any Zoo user. It gets the subscription for the user.

Example

GetUserSubscription: Get the subscription for a user. This endpoint requires authentication by any Zoo user. It gets the subscription for the user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.GetUserSubscription()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) ListInvoicesForOrg added in v0.2.32

func (s *PaymentService) ListInvoicesForOrg() (*[]Invoice, error)

ListInvoicesForOrg: List invoices for your org. This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.

Example

ListInvoicesForOrg: List invoices for your org. This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.ListInvoicesForOrg()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) ListInvoicesForUser added in v0.1.4

func (s *PaymentService) ListInvoicesForUser() (*[]Invoice, error)

ListInvoicesForUser: List invoices for your user. This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.

Example

ListInvoicesForUser: List invoices for your user. This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.ListInvoicesForUser()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) ListMethodsForOrg added in v0.2.32

func (s *PaymentService) ListMethodsForOrg() (*[]PaymentMethod, error)

ListMethodsForOrg: List payment methods for your org. This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.

Example

ListMethodsForOrg: List payment methods for your org. This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.ListMethodsForOrg()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) ListMethodsForUser added in v0.1.4

func (s *PaymentService) ListMethodsForUser() (*[]PaymentMethod, error)

ListMethodsForUser: List payment methods for your user. This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.

Example

ListMethodsForUser: List payment methods for your user. This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.ListMethodsForUser()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) UpdateBalanceForAnyOrg added in v0.2.33

func (s *PaymentService) UpdateBalanceForAnyOrg(id UUID, body UpdatePaymentBalance) (*CustomerBalance, error)

UpdateBalanceForAnyOrg: Update balance for an org. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: The data for updating a balance.
Example

UpdateBalanceForAnyOrg: Update balance for an org. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: The data for updating a balance.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.UpdateBalanceForAnyOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdatePaymentBalance{MonthlyCreditsRemaining: 123.45, PrePayCashRemaining: 123.45, PrePayCreditsRemaining: 123.45})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) UpdateBalanceForAnyUser added in v0.2.33

func (s *PaymentService) UpdateBalanceForAnyUser(id UUID, body UpdatePaymentBalance) (*CustomerBalance, error)

UpdateBalanceForAnyUser: Update balance for an user. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: The data for updating a balance.
Example

UpdateBalanceForAnyUser: Update balance for an user. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: The data for updating a balance.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.UpdateBalanceForAnyUser(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdatePaymentBalance{MonthlyCreditsRemaining: 123.45, PrePayCashRemaining: 123.45, PrePayCreditsRemaining: 123.45})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) UpdateInformationForOrg added in v0.2.32

func (s *PaymentService) UpdateInformationForOrg(body BillingInfo) (*Customer, error)

UpdateInformationForOrg: Update payment info for your org. This includes billing address, phone, and name. This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.

Parameters

  • `body`: The billing information for payments.
Example

UpdateInformationForOrg: Update payment info for your org. This includes billing address, phone, and name. This endpoint requires authentication by an org admin. It updates the payment information for the authenticated user's org.

Parameters

  • `body`: The billing information for payments.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.UpdateInformationForOrg(kittycad.BillingInfo{Address: kittycad.AddressDetails{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) UpdateInformationForUser added in v0.1.4

func (s *PaymentService) UpdateInformationForUser(body BillingInfo) (*Customer, error)

UpdateInformationForUser: Update payment info for your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.

Parameters

  • `body`: The billing information for payments.
Example

UpdateInformationForUser: Update payment info for your user. This includes billing address, phone, and name. This endpoint requires authentication by any Zoo user. It updates the payment information for the authenticated user.

Parameters

  • `body`: The billing information for payments.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.UpdateInformationForUser(kittycad.BillingInfo{Address: kittycad.AddressDetails{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) UpdateOrgSubscription added in v0.2.33

UpdateOrgSubscription: Update the subscription for an org. This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.

Parameters

  • `body`: A struct of Zoo product subscriptions an organization can request.
Example

UpdateOrgSubscription: Update the subscription for an org. This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.

Parameters

  • `body`: A struct of Zoo product subscriptions an organization can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.UpdateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: ""})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) UpdateUserSubscription added in v0.2.33

UpdateUserSubscription: Update the user's subscription. This endpoint requires authentication by any Zoo user. It updates the subscription for the user.

Parameters

  • `body`: A struct of Zoo product subscriptions a user can request.
Example

UpdateUserSubscription: Update the user's subscription. This endpoint requires authentication by any Zoo user. It updates the subscription for the user.

Parameters

  • `body`: A struct of Zoo product subscriptions a user can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Payment.UpdateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: ""})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*PaymentService) ValidateCustomerTaxInformationForOrg added in v0.2.32

func (s *PaymentService) ValidateCustomerTaxInformationForOrg() error

ValidateCustomerTaxInformationForOrg: Validate an orgs's information is correct and valid for automatic tax. This endpoint requires authentication by an org admin. It will return an error if the org's information is not valid for automatic tax. Otherwise, it will return an empty successful response.

Example

ValidateCustomerTaxInformationForOrg: Validate an orgs's information is correct and valid for automatic tax. This endpoint requires authentication by an org admin. It will return an error if the org's information is not valid for automatic tax. Otherwise, it will return an empty successful response.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Payment.ValidateCustomerTaxInformationForOrg(); err != nil {
	panic(err)
}
Output:

func (*PaymentService) ValidateCustomerTaxInformationForUser added in v0.2.10

func (s *PaymentService) ValidateCustomerTaxInformationForUser() error

ValidateCustomerTaxInformationForUser: Validate a user's information is correct and valid for automatic tax. This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.

Example

ValidateCustomerTaxInformationForUser: Validate a user's information is correct and valid for automatic tax. This endpoint requires authentication by any Zoo user. It will return an error if the user's information is not valid for automatic tax. Otherwise, it will return an empty successful response.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.Payment.ValidateCustomerTaxInformationForUser(); err != nil {
	panic(err)
}
Output:

type PerspectiveCameraParameters added in v0.2.31

type PerspectiveCameraParameters struct {
	// FovY: Camera frustum vertical field of view.
	FovY float64 `json:"fov_y" yaml:"fov_y" schema:"fov_y,required"`
	// ZFar: Camera frustum far plane.
	ZFar float64 `json:"z_far" yaml:"z_far" schema:"z_far,required"`
	// ZNear: Camera frustum near plane.
	ZNear float64 `json:"z_near" yaml:"z_near" schema:"z_near,required"`
}

PerspectiveCameraParameters: Defines a perspective view.

type PlanInterval added in v0.2.33

type PlanInterval string

PlanInterval: A plan's interval.

const (
	// PlanIntervalDay: Day.
	PlanIntervalDay PlanInterval = "day"
	// PlanIntervalMonth: Month.
	PlanIntervalMonth PlanInterval = "month"
	// PlanIntervalWeek: Week.
	PlanIntervalWeek PlanInterval = "week"
	// PlanIntervalYear: Year.
	PlanIntervalYear PlanInterval = "year"
)

type PlaneIntersectAndProject added in v0.2.28

type PlaneIntersectAndProject struct {
	// PlaneCoordinates: Corresponding coordinates of given window coordinates, intersected on given plane.
	PlaneCoordinates Point2D `json:"plane_coordinates" yaml:"plane_coordinates" schema:"plane_coordinates"`
}

PlaneIntersectAndProject: Corresponding coordinates of given window coordinates, intersected on given plane.

type PlyStorage added in v0.2.27

type PlyStorage string

PlyStorage: The storage for the output PLY file.

const (
	// PlyStorageAscii: Write numbers in their ascii representation (e.g. -13, 6.28, etc.). Properties are separated by spaces and elements are separated by line breaks.
	PlyStorageAscii PlyStorage = "ascii"
	// PlyStorageBinaryLittleEndian: Encode payload as binary using little endian.
	PlyStorageBinaryLittleEndian PlyStorage = "binary_little_endian"
	// PlyStorageBinaryBigEndian: Encode payload as binary using big endian.
	PlyStorageBinaryBigEndian PlyStorage = "binary_big_endian"
)

type Point2D added in v0.2.16

type Point2D struct {
	// X:
	X float64 `json:"x" yaml:"x" schema:"x,required"`
	// Y:
	Y float64 `json:"y" yaml:"y" schema:"y,required"`
}

Point2D: A point in 2D space

type Point3D added in v0.2.16

type Point3D struct {
	// X:
	X float64 `json:"x" yaml:"x" schema:"x,required"`
	// Y:
	Y float64 `json:"y" yaml:"y" schema:"y,required"`
	// Z:
	Z float64 `json:"z" yaml:"z" schema:"z,required"`
}

Point3D: A point in 3D space

type Pong added in v0.0.9

type Pong struct {
	// Message: The pong response.
	Message string `json:"message" yaml:"message" schema:"message,required"`
}

Pong: The response from the `/ping` endpoint.

type PostEffectType added in v0.2.33

type PostEffectType string

PostEffectType: Post effect type

const (
	// PostEffectTypePhosphor represents the PostEffectType `"phosphor"`.
	PostEffectTypePhosphor PostEffectType = "phosphor"
	// PostEffectTypeSsao represents the PostEffectType `"ssao"`.
	PostEffectTypeSsao PostEffectType = "ssao"
	// PostEffectTypeNoeffect represents the PostEffectType `"noeffect"`.
	PostEffectTypeNoeffect PostEffectType = "noeffect"
)

type PrivacySettings added in v0.2.33

type PrivacySettings struct {
	// CanTrainOnData: If we can train on the data. If the user is a member of an organization, the organization's setting will override this. The organization's setting takes priority.
	CanTrainOnData bool `json:"can_train_on_data" yaml:"can_train_on_data" schema:"can_train_on_data,required"`
}

PrivacySettings: Privacy settings for an org or user.

type RawFile added in v0.2.23

type RawFile struct {
	// Contents: The contents of the file.
	Contents []int `json:"contents" yaml:"contents" schema:"contents,required"`
	// Name: The name of the file.
	Name string `json:"name" yaml:"name" schema:"name,required"`
}

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 ResponseError added in v0.0.9

type ResponseError struct {
	// ErrorCode:
	ErrorCode string `json:"error_code" yaml:"error_code" schema:"error_code"`
	// Message:
	Message string `json:"message" yaml:"message" schema:"message,required"`
	// RequestID:
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id,required"`
}

ResponseError: Error information from a response.

type RtcIceCandidateInit added in v0.2.23

type RtcIceCandidateInit struct {
	// Candidate: The candidate string associated with the object.
	Candidate string `json:"candidate" yaml:"candidate" schema:"candidate,required"`
	// SdpMlineIndex: The index (starting at zero) of the m-line in the SDP this candidate is associated with.
	SdpMlineIndex int `json:"sdpMLineIndex" yaml:"sdpMLineIndex" schema:"sdpMLineIndex"`
	// SdpMid: The identifier of the "media stream identification" as defined in [RFC 8841](https://tools.ietf.org/html/rfc8841).
	SdpMid string `json:"sdpMid" yaml:"sdpMid" schema:"sdpMid"`
	// UsernameFragment: The username fragment (as defined in [RFC 8445](https://tools.ietf.org/html/rfc8445#section-5.2.1)) associated with the object.
	UsernameFragment string `json:"usernameFragment" yaml:"usernameFragment" schema:"usernameFragment"`
}

RtcIceCandidateInit: ICECandidateInit is used to serialize ice candidates

type RtcSdpType added in v0.2.23

type RtcSdpType string

RtcSdpType: SDPType describes the type of an SessionDescription.

const (
	// RtcSdpTypeUnspecified: Unspecified indicates that the type is unspecified.
	RtcSdpTypeUnspecified RtcSdpType = "unspecified"
	// RtcSdpTypeOffer: indicates that a description MUST be treated as an SDP offer.
	RtcSdpTypeOffer RtcSdpType = "offer"
	// RtcSdpTypePranswer: indicates that a description MUST be treated as an SDP answer, but not a final answer. A description used as an SDP pranswer may be applied as a response to an SDP offer, or an update to a previously sent SDP pranswer.
	RtcSdpTypePranswer RtcSdpType = "pranswer"
	// RtcSdpTypeAnswer: indicates that a description MUST be treated as an SDP final answer, and the offer-answer exchange MUST be considered complete. A description used as an SDP answer may be applied as a response to an SDP offer or as an update to a previously sent SDP pranswer.
	RtcSdpTypeAnswer RtcSdpType = "answer"
	// RtcSdpTypeRollback: indicates that a description MUST be treated as canceling the current SDP negotiation and moving the SDP offer and answer back to what it was in the previous stable state. Note the local or remote SDP descriptions in the previous stable state could be null if there has not yet been a successful offer-answer negotiation.
	RtcSdpTypeRollback RtcSdpType = "rollback"
)

type RtcSessionDescription added in v0.2.23

type RtcSessionDescription struct {
	// Sdp: SDP string.
	Sdp string `json:"sdp" yaml:"sdp" schema:"sdp,required"`
	// Type: SDP type.
	Type RtcSdpType `json:"type" yaml:"type" schema:"type,required"`
}

RtcSessionDescription: SessionDescription is used to expose local and remote session descriptions.

type SamlIdentityProvider added in v0.2.33

type SamlIdentityProvider struct {
	// AcsUrl: The ACS (Assertion Consumer Service) url.
	AcsUrl URL `json:"acs_url" yaml:"acs_url" schema:"acs_url,required"`
	// CreatedAt: The date and time the SAML identity provider was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: The unique identifier for the SAML identity provider.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// IdpEntityID: The entity ID of the SAML identity provider.
	IdpEntityID string `json:"idp_entity_id" yaml:"idp_entity_id" schema:"idp_entity_id"`
	// IdpMetadataDocumentString: The metadata document as a string.
	IdpMetadataDocumentString string `json:"idp_metadata_document_string" yaml:"idp_metadata_document_string" schema:"idp_metadata_document_string"`
	// OrgID: The organization ID the SAML identity provider belongs to.
	OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id,required"`
	// PrivateKey: The private key for the SAML identity provider. This is the PEM corresponding to the X509 pair.
	PrivateKey Base64 `json:"private_key" yaml:"private_key" schema:"private_key"`
	// PublicCert: The public certificate for the SAML identity provider. This is the PEM corresponding to the X509 pair.
	PublicCert Base64 `json:"public_cert" yaml:"public_cert" schema:"public_cert"`
	// SloUrl: The SLO (Single Logout) url.
	SloUrl URL `json:"slo_url" yaml:"slo_url" schema:"slo_url,required"`
	// TechnicalContactEmail: The technical contact email address for the SAML identity provider.
	TechnicalContactEmail string `json:"technical_contact_email" yaml:"technical_contact_email" schema:"technical_contact_email"`
	// UpdatedAt: The date and time the SAML identity provider was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

SamlIdentityProvider: A SAML identity provider.

type SamlIdentityProviderCreate added in v0.2.33

type SamlIdentityProviderCreate struct {
	// IdpEntityID: The entity ID of the SAML identity provider.
	IdpEntityID string `json:"idp_entity_id" yaml:"idp_entity_id" schema:"idp_entity_id"`
	// IdpMetadataSource: The source of an identity provider metadata descriptor.
	IdpMetadataSource any `json:"idp_metadata_source" yaml:"idp_metadata_source" schema:"idp_metadata_source,required"`
	// SigningKeypair: The request signing key pair.
	SigningKeypair DerEncodedKeyPair `json:"signing_keypair" yaml:"signing_keypair" schema:"signing_keypair"`
	// TechnicalContactEmail: The technical contact email address for the SAML identity provider.
	TechnicalContactEmail string `json:"technical_contact_email" yaml:"technical_contact_email" schema:"technical_contact_email"`
}

SamlIdentityProviderCreate: Parameters for creating a SAML identity provider.

type SceneSelectionType added in v0.2.22

type SceneSelectionType string

SceneSelectionType: The type of scene selection change

const (
	// SceneSelectionTypeReplace: Replaces the selection
	SceneSelectionTypeReplace SceneSelectionType = "replace"
	// SceneSelectionTypeAdd: Adds to the selection
	SceneSelectionTypeAdd SceneSelectionType = "add"
	// SceneSelectionTypeRemove: Removes from the selection
	SceneSelectionTypeRemove SceneSelectionType = "remove"
)

type SceneToolType added in v0.2.27

type SceneToolType string

SceneToolType: The type of scene's active tool

const (
	// SceneToolTypeCameraRevolve represents the SceneToolType `"camera_revolve"`.
	SceneToolTypeCameraRevolve SceneToolType = "camera_revolve"
	// SceneToolTypeSelect represents the SceneToolType `"select"`.
	SceneToolTypeSelect SceneToolType = "select"
	// SceneToolTypeMove represents the SceneToolType `"move"`.
	SceneToolTypeMove SceneToolType = "move"
	// SceneToolTypeSketchLine represents the SceneToolType `"sketch_line"`.
	SceneToolTypeSketchLine SceneToolType = "sketch_line"
	// SceneToolTypeSketchTangentialArc represents the SceneToolType `"sketch_tangential_arc"`.
	SceneToolTypeSketchTangentialArc SceneToolType = "sketch_tangential_arc"
	// SceneToolTypeSketchCurve represents the SceneToolType `"sketch_curve"`.
	SceneToolTypeSketchCurve SceneToolType = "sketch_curve"
	// SceneToolTypeSketchCurveMod represents the SceneToolType `"sketch_curve_mod"`.
	SceneToolTypeSketchCurveMod SceneToolType = "sketch_curve_mod"
)

type SelectGet added in v0.2.27

type SelectGet struct {
	// EntityIds: The UUIDs of the selected entities.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

SelectGet: The response from the `SelectGet` command.

type SelectWithPoint added in v0.2.27

type SelectWithPoint struct {
	// EntityID: The UUID of the entity that was selected.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"`
}

SelectWithPoint: The response from the `SelectWithPoint` command.

type SelectionDefaultScene added in v0.2.29

type SelectionDefaultScene struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

SelectionDefaultScene: Visit the default scene.

type SelectionIndex added in v0.2.29

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"`
}

SelectionIndex: Visit the indexed scene.

type SelectionName added in v0.2.29

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"`
}

SelectionName: Visit the indexed mesh.

type SelectionSceneByIndex added in v0.2.29

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"`
}

SelectionSceneByIndex: Visit the first scene with the given name.

type SelectionSceneByName added in v0.2.29

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"`
}

SelectionSceneByName: Visit the first mesh with the given name.

type ServiceAccount added in v0.2.33

type ServiceAccount 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 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"`
	// Label: An optional label for the API token.
	Label string `json:"label" yaml:"label" schema:"label"`
	// OrgID: The ID of the organization that owns the API token.
	OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id,required"`
	// Token: The API token itself.
	Token UUID `json:"token" yaml:"token" schema:"token,required"`
	// UpdatedAt: The date and time the API token was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

ServiceAccount: A service account. These are used to authenticate orgs with Bearer authentication.

This works just like an API token, but it is tied to an organization versus an individual user.

type ServiceAccountResultsPage added in v0.2.33

type ServiceAccountResultsPage struct {
	// Items: list of items on this page of results
	Items []ServiceAccount `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"`
}

ServiceAccountResultsPage: A single page of results

type ServiceAccountService added in v0.2.33

type ServiceAccountService service

ServiceAccountService: Service accounts allow organizations to call the API. Organization admins can create, delete, and list the service accounts for their org. Service accounts are scoped to an organization not individual users, these are better to use for automations than individual API tokens, since they won't stop working when an individual leaves the company.

func (*ServiceAccountService) CreateForOrg added in v0.2.33

func (s *ServiceAccountService) CreateForOrg(label string) (*ServiceAccount, error)

CreateForOrg: Create a new service account for your org. This endpoint requires authentication by an org admin. It creates a new service account for the organization.

Parameters

  • `label`
Example

CreateForOrg: Create a new service account for your org. This endpoint requires authentication by an org admin. It creates a new service account for the organization.

Parameters

  • `label`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.ServiceAccount.CreateForOrg("some-string")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*ServiceAccountService) DeleteForOrg added in v0.2.33

func (s *ServiceAccountService) DeleteForOrg(token UUID) error

DeleteForOrg: Delete an service account for your org. This endpoint requires authentication by an org admin. It deletes the requested service account for the organization. This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.

Parameters

  • `token`
Example

DeleteForOrg: Delete an service account for your org. This endpoint requires authentication by an org admin. It deletes the requested service account for the organization. This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.

Parameters

  • `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.ServiceAccount.DeleteForOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8")); err != nil {
	panic(err)
}
Output:

func (*ServiceAccountService) GetForOrg added in v0.2.33

func (s *ServiceAccountService) GetForOrg(token UUID) (*ServiceAccount, error)

GetForOrg: Get an service account for your org. This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.

Parameters

  • `token`
Example

GetForOrg: Get an service account for your org. This endpoint requires authentication by an org admin. It returns details of the requested service account for the organization.

Parameters

  • `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.ServiceAccount.GetForOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*ServiceAccountService) ListForOrg added in v0.2.33

func (s *ServiceAccountService) ListForOrg(limit int, pageToken string, sortBy CreatedAtSortMode) (*ServiceAccountResultsPage, error)

ListForOrg: List service accounts for your org. This endpoint requires authentication by an org admin. It returns the service accounts for the organization. The service accounts are returned in order of creation, with the most recently created service accounts first.

Parameters

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

Example

ListForOrg: List service accounts for your org. This endpoint requires authentication by an org admin. It returns the service accounts for the organization. The service accounts are returned in order of creation, with the most recently created service accounts first.

Parameters

  • `limit`

  • `pageToken`

  • `sortBy`: Supported set of sort modes for scanning by created_at only.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.ServiceAccount.ListForOrg(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type Session added in v0.1.1

type Session struct {
	// CreatedAt: The date and time the session was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ExpiresAt: The date and time the session expires.
	ExpiresAt Time `json:"expires_at" yaml:"expires_at" schema:"expires_at,required"`
	// Token: The session token.
	Token UUID `json:"token" yaml:"token" schema:"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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

Session: An authentication session.

type Solid3DGetAllEdgeFaces added in v0.2.27

type Solid3DGetAllEdgeFaces struct {
	// Faces: The UUIDs of the faces.
	Faces []UUID `json:"faces" yaml:"faces" schema:"faces,required"`
}

Solid3DGetAllEdgeFaces: The response from the `Solid3dGetAllEdgeFaces` command.

type Solid3DGetAllOppositeEdges added in v0.2.27

type Solid3DGetAllOppositeEdges struct {
	// Edges: The UUIDs of the edges.
	Edges []UUID `json:"edges" yaml:"edges" schema:"edges,required"`
}

Solid3DGetAllOppositeEdges: The response from the `Solid3dGetAllOppositeEdges` command.

type Solid3DGetExtrusionFaceInfo added in v0.2.33

type Solid3DGetExtrusionFaceInfo struct {
	// Faces: Details of each face.
	Faces []ExtrusionFaceInfo `json:"faces" yaml:"faces" schema:"faces,required"`
}

Solid3DGetExtrusionFaceInfo: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)

type Solid3DGetNextAdjacentEdge added in v0.2.27

type Solid3DGetNextAdjacentEdge struct {
	// Edge: The UUID of the edge.
	Edge UUID `json:"edge" yaml:"edge" schema:"edge"`
}

Solid3DGetNextAdjacentEdge: The response from the `Solid3dGetNextAdjacentEdge` command.

type Solid3DGetOppositeEdge added in v0.2.27

type Solid3DGetOppositeEdge struct {
	// Edge: The UUID of the edge.
	Edge UUID `json:"edge" yaml:"edge" schema:"edge,required"`
}

Solid3DGetOppositeEdge: The response from the `Solid3dGetOppositeEdge` command.

type Solid3DGetPrevAdjacentEdge added in v0.2.27

type Solid3DGetPrevAdjacentEdge struct {
	// Edge: The UUID of the edge.
	Edge UUID `json:"edge" yaml:"edge" schema:"edge"`
}

Solid3DGetPrevAdjacentEdge: The response from the `Solid3dGetPrevAdjacentEdge` command.

type StlStorage added in v0.2.27

type StlStorage string

StlStorage: Export storage.

const (
	// StlStorageAscii: Plaintext encoding.
	StlStorageAscii StlStorage = "ascii"
	// StlStorageBinary: Binary STL encoding.
	//
	// This is the default setting.
	StlStorageBinary StlStorage = "binary"
)

type StoreCouponParams added in v0.2.33

type StoreCouponParams struct {
	// PercentOff: The percentage off.
	PercentOff int `json:"percent_off" yaml:"percent_off" schema:"percent_off,required"`
}

StoreCouponParams: The parameters for a new store coupon.

type StoreService added in v0.2.33

type StoreService service

StoreService: Operations involving our swag store.

func (*StoreService) CreateCoupon added in v0.2.33

func (s *StoreService) CreateCoupon(body StoreCouponParams) (*DiscountCode, error)

CreateCoupon: Create a new store coupon. This endpoint requires authentication by a Zoo employee. It creates a new store coupon.

Parameters

  • `body`: The parameters for a new store coupon.
Example

CreateCoupon: Create a new store coupon. This endpoint requires authentication by a Zoo employee. It creates a new store coupon.

Parameters

  • `body`: The parameters for a new store coupon.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Store.CreateCoupon(kittycad.StoreCouponParams{PercentOff: 123})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type SubscriptionTierFeature added in v0.2.33

type SubscriptionTierFeature struct {
	// Info: Information about the feature.
	Info string `json:"info" yaml:"info" schema:"info,required"`
}

SubscriptionTierFeature: A subscription tier feature.

type SubscriptionTierPriceFlat added in v0.2.33

type SubscriptionTierPriceFlat struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

SubscriptionTierPriceFlat: Enterprise: The price is not listed and the user needs to contact sales.

type SubscriptionTierPriceInterval added in v0.2.33

type SubscriptionTierPriceInterval struct {
	// Interval: The interval the price is charged.
	Interval PlanInterval `json:"interval" yaml:"interval" schema:"interval,required"`
	// Price: The price.
	Price float64 `json:"price" yaml:"price" schema:"price,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

SubscriptionTierPriceInterval: A flat price that we publicly list.

type SubscriptionTierPricePrice added in v0.2.33

type SubscriptionTierPricePrice struct {
	// Interval: The interval the price is charged.
	Interval PlanInterval `json:"interval" yaml:"interval" schema:"interval,required"`
	// Price: The price.
	Price float64 `json:"price" yaml:"price" schema:"price,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

SubscriptionTierPricePrice: A per user price that we publicly list.

type SubscriptionTierTypeIndividual added in v0.2.33

type SubscriptionTierTypeIndividual struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

SubscriptionTierTypeIndividual: A subscription tier that can be applied to individuals only.

type SubscriptionTierTypeSamlSso added in v0.2.33

type SubscriptionTierTypeSamlSso struct {
	// SamlSso: Whether or not the subscription type supports SAML SSO.
	SamlSso bool `json:"saml_sso" yaml:"saml_sso" schema:"saml_sso,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

SubscriptionTierTypeSamlSso: An subscription tier that can be applied to organizations only.

type SubscriptionTrainingDataBehavior added in v0.2.33

type SubscriptionTrainingDataBehavior string

SubscriptionTrainingDataBehavior: An enum representing a subscription training data behavior.

const (
	// SubscriptionTrainingDataBehaviorAlways: The data is always used for training and cannot be turned off.
	SubscriptionTrainingDataBehaviorAlways SubscriptionTrainingDataBehavior = "always"
	// SubscriptionTrainingDataBehaviorDefaultOn: The data is used for training by default, but can be turned off.
	SubscriptionTrainingDataBehaviorDefaultOn SubscriptionTrainingDataBehavior = "default_on"
	// SubscriptionTrainingDataBehaviorDefaultOff: The data is not used for training by default, but can be turned on.
	SubscriptionTrainingDataBehaviorDefaultOff SubscriptionTrainingDataBehavior = "default_off"
)

type SuccessWebSocketResponse added in v0.2.27

type SuccessWebSocketResponse struct {
	// RequestID: Which request this is a response to. If the request was a modeling command, this is the modeling command ID. If no request ID was sent, this will be null.
	RequestID UUID `json:"request_id" yaml:"request_id" schema:"request_id"`
	// Resp: The data sent with a successful response. This will be flattened into a 'type' and 'data' field.
	Resp any `json:"resp" yaml:"resp" schema:"resp,required"`
	// Success: Always true
	Success bool `json:"success" yaml:"success" schema:"success,required"`
}

SuccessWebSocketResponse: Successful Websocket response.

type SupportTier added in v0.2.33

type SupportTier string

SupportTier: The support tier the subscription provides.

const (
	// SupportTierCommunity: Community support.
	SupportTierCommunity SupportTier = "community"
	// SupportTierStandard: Standard support.
	SupportTierStandard SupportTier = "standard"
	// SupportTierPremium: Premium support.
	SupportTierPremium SupportTier = "premium"
	// SupportTierPriority: Priority support.
	SupportTierPriority SupportTier = "priority"
)

type SurfaceArea added in v0.2.28

type SurfaceArea struct {
	// OutputUnit: The output unit for the surface area.
	OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// SurfaceArea: The surface area.
	SurfaceArea float64 `json:"surface_area" yaml:"surface_area" schema:"surface_area,required"`
}

SurfaceArea: The surface area response.

type System added in v0.2.18

type System struct {
	// Forward: Axis the front face of a model looks along.
	Forward AxisDirectionPair `json:"forward" yaml:"forward" schema:"forward,required"`
	// Up: Axis pointing up and away from a model.
	Up AxisDirectionPair `json:"up" yaml:"up" schema:"up,required"`
}

System: Co-ordinate system definition. The `up` axis must be orthogonal to the `forward` axis.

See [cglearn.eu] for background reading.

[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)

type TakeSnapshot added in v0.2.27

type TakeSnapshot struct {
	// Contents: Contents of the image.
	Contents Base64 `json:"contents" yaml:"contents" schema:"contents,required"`
}

TakeSnapshot: The response from the `TakeSnapshot` command.

type TextToCad added in v0.2.29

type TextToCad struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	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 of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// ModelVersion: The version of the model.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
	// OutputFormat: The output format of the model.
	OutputFormat FileExportFormat `json:"output_format" yaml:"output_format" schema:"output_format,required"`
	// Outputs: The output of the model in the given file format the user requested, base64 encoded. The key of the map is the path of the output file.
	Outputs map[string]Base64 `json:"outputs" yaml:"outputs" schema:"outputs"`
	// Prompt: The prompt.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

TextToCad: A response from a text to CAD prompt.

type TextToCadCreateBody added in v0.2.29

type TextToCadCreateBody struct {
	// Prompt: The prompt for the model.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"`
}

TextToCadCreateBody: Body for generating models from text.

type TextToCadResultsPage added in v0.2.29

type TextToCadResultsPage struct {
	// Items: list of items on this page of results
	Items []TextToCad `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"`
}

TextToCadResultsPage: A single page of results

type Time added in v0.2.4

type Time struct {
	*time.Time
}

Time is a wrapper around time.Time which marshals to and from empty strings.

func TimeNow added in v0.2.4

func TimeNow() Time

TimeNow returns the current time.

func (Time) MarshalJSON added in v0.2.4

func (t Time) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (Time) String added in v0.2.4

func (t Time) String() string

func (*Time) UnmarshalJSON added in v0.2.4

func (t *Time) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

type URL added in v0.2.4

type URL struct {
	*url.URL
}

URL is a wrapper around url.URL which marshals to and from empty strings.

func (URL) MarshalJSON added in v0.2.4

func (u URL) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (URL) String added in v0.2.4

func (u URL) String() string

func (*URL) UnmarshalJSON added in v0.2.4

func (u *URL) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

type UUID added in v0.2.4

type UUID struct {
	*uuid.UUID
}

UUID is a wrapper around uuid.UUID which marshals to and from empty strings.

func ParseUUID added in v0.2.4

func ParseUUID(s string) UUID

ParseUUID parses a UUID from a string.

func (UUID) MarshalJSON added in v0.2.4

func (u UUID) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (UUID) String added in v0.2.4

func (u UUID) String() string

func (*UUID) UnmarshalJSON added in v0.2.4

func (u *UUID) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format.

type UnitAngle added in v0.2.17

type UnitAngle string

UnitAngle: The valid types of angle formats.

const (
	// UnitAngleDegrees: Degrees <https://en.wikipedia.org/wiki/Degree_(angle)>
	UnitAngleDegrees UnitAngle = "degrees"
	// UnitAngleRadians: Radians <https://en.wikipedia.org/wiki/Radian>
	UnitAngleRadians UnitAngle = "radians"
)

type UnitAngleConversion added in v0.2.5

type UnitAngleConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitAngle `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitAngle `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitAngleConversion: Result of converting between units.

type UnitArea added in v0.2.17

type UnitArea string

UnitArea: The valid types of area units.

const (
	// UnitAreaCm2: Square centimeters <https://en.wikipedia.org/wiki/Square_centimeter>
	UnitAreaCm2 UnitArea = "cm2"
	// UnitAreaDm2: Square decimeters <https://en.wikipedia.org/wiki/Square_decimeter>
	UnitAreaDm2 UnitArea = "dm2"
	// UnitAreaFt2: Square feet <https://en.wikipedia.org/wiki/Square_foot>
	UnitAreaFt2 UnitArea = "ft2"
	// UnitAreaIn2: Square inches <https://en.wikipedia.org/wiki/Square_inch>
	UnitAreaIn2 UnitArea = "in2"
	// UnitAreaKm2: Square kilometers <https://en.wikipedia.org/wiki/Square_kilometer>
	UnitAreaKm2 UnitArea = "km2"
	// UnitAreaM2: Square meters <https://en.wikipedia.org/wiki/Square_meter>
	UnitAreaM2 UnitArea = "m2"
	// UnitAreaMm2: Square millimeters <https://en.wikipedia.org/wiki/Square_millimeter>
	UnitAreaMm2 UnitArea = "mm2"
	// UnitAreaYd2: Square yards <https://en.wikipedia.org/wiki/Square_mile>
	UnitAreaYd2 UnitArea = "yd2"
)

type UnitAreaConversion added in v0.2.5

type UnitAreaConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitArea `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitAreaConversion: Result of converting between units.

type UnitCurrent added in v0.2.17

type UnitCurrent string

UnitCurrent: The valid types of current units.

const (
	// UnitCurrentAmperes: Amperes <https://en.wikipedia.org/wiki/Ampere>
	UnitCurrentAmperes UnitCurrent = "amperes"
	// UnitCurrentMicroamperes: Microamperes <https://en.wikipedia.org/wiki/Microampere>
	UnitCurrentMicroamperes UnitCurrent = "microamperes"
	// UnitCurrentMilliamperes: Milliamperes <https://en.wikipedia.org/wiki/Milliampere>
	UnitCurrentMilliamperes UnitCurrent = "milliamperes"
	// UnitCurrentNanoamperes: Nanoamperes <https://en.wikipedia.org/wiki/Nanoampere>
	UnitCurrentNanoamperes UnitCurrent = "nanoamperes"
)

type UnitCurrentConversion added in v0.2.17

type UnitCurrentConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitCurrent `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitCurrent `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitCurrentConversion: Result of converting between units.

type UnitDensity added in v0.2.19

type UnitDensity string

UnitDensity: The valid types for density units.

const (
	// UnitDensityLbft3: Pounds per cubic feet.
	UnitDensityLbft3 UnitDensity = "lb:ft3"
	// UnitDensityKgm3: Kilograms per cubic meter.
	UnitDensityKgm3 UnitDensity = "kg:m3"
)

type UnitEnergy added in v0.2.17

type UnitEnergy string

UnitEnergy: The valid types of energy units.

const (
	// UnitEnergyBtu: British Thermal Unit (BTU) <https://en.wikipedia.org/wiki/British_thermal_unit>
	UnitEnergyBtu UnitEnergy = "btu"
	// UnitEnergyElectronvolts: Electron Volts (eV) <https://en.wikipedia.org/wiki/Electronvolt>
	UnitEnergyElectronvolts UnitEnergy = "electronvolts"
	// UnitEnergyJoules: Joules (or watt-seconds) <https://en.wikipedia.org/wiki/Joule>
	UnitEnergyJoules UnitEnergy = "joules"
	// UnitEnergyKilocalories: Kilocalories (often just called calories) <https://en.wikipedia.org/wiki/Kilocalorie>
	UnitEnergyKilocalories UnitEnergy = "kilocalories"
	// UnitEnergyKilowattHours: Kilowatt hours (kWh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
	UnitEnergyKilowattHours UnitEnergy = "kilowatt_hours"
	// UnitEnergyWattHours: Watt hours (Wh) <https://en.wikipedia.org/wiki/Kilowatt-hour>
	UnitEnergyWattHours UnitEnergy = "watt_hours"
)

type UnitEnergyConversion added in v0.2.5

type UnitEnergyConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitEnergy `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitEnergy `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitEnergyConversion: Result of converting between units.

type UnitForce added in v0.2.17

type UnitForce string

UnitForce: The valid types of force units.

const (
	// UnitForceDynes: Dynes <https://en.wikipedia.org/wiki/Dyne>
	UnitForceDynes UnitForce = "dynes"
	// UnitForceKiloponds: Kiloponds <https://en.wikipedia.org/wiki/Kilopond>
	UnitForceKiloponds UnitForce = "kiloponds"
	// UnitForceMicronewtons: Micronewtons <https://en.wikipedia.org/wiki/Newton_(unit)>
	UnitForceMicronewtons UnitForce = "micronewtons"
	// UnitForceMillinewtons: Millinewtons <https://en.wikipedia.org/wiki/Newton_(unit)>
	UnitForceMillinewtons UnitForce = "millinewtons"
	// UnitForceNewtons: Newtons <https://en.wikipedia.org/wiki/Newton_(unit)>
	UnitForceNewtons UnitForce = "newtons"
	// UnitForcePoundals: Poundals <https://en.wikipedia.org/wiki/Poundal>
	UnitForcePoundals UnitForce = "poundals"
	// UnitForcePounds: Pounds <https://en.wikipedia.org/wiki/Pound_(force)>
	UnitForcePounds UnitForce = "pounds"
)

type UnitForceConversion added in v0.2.5

type UnitForceConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitForce `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitForce `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitForceConversion: Result of converting between units.

type UnitFrequency added in v0.2.17

type UnitFrequency string

UnitFrequency: The valid types of frequency units.

const (
	// UnitFrequencyGigahertz: Gigahertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyGigahertz UnitFrequency = "gigahertz"
	// UnitFrequencyHertz: Hertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyHertz UnitFrequency = "hertz"
	// UnitFrequencyKilohertz: Kilohertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyKilohertz UnitFrequency = "kilohertz"
	// UnitFrequencyMegahertz: Megahertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyMegahertz UnitFrequency = "megahertz"
	// UnitFrequencyMicrohertz: Microhertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyMicrohertz UnitFrequency = "microhertz"
	// UnitFrequencyMillihertz: Millihertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyMillihertz UnitFrequency = "millihertz"
	// UnitFrequencyNanohertz: Nanohertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyNanohertz UnitFrequency = "nanohertz"
	// UnitFrequencyTerahertz: Terahertz <https://en.wikipedia.org/wiki/Hertz>
	UnitFrequencyTerahertz UnitFrequency = "terahertz"
)

type UnitFrequencyConversion added in v0.2.17

type UnitFrequencyConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitFrequency `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitFrequency `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitFrequencyConversion: Result of converting between units.

type UnitLength added in v0.2.17

type UnitLength string

UnitLength: The valid types of length units.

const (
	// UnitLengthCm: Centimeters <https://en.wikipedia.org/wiki/Centimeter>
	UnitLengthCm UnitLength = "cm"
	// UnitLengthFt: Feet <https://en.wikipedia.org/wiki/Foot_(unit)>
	UnitLengthFt UnitLength = "ft"
	// UnitLengthIn: Inches <https://en.wikipedia.org/wiki/Inch>
	UnitLengthIn UnitLength = "in"
	// UnitLengthM: Meters <https://en.wikipedia.org/wiki/Meter>
	UnitLengthM UnitLength = "m"
	// UnitLengthMm: Millimeters <https://en.wikipedia.org/wiki/Millimeter>
	UnitLengthMm UnitLength = "mm"
	// UnitLengthYd: Yards <https://en.wikipedia.org/wiki/Yard>
	UnitLengthYd UnitLength = "yd"
)

type UnitLengthConversion added in v0.2.5

type UnitLengthConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitLength `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitLengthConversion: Result of converting between units.

type UnitMas added in v0.2.17

type UnitMas string

UnitMas: The valid types of mass units.

const (
	// UnitMasG: Grams <https://en.wikipedia.org/wiki/Gram>
	UnitMasG UnitMas = "g"
	// UnitMasKg: Kilograms <https://en.wikipedia.org/wiki/Kilogram>
	UnitMasKg UnitMas = "kg"
	// UnitMasLb: Pounds <https://en.wikipedia.org/wiki/Pound_(mass)>
	UnitMasLb UnitMas = "lb"
)

type UnitMassConversion added in v0.2.5

type UnitMassConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitMas `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitMas `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitMassConversion: Result of converting between units.

type UnitPower added in v0.2.17

type UnitPower string

UnitPower: The valid types of power units.

const (
	// UnitPowerBtuPerMinute: British thermal units (BTU) per minute <https://en.wikipedia.org/wiki/British_thermal_unit>
	UnitPowerBtuPerMinute UnitPower = "btu_per_minute"
	// UnitPowerHorsepower: Horsepower (hp) <https://en.wikipedia.org/wiki/Horsepower>
	UnitPowerHorsepower UnitPower = "horsepower"
	// UnitPowerKilowatts: Kilowatts <https://en.wikipedia.org/wiki/Kilowatt>
	UnitPowerKilowatts UnitPower = "kilowatts"
	// UnitPowerMetricHorsepower: Metric horsepower (PS) <https://en.wikipedia.org/wiki/Horsepower#Metric_horsepower>
	UnitPowerMetricHorsepower UnitPower = "metric_horsepower"
	// UnitPowerMicrowatts: Microwatts <https://en.wikipedia.org/wiki/Microwatt>
	UnitPowerMicrowatts UnitPower = "microwatts"
	// UnitPowerMilliwatts: Millwatts <https://en.wikipedia.org/wiki/Milliwatt>
	UnitPowerMilliwatts UnitPower = "milliwatts"
	// UnitPowerWatts: Watts <https://en.wikipedia.org/wiki/Watt>
	UnitPowerWatts UnitPower = "watts"
)

type UnitPowerConversion added in v0.2.5

type UnitPowerConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitPower `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitPower `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitPowerConversion: Result of converting between units.

type UnitPressure added in v0.2.17

type UnitPressure string

UnitPressure: The valid types of pressure units.

const (
	// UnitPressureAtmospheres: Atmospheres <https://en.wikipedia.org/wiki/Standard_atmosphere_(unit)>
	UnitPressureAtmospheres UnitPressure = "atmospheres"
	// UnitPressureBars: Bars <https://en.wikipedia.org/wiki/Bar_(unit)>
	UnitPressureBars UnitPressure = "bars"
	// UnitPressureHectopascals: Hectopascals <https://en.wikipedia.org/wiki/Hectopascal>
	UnitPressureHectopascals UnitPressure = "hectopascals"
	// UnitPressureKilopascals: Kilopascals <https://en.wikipedia.org/wiki/Kilopascal>
	UnitPressureKilopascals UnitPressure = "kilopascals"
	// UnitPressureMillibars: Millibars <https://en.wikipedia.org/wiki/Bar_(unit)>
	UnitPressureMillibars UnitPressure = "millibars"
	// UnitPressurePascals: Pascals <https://en.wikipedia.org/wiki/Pascal_(unit)>
	UnitPressurePascals UnitPressure = "pascals"
	// UnitPressurePsi: Pounds per square inch (PSI) - <https://en.wikipedia.org/wiki/Pound_per_square_inch>
	UnitPressurePsi UnitPressure = "psi"
)

type UnitPressureConversion added in v0.2.5

type UnitPressureConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitPressure `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitPressure `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitPressureConversion: Result of converting between units.

type UnitService added in v0.1.7

type UnitService service

UnitService: Unit conversion operations.

func (*UnitService) GetAngleConversion added in v0.2.5

func (s *UnitService) GetAngleConversion(inputUnit UnitAngle, outputUnit UnitAngle, value float64) (*UnitAngleConversion, error)

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

  • `inputUnit`: The valid types of angle formats.
  • `outputUnit`: The valid types of angle formats.
  • `value`
Example

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

  • `inputUnit`: The valid types of angle formats.
  • `outputUnit`: The valid types of angle formats.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetAngleConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetAreaConversion added in v0.2.5

func (s *UnitService) GetAreaConversion(inputUnit UnitArea, outputUnit UnitArea, value float64) (*UnitAreaConversion, error)

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

  • `inputUnit`: The valid types of area units.
  • `outputUnit`: The valid types of area units.
  • `value`
Example

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

  • `inputUnit`: The valid types of area units.
  • `outputUnit`: The valid types of area units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetAreaConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetCurrentConversion added in v0.2.17

func (s *UnitService) GetCurrentConversion(inputUnit UnitCurrent, outputUnit UnitCurrent, value float64) (*UnitCurrentConversion, error)

GetCurrentConversion: Convert current units. Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.

Parameters

  • `inputUnit`: The valid types of current units.
  • `outputUnit`: The valid types of current units.
  • `value`
Example

GetCurrentConversion: Convert current units. Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.

Parameters

  • `inputUnit`: The valid types of current units.
  • `outputUnit`: The valid types of current units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetCurrentConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetEnergyConversion added in v0.2.5

func (s *UnitService) GetEnergyConversion(inputUnit UnitEnergy, outputUnit UnitEnergy, value float64) (*UnitEnergyConversion, error)

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

  • `inputUnit`: The valid types of energy units.
  • `outputUnit`: The valid types of energy units.
  • `value`
Example

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

  • `inputUnit`: The valid types of energy units.
  • `outputUnit`: The valid types of energy units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetEnergyConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetForceConversion added in v0.2.5

func (s *UnitService) GetForceConversion(inputUnit UnitForce, outputUnit UnitForce, value float64) (*UnitForceConversion, error)

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

  • `inputUnit`: The valid types of force units.
  • `outputUnit`: The valid types of force units.
  • `value`
Example

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

  • `inputUnit`: The valid types of force units.
  • `outputUnit`: The valid types of force units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetForceConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetFrequencyConversion added in v0.2.17

func (s *UnitService) GetFrequencyConversion(inputUnit UnitFrequency, outputUnit UnitFrequency, value float64) (*UnitFrequencyConversion, error)

GetFrequencyConversion: Convert frequency units. Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.

Parameters

  • `inputUnit`: The valid types of frequency units.
  • `outputUnit`: The valid types of frequency units.
  • `value`
Example

GetFrequencyConversion: Convert frequency units. Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.

Parameters

  • `inputUnit`: The valid types of frequency units.
  • `outputUnit`: The valid types of frequency units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetFrequencyConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetLengthConversion added in v0.2.5

func (s *UnitService) GetLengthConversion(inputUnit UnitLength, outputUnit UnitLength, value float64) (*UnitLengthConversion, error)

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

  • `inputUnit`: The valid types of length units.
  • `outputUnit`: The valid types of length units.
  • `value`
Example

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

  • `inputUnit`: The valid types of length units.
  • `outputUnit`: The valid types of length units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetLengthConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetMassConversion added in v0.2.5

func (s *UnitService) GetMassConversion(inputUnit UnitMas, outputUnit UnitMas, value float64) (*UnitMassConversion, error)

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

  • `inputUnit`: The valid types of mass units.
  • `outputUnit`: The valid types of mass units.
  • `value`
Example

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

  • `inputUnit`: The valid types of mass units.
  • `outputUnit`: The valid types of mass units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetMassConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetPowerConversion added in v0.2.5

func (s *UnitService) GetPowerConversion(inputUnit UnitPower, outputUnit UnitPower, value float64) (*UnitPowerConversion, error)

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

  • `inputUnit`: The valid types of power units.
  • `outputUnit`: The valid types of power units.
  • `value`
Example

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

  • `inputUnit`: The valid types of power units.
  • `outputUnit`: The valid types of power units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetPowerConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetPressureConversion added in v0.2.5

func (s *UnitService) GetPressureConversion(inputUnit UnitPressure, outputUnit UnitPressure, value float64) (*UnitPressureConversion, error)

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

  • `inputUnit`: The valid types of pressure units.
  • `outputUnit`: The valid types of pressure units.
  • `value`
Example

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

  • `inputUnit`: The valid types of pressure units.
  • `outputUnit`: The valid types of pressure units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetPressureConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetTemperatureConversion added in v0.2.5

func (s *UnitService) GetTemperatureConversion(inputUnit UnitTemperature, outputUnit UnitTemperature, value float64) (*UnitTemperatureConversion, error)

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

  • `inputUnit`: The valid types of temperature units.
  • `outputUnit`: The valid types of temperature units.
  • `value`
Example

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

  • `inputUnit`: The valid types of temperature units.
  • `outputUnit`: The valid types of temperature units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetTemperatureConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetTorqueConversion added in v0.2.17

func (s *UnitService) GetTorqueConversion(inputUnit UnitTorque, outputUnit UnitTorque, value float64) (*UnitTorqueConversion, error)

GetTorqueConversion: Convert torque units. Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.

Parameters

  • `inputUnit`: The valid types of torque units.
  • `outputUnit`: The valid types of torque units.
  • `value`
Example

GetTorqueConversion: Convert torque units. Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.

Parameters

  • `inputUnit`: The valid types of torque units.
  • `outputUnit`: The valid types of torque units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetTorqueConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UnitService) GetVolumeConversion added in v0.2.5

func (s *UnitService) GetVolumeConversion(inputUnit UnitVolume, outputUnit UnitVolume, value float64) (*UnitVolumeConversion, error)

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

  • `inputUnit`: The valid types of volume units.
  • `outputUnit`: The valid types of volume units.
  • `value`
Example

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

  • `inputUnit`: The valid types of volume units.
  • `outputUnit`: The valid types of volume units.
  • `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.Unit.GetVolumeConversion("", "", 123.45)
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type UnitTemperature added in v0.2.17

type UnitTemperature string

UnitTemperature: The valid types of temperature units.

const (
	// UnitTemperatureCelsius: Celsius <https://en.wikipedia.org/wiki/Celsius>
	UnitTemperatureCelsius UnitTemperature = "celsius"
	// UnitTemperatureFahrenheit: Fahrenheit <https://en.wikipedia.org/wiki/Fahrenheit>
	UnitTemperatureFahrenheit UnitTemperature = "fahrenheit"
	// UnitTemperatureKelvin: Kelvin <https://en.wikipedia.org/wiki/Kelvin>
	UnitTemperatureKelvin UnitTemperature = "kelvin"
	// UnitTemperatureRankine: Rankine <https://en.wikipedia.org/wiki/Rankine_scale>
	UnitTemperatureRankine UnitTemperature = "rankine"
)

type UnitTemperatureConversion added in v0.2.5

type UnitTemperatureConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitTemperature `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitTemperature `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitTemperatureConversion: Result of converting between units.

type UnitTorque added in v0.2.17

type UnitTorque string

UnitTorque: The valid types of torque units.

const (
	// UnitTorqueNewtonMetres: Newton metres <https://en.wikipedia.org/wiki/Newton_metre>
	UnitTorqueNewtonMetres UnitTorque = "newton_metres"
	// UnitTorquePoundFoot: Pound foot <https://en.wikipedia.org/wiki/Pound-foot_(torque)>
	UnitTorquePoundFoot UnitTorque = "pound_foot"
)

type UnitTorqueConversion added in v0.2.17

type UnitTorqueConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitTorque `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitTorque `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitTorqueConversion: Result of converting between units.

type UnitVolume added in v0.2.17

type UnitVolume string

UnitVolume: The valid types of volume units.

const (
	// UnitVolumeCm3: Cubic centimeters (cc or cm³) <https://en.wikipedia.org/wiki/Cubic_centimeter>
	UnitVolumeCm3 UnitVolume = "cm3"
	// UnitVolumeFt3: Cubic feet (ft³) <https://en.wikipedia.org/wiki/Cubic_foot>
	UnitVolumeFt3 UnitVolume = "ft3"
	// UnitVolumeIn3: Cubic inches (cu in or in³) <https://en.wikipedia.org/wiki/Cubic_inch>
	UnitVolumeIn3 UnitVolume = "in3"
	// UnitVolumeM3: Cubic meters (m³) <https://en.wikipedia.org/wiki/Cubic_meter>
	UnitVolumeM3 UnitVolume = "m3"
	// UnitVolumeYd3: Cubic yards (yd³) <https://en.wikipedia.org/wiki/Cubic_yard>
	UnitVolumeYd3 UnitVolume = "yd3"
	// UnitVolumeUsfloz: US Fluid Ounces (fl oz) <https://en.wikipedia.org/wiki/Fluid_ounce>
	UnitVolumeUsfloz UnitVolume = "usfloz"
	// UnitVolumeUsgal: US Gallons (gal US) <https://en.wikipedia.org/wiki/Gallon>
	UnitVolumeUsgal UnitVolume = "usgal"
	// UnitVolumeL: Liters (l) <https://en.wikipedia.org/wiki/Litre>
	UnitVolumeL UnitVolume = "l"
	// UnitVolumeMl: Milliliters (ml) <https://en.wikipedia.org/wiki/Litre>
	UnitVolumeMl UnitVolume = "ml"
)

type UnitVolumeConversion added in v0.2.5

type UnitVolumeConversion struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The time and date the API call was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Error: The error the function returned, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// ID: The unique identifier of the API call.
	//
	// This is the same as the API call ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Input: The input value.
	Input float64 `json:"input" yaml:"input" schema:"input"`
	// InputUnit: The source format of the unit conversion.
	InputUnit UnitVolume `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
	// Output: The resulting value.
	Output float64 `json:"output" yaml:"output" schema:"output"`
	// OutputUnit: The output format of the unit conversion.
	OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// StartedAt: The time and date the API call was started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: The status of the API call.
	Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
	// 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 UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

UnitVolumeConversion: Result of converting between units.

type UpdateMemberToOrgBody added in v0.2.32

type UpdateMemberToOrgBody struct {
	// Role: The organization role to give the user.
	Role UserOrgRole `json:"role" yaml:"role" schema:"role,required"`
}

UpdateMemberToOrgBody: Data for updating a member of an org.

type UpdatePaymentBalance added in v0.2.33

type UpdatePaymentBalance struct {
	// MonthlyCreditsRemaining: The monthy credits remaining in the balance. This gets re-upped every month, but if the credits are not used for a month they do not carry over to the next month. It is a stable amount granted to the user per month.
	MonthlyCreditsRemaining float64 `json:"monthly_credits_remaining" yaml:"monthly_credits_remaining" schema:"monthly_credits_remaining"`
	// PrePayCashRemaining: The amount of pre-pay cash remaining in the balance. This number goes down as the user uses their pre-paid credits. The reason we track this amount is if a user ever wants to withdraw their pre-pay cash, we can use this amount to determine how much to give them. Say a user has $100 in pre-paid cash, their bill is worth, $50 after subtracting any other credits (like monthly etc.) Their bill is $50, their pre-pay cash remaining will be subtracted by 50 to pay the bill and their `pre_pay_credits_remaining` will be subtracted by 50 to pay the bill. This way if they want to withdraw money after, they can only withdraw $50 since that is the amount of cash they have remaining.
	PrePayCashRemaining float64 `json:"pre_pay_cash_remaining" yaml:"pre_pay_cash_remaining" schema:"pre_pay_cash_remaining"`
	// PrePayCreditsRemaining: The amount of credits remaining in the balance. This is typically the amount of cash * some multiplier they get for pre-paying their account. This number lowers every time a bill is paid with the balance. This number increases every time a user adds funds to their balance. This may be through a subscription or a one off payment.
	PrePayCreditsRemaining float64 `json:"pre_pay_credits_remaining" yaml:"pre_pay_credits_remaining" schema:"pre_pay_credits_remaining"`
}

UpdatePaymentBalance: The data for updating a balance.

type UpdateUser added in v0.1.4

type UpdateUser struct {
	// Company: The user's company.
	Company string `json:"company" yaml:"company" schema:"company"`
	// Discord: The user's Discord handle.
	Discord string `json:"discord" yaml:"discord" schema:"discord"`
	// FirstName: The user's first name.
	FirstName string `json:"first_name" yaml:"first_name" schema:"first_name"`
	// Github: The user's GitHub handle.
	Github string `json:"github" yaml:"github" schema:"github"`
	// Image: The image URL for the user. NOTE: If the user uses an OAuth2 provider, this will be overwritten by the provider's image URL when the user logs in next.
	Image URL `json:"image" yaml:"image" schema:"image,required"`
	// LastName: The user's last name.
	LastName string `json:"last_name" yaml:"last_name" schema:"last_name"`
	// Phone: The user's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
}

UpdateUser: The user-modifiable parts of a User.

type User added in v0.0.9

type User struct {
	// Block: If the user should be blocked and the reason why.
	Block BlockReason `json:"block" yaml:"block" schema:"block"`
	// CanTrainOnData: If we can train on the user's data. If the user is a member of an organization, the organization's setting will override this.
	CanTrainOnData bool `json:"can_train_on_data" yaml:"can_train_on_data" schema:"can_train_on_data"`
	// Company: The user's company.
	Company string `json:"company" yaml:"company" schema:"company"`
	// CreatedAt: The date and time the user was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Discord: The user's Discord handle.
	Discord string `json:"discord" yaml:"discord" schema:"discord"`
	// Email: The email address of the user.
	Email string `json:"email" yaml:"email" schema:"email"`
	// EmailVerified: The date and time the email address was verified.
	EmailVerified Time `json:"email_verified" yaml:"email_verified" schema:"email_verified"`
	// FirstName: The user's first name.
	FirstName string `json:"first_name" yaml:"first_name" schema:"first_name"`
	// Github: The user's GitHub handle.
	Github string `json:"github" yaml:"github" schema:"github"`
	// ID: The unique identifier for the user.
	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"`
	// IsServiceAccount: If the user is tied to a service account.
	IsServiceAccount bool `json:"is_service_account" yaml:"is_service_account" schema:"is_service_account"`
	// LastName: The user's last name.
	LastName string `json:"last_name" yaml:"last_name" schema:"last_name"`
	// Name: The name of the user. This is auto populated at first from the authentication provider (if there was a name). It can be updated by the user by updating their `first_name` and `last_name` fields.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The user's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
	// UpdatedAt: The date and time the user was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

User: A user.

type UserOrgInfo added in v0.2.32

type UserOrgInfo struct {
	// AllowUsersInDomainToAutoJoin: If we should allow all future users who are created with email addresses from this domain to join the org.
	AllowUsersInDomainToAutoJoin bool `` /* 127-byte string literal not displayed */
	// BillingEmail: The billing email address of the org.
	BillingEmail string `json:"billing_email" yaml:"billing_email" schema:"billing_email"`
	// BillingEmailVerified: The date and time the billing email address was verified.
	BillingEmailVerified Time `json:"billing_email_verified" yaml:"billing_email_verified" schema:"billing_email_verified"`
	// Block: If the org should be blocked and the reason why.
	Block BlockReason `json:"block" yaml:"block" schema:"block"`
	// CreatedAt: The date and time the org was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Domain: The org's domain.
	Domain string `json:"domain" yaml:"domain" schema:"domain"`
	// ID: The unique identifier for the org.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Image: The image for the org. This is a URL.
	Image URL `json:"image" yaml:"image" schema:"image"`
	// Name: The name of the org.
	Name string `json:"name" yaml:"name" schema:"name"`
	// Phone: The org's phone number.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
	// Role: The user's role in the org.
	Role OrgRole `json:"role" yaml:"role" schema:"role,required"`
	// StripeID: The org's stripe id.
	StripeID string `json:"stripe_id" yaml:"stripe_id" schema:"stripe_id"`
	// UpdatedAt: The date and time the org was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

UserOrgInfo: A user's information about an org, including their role.

type UserOrgRole added in v0.2.33

type UserOrgRole string

UserOrgRole: The roles for users in an organization.

const (
	// UserOrgRoleAdmin: Admins can do anything in the org.
	UserOrgRoleAdmin UserOrgRole = "admin"
	// UserOrgRoleMember: Members of an org can not modify an org, but they belong in the org.
	UserOrgRoleMember UserOrgRole = "member"
)

type UserResultsPage added in v0.1.0

type UserResultsPage struct {
	// Items: list of items on this page of results
	Items []User `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"`
}

UserResultsPage: A single page of results

type UserService added in v0.0.9

type UserService service

UserService: A user is someone who uses the Zoo API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.

func (*UserService) DeleteSelf added in v0.2.2

func (s *UserService) DeleteSelf() error

DeleteSelf: Delete your user. 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.

Example

DeleteSelf: Delete your user. 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.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

if err := client.User.DeleteSelf(); err != nil {
	panic(err)
}
Output:

func (*UserService) Get added in v0.0.9

func (s *UserService) Get(id string) (*User, 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 Zoo user, you must be a Zoo employee.

Parameters

  • `id`
Example

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 Zoo user, you must be a Zoo employee.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.Get("some-string")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetExtended added in v0.0.9

func (s *UserService) GetExtended(id string) (*ExtendedUser, error)

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 Zoo user, you must be a Zoo employee.

Parameters

  • `id`
Example

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 Zoo user, you must be a Zoo employee.

Parameters

  • `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetExtended("some-string")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetOauth2ProvidersFor added in v0.2.33

func (s *UserService) GetOauth2ProvidersFor() (*[]AccountProvider, error)

GetOauth2ProvidersFor: Get the OAuth2 providers for your user. If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication. This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.

Example

GetOauth2ProvidersFor: Get the OAuth2 providers for your user. If this returns an empty array, then the user has not connected any OAuth2 providers and uses raw email authentication. This endpoint requires authentication by any Zoo user. It gets the providers for the authenticated user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetOauth2ProvidersFor()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetOnboardingSelf added in v0.2.8

func (s *UserService) GetOnboardingSelf() (*Onboarding, error)

GetOnboardingSelf: Get your user's onboarding status. Checks key part of their api usage to determine their onboarding progress

Example

GetOnboardingSelf: Get your user's onboarding status. Checks key part of their api usage to determine their onboarding progress

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetOnboardingSelf()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetPrivacySettings added in v0.2.33

func (s *UserService) GetPrivacySettings() (*PrivacySettings, error)

GetPrivacySettings: Get the privacy settings for a user. This endpoint requires authentication by any Zoo user. It gets the privacy settings for the user.

Example

GetPrivacySettings: Get the privacy settings for a user. This endpoint requires authentication by any Zoo user. It gets the privacy settings for the user.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetPrivacySettings()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetSelf added in v0.0.9

func (s *UserService) GetSelf() (*User, error)

GetSelf: Get your user. Get the user information for the authenticated user. Alternatively, you can also use the `/users/me` endpoint.

Example

GetSelf: Get your user. Get the user information for the authenticated user. Alternatively, you can also use the `/users/me` endpoint.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetSelf()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetSelfExtended added in v0.0.9

func (s *UserService) GetSelfExtended() (*ExtendedUser, 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.

Example

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.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetSelfExtended()
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) GetSessionFor added in v0.2.14

func (s *UserService) GetSessionFor(token UUID) (*Session, error)

GetSessionFor: Get a session for your user. This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.

Parameters

  • `token`
Example

GetSessionFor: Get a session for your user. This endpoint requires authentication by any Zoo user. It returns details of the requested API token for the user.

Parameters

  • `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.GetSessionFor(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) List added in v0.0.9

func (s *UserService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*UserResultsPage, error)

List: List users. This endpoint requires authentication by a Zoo 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.

    Currently, we only support scanning in ascending order.

Example

List: List users. This endpoint requires authentication by a Zoo 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.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.List(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) ListExtended added in v0.0.9

func (s *UserService) ListExtended(limit int, pageToken string, sortBy CreatedAtSortMode) (*ExtendedUserResultsPage, error)

ListExtended: List users with extended information. This endpoint requires authentication by a Zoo 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.

    Currently, we only support scanning in ascending order.

Example

ListExtended: List users with extended information. This endpoint requires authentication by a Zoo 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.

    Currently, we only support scanning in ascending order.

client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.ListExtended(123, "some-string", "")
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) UpdatePrivacySettings added in v0.2.33

func (s *UserService) UpdatePrivacySettings(body PrivacySettings) (*PrivacySettings, error)

UpdatePrivacySettings: Update the user's privacy settings. This endpoint requires authentication by any Zoo user. It updates the privacy settings for the user.

Parameters

  • `body`: Privacy settings for an org or user.
Example

UpdatePrivacySettings: Update the user's privacy settings. This endpoint requires authentication by any Zoo user. It updates the privacy settings for the user.

Parameters

  • `body`: Privacy settings for an org or user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.UpdatePrivacySettings(kittycad.PrivacySettings{CanTrainOnData: true})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

func (*UserService) UpdateSelf added in v0.1.4

func (s *UserService) UpdateSelf(body UpdateUser) (*User, error)

UpdateSelf: Update your user. This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.

Parameters

  • `body`: The user-modifiable parts of a User.
Example

UpdateSelf: Update your user. This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.

Parameters

  • `body`: The user-modifiable parts of a User.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
	panic(err)
}

result, err := client.User.UpdateSelf(kittycad.UpdateUser{Company: "some-string", Discord: "some-string", FirstName: "some-string", Github: "some-string", Image: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, LastName: "some-string", Phone: "+1-555-555-555"})
if err != nil {
	panic(err)
}

fmt.Printf("%#v", result)
Output:

type VerificationTokenResponse added in v0.2.33

type VerificationTokenResponse struct {
	// CreatedAt: The date and time the verification token was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// 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 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"`
	// SamlRedirectUrl: The URL to redirect to if the user requires SAML authentication.
	SamlRedirectUrl URL `json:"saml_redirect_url" yaml:"saml_redirect_url" schema:"saml_redirect_url"`
	// UpdatedAt: The date and time the verification token was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

VerificationTokenResponse: A verification token response.

type Volume added in v0.2.28

type Volume struct {
	// OutputUnit: The output unit for the volume.
	OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
	// Volume: The volume.
	Volume float64 `json:"volume" yaml:"volume" schema:"volume,required"`
}

Volume: The volume response.

type WebSocketRequestCandidate added in v0.2.27

type WebSocketRequestCandidate struct {
	// Candidate: Information about the ICE candidate.
	Candidate RtcIceCandidateInit `json:"candidate" yaml:"candidate" schema:"candidate,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestCandidate: The trickle ICE candidate request.

type WebSocketRequestCmd added in v0.2.28

type WebSocketRequestCmd struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestCmd: The client-to-server Ping to ensure the WebSocket stays alive.

type WebSocketRequestCmdID added in v0.2.29

type WebSocketRequestCmdID struct {
	// Metrics: Collected metrics from the Client's end of the engine connection.
	Metrics ClientMetrics `json:"metrics" yaml:"metrics" schema:"metrics,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestCmdID: The response to a metrics collection request from the server.

type WebSocketRequestOffer added in v0.2.27

type WebSocketRequestOffer struct {
	// Cmd: Which command to submit to the Kittycad engine.
	Cmd any `json:"cmd" yaml:"cmd" schema:"cmd,required"`
	// CmdID: ID of command being submitted.
	CmdID UUID `json:"cmd_id" yaml:"cmd_id" schema:"cmd_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestOffer: The modeling command request.

type WebSocketRequestSdpOffer added in v0.2.27

type WebSocketRequestSdpOffer struct {
	// BatchID: ID of batch being submitted. Each request has their own individual ModelingCmdId, but this is the ID of the overall batch.
	BatchID UUID `json:"batch_id" yaml:"batch_id" schema:"batch_id,required"`
	// Requests: A sequence of modeling requests. If any request fails, following requests will not be tried.
	Requests []ModelingCmdReq `json:"requests" yaml:"requests" schema:"requests,required"`
	// Responses: If false or omitted, responses to each batch command will just be Ok(()). If true, responses will be the actual response data for that modeling command.
	Responses bool `json:"responses" yaml:"responses" schema:"responses"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestSdpOffer: A sequence of modeling requests. If any request fails, following requests will not be tried.

type WebSocketRequestTrickleIce added in v0.2.27

type WebSocketRequestTrickleIce struct {
	// Offer: The session description.
	Offer RtcSessionDescription `json:"offer" yaml:"offer" schema:"offer,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestTrickleIce: The SDP offer request.

type ZooProductSubscription added in v0.2.33

type ZooProductSubscription struct {
	// Description: A description of the tier.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// Features: Features that are included in the subscription.
	Features []SubscriptionTierFeature `json:"features" yaml:"features" schema:"features"`
	// Name: The name of the tier.
	Name ModelingAppSubscriptionTierName `json:"name" yaml:"name" schema:"name,required"`
	// PayAsYouGoCredits: The amount of pay-as-you-go credits the individual or org gets outside the modeling app.
	PayAsYouGoCredits float64 `json:"pay_as_you_go_credits" yaml:"pay_as_you_go_credits" schema:"pay_as_you_go_credits,required"`
	// Price: The price of the tier per month. If this is for an individual, this is the price they pay. If this is for an organization, this is the price the organization pays per member in the org. This is in USD.
	Price any `json:"price" yaml:"price" schema:"price,required"`
	// SupportTier: The support tier the subscription provides.
	SupportTier SupportTier `json:"support_tier" yaml:"support_tier" schema:"support_tier,required"`
	// TrainingDataBehavior: The behavior of the users data (can it be used for training, etc).
	TrainingDataBehavior SubscriptionTrainingDataBehavior `json:"training_data_behavior" yaml:"training_data_behavior" schema:"training_data_behavior,required"`
	// Type: If the tier is offered for an individual or an org.
	Type any `json:"type" yaml:"type" schema:"type,required"`
	// ZooToolsIncluded: The Zoo tools that you can call unlimited times with this tier.
	ZooToolsIncluded []ZooTool `json:"zoo_tools_included" yaml:"zoo_tools_included" schema:"zoo_tools_included"`
}

ZooProductSubscription: A subscription to the modeling app.

type ZooProductSubscriptions added in v0.2.33

type ZooProductSubscriptions struct {
	// ModelingApp: A modeling app subscription.
	ModelingApp ModelingAppSubscriptionTier `json:"modeling_app" yaml:"modeling_app" schema:"modeling_app,required"`
}

ZooProductSubscriptions: A struct of Zoo product subscriptions.

type ZooProductSubscriptionsOrgRequest added in v0.2.33

type ZooProductSubscriptionsOrgRequest struct {
	// ModelingApp: A modeling app subscription.
	ModelingApp ModelingAppOrganizationSubscriptionTier `json:"modeling_app" yaml:"modeling_app" schema:"modeling_app"`
}

ZooProductSubscriptionsOrgRequest: A struct of Zoo product subscriptions an organization can request.

type ZooProductSubscriptionsUserRequest added in v0.2.33

type ZooProductSubscriptionsUserRequest struct {
	// ModelingApp: A modeling app subscription.
	ModelingApp ModelingAppIndividualSubscriptionTier `json:"modeling_app" yaml:"modeling_app" schema:"modeling_app"`
}

ZooProductSubscriptionsUserRequest: A struct of Zoo product subscriptions a user can request.

type ZooTool added in v0.2.33

type ZooTool string

ZooTool: The Zoo tools that can make API calls.

const (
	// ZooToolModelingApp: The modeling app.
	ZooToolModelingApp ZooTool = "modeling_app"
	// ZooToolTextToCad: The Text-to-CAD UI.
	ZooToolTextToCad ZooTool = "text_to_cad"
	// ZooToolDiffChromeExtension: The Diff Chrome Extension.
	ZooToolDiffChromeExtension ZooTool = "diff_chrome_extension"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL