kittycad

package module
v0.2.45 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: MIT Imports: 19 Imported by: 10

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 (
	// MlCopilotModeFast preserves the legacy SDK name.
	//
	// Deprecated: Discover available mode strings through list_modes.
	MlCopilotModeFast = "fast"
	// MlCopilotModeThoughtful preserves the legacy SDK name.
	//
	// Deprecated: Discover available mode strings through list_modes.
	MlCopilotModeThoughtful = "thoughtful"
	// MlCopilotModeAuto preserves the legacy SDK name.
	//
	// Deprecated: Discover available mode strings through list_modes.
	MlCopilotModeAuto = "auto"
	// MlCopilotModeZookeeperPro preserves the legacy SDK name.
	//
	// Deprecated: Discover available mode strings through list_modes.
	MlCopilotModeZookeeperPro = "zookeeper_pro"
	// MlCopilotModeZookeeperUltra preserves the legacy SDK name.
	//
	// Deprecated: Discover available mode strings through list_modes.
	MlCopilotModeZookeeperUltra = "zookeeper_ultra"
)
View Source
const DefaultServerURL = "https://api.zoo.dev"

DefaultServerURL is the default server URL for the KittyCad API.

View Source
const TokenEnvVar = "ZOO_API_TOKEN"

TokenEnvVar is the environment variable that contains the token.

Variables

This section is empty.

Functions

This section is empty.

Types

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*APICallService) GetAsyncOperation added in v0.1.4

func (s *APICallService) GetAsyncOperation(id UUID) (*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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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"`
	// 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"`
	// RequestQueryParams: The request query params sent by the API call.
	RequestQueryParams string `json:"request_query_params" yaml:"request_query_params" schema:"request_query_params"`
	// Seconds: The number of seconds the API call was billed for.
	Seconds int `json:"seconds" yaml:"seconds" schema:"seconds"`
	// 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 APIEndpoint added in v0.2.41

type APIEndpoint string

APIEndpoint: Types of API endpoints.

const (
	// APIendpointModeling: The modeling API.
	APIendpointModeling APIEndpoint = "modeling"
	// APIendpointMl: Machine learning API.
	APIendpointMl APIEndpoint = "ml"
	// APIendpointFile: File API.
	APIendpointFile APIEndpoint = "file"
)

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. Note: This is partially obfuscated when serialized to JSON responses, as API tokens are too sensitive to return in full. Only the last 4 characters are shown to allow users to identify their tokens.
	Token string `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) (*APITokenWithFullToken, 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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*APITokenService) DeleteForUser added in v0.0.9

func (s *APITokenService) DeleteForUser(token string) 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.

The token path parameter can be either the full API token (prefixed with `api-`) or the token's unique ID (a UUID).

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.

The token path parameter can be either the full API token (prefixed with `api-`) or the token's unique ID (a UUID).

Parameters

  • `token`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.APIToken.DeleteForUser("some-string"); err != nil {
		panic(err)
	}

}

func (*APITokenService) GetForUser added in v0.0.9

func (s *APITokenService) GetForUser(token string) (*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`: An auth token. A uuid with a prefix of api-
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`: An auth token. A uuid with a prefix of api-
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

type APITokenWithFullToken added in v0.2.44

type APITokenWithFullToken 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.
	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 - unobfuscated.
	Token string `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"`
}

APITokenWithFullToken: An API token with the full, unobfuscated token value. This is used specifically for the creation endpoint response, where the user needs to see the full token exactly once. All other endpoints return the obfuscated version via the `ApiToken` struct.

type AccessDenied added in v0.2.44

type AccessDenied struct {
	// Code: Stable machine-readable denial code.
	Code MlCopilotAccessDeniedCode `json:"code" yaml:"code" schema:"code,required"`
	// Detail: Human-readable explanation suitable for display to the user.
	Detail string `json:"detail" yaml:"detail" schema:"detail,required"`
	// Retryable: Whether reconnecting without an external account change can help.
	Retryable bool `json:"retryable" yaml:"retryable" schema:"retryable,required"`
}

AccessDenied is the type definition for a AccessDenied.

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"
	// AccountProviderZooCorp: The ZooCorp account provider (aka https://auth.corp.zoo.dev).
	AccountProviderZooCorp AccountProvider = "zoo_corp"
	// AccountProviderGithub: The GitHub account provider.
	AccountProviderGithub AccountProvider = "github"
	// AccountProviderMicrosoft: The Microsoft account provider.
	AccountProviderMicrosoft AccountProvider = "microsoft"
	// AccountProviderSaml: The SAML account provider.
	AccountProviderSaml AccountProvider = "saml"
	// AccountProviderTestProvider: Test provider for integration tests (only available during testing).
	AccountProviderTestProvider AccountProvider = "test_provider"
)

type AddHoleFromOffset added in v0.2.40

type AddHoleFromOffset struct {
	// EntityIds: If the offset path splits into multiple paths, this will contain the UUIDs of the new paths. If the offset path remains as a single path, this will be empty, and the resulting ID of the (single) new path will be the ID of the `AddHoleFromOffset` command.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

AddHoleFromOffset: The response from the `AddHoleFromOffset` command.

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 AdjacencyInfo added in v0.2.41

type AdjacencyInfo struct {
	// AdjacentInfo: Next adjacent edge and face info.
	AdjacentInfo EdgeInfo `json:"adjacent_info" yaml:"adjacent_info" schema:"adjacent_info"`
	// OppositeInfo: Opposite edge and face info.
	OppositeInfo EdgeInfo `json:"opposite_info" yaml:"opposite_info" schema:"opposite_info"`
	// OriginalInfo: Original edge id and face info.
	OriginalInfo EdgeInfo `json:"original_info" yaml:"original_info" schema:"original_info"`
	// PreviousAdjacentInfo: Previous adjacent edge and face info.
	PreviousAdjacentInfo EdgeInfo `json:"previous_adjacent_info" yaml:"previous_adjacent_info" schema:"previous_adjacent_info"`
}

AdjacencyInfo: Edge info struct (useful for maintaining mappings between edges and faces and adjacent/opposite edges).

type AdminBounds added in v0.2.44

type AdminBounds struct {
	// MaximumAmount:
	MaximumAmount float64 `json:"maximum_amount" yaml:"maximum_amount" schema:"maximum_amount,required"`
	// MinimumAmount:
	MinimumAmount float64 `json:"minimum_amount" yaml:"minimum_amount" schema:"minimum_amount,required"`
}

AdminBounds: Inclusive amount bounds for a threshold authority.

type AggregateUsageCollectionThresholdBounds added in v0.2.44

type AggregateUsageCollectionThresholdBounds struct {
	// MaximumAmount:
	MaximumAmount float64 `json:"maximum_amount" yaml:"maximum_amount" schema:"maximum_amount,required"`
	// MinimumAmount:
	MinimumAmount float64 `json:"minimum_amount" yaml:"minimum_amount" schema:"minimum_amount,required"`
}

AggregateUsageCollectionThresholdBounds: Inclusive amount bounds for a threshold authority.

type AggregateUsageCollectionThresholdSet added in v0.2.44

type AggregateUsageCollectionThresholdSet struct {
	// Amount:
	Amount float64 `json:"amount" yaml:"amount" schema:"amount,required"`
	// ExpectedVersion: Version returned by the read that this mutation is based on.
	ExpectedVersion int `json:"expected_version" yaml:"expected_version" schema:"expected_version,required"`
}

AggregateUsageCollectionThresholdSet: An explicit collection-threshold value to configure for an account.

type AggregateUsageCollectionThresholdSource added in v0.2.44

type AggregateUsageCollectionThresholdSource string

AggregateUsageCollectionThresholdSource: Precedence source that determines an account's effective threshold.

const (
	// AggregateUsageCollectionThresholdSourceAdmin represents the AggregateUsageCollectionThresholdSource `"admin"`.
	AggregateUsageCollectionThresholdSourceAdmin AggregateUsageCollectionThresholdSource = "admin"
	// AggregateUsageCollectionThresholdSourceCustomer represents the AggregateUsageCollectionThresholdSource `"customer"`.
	AggregateUsageCollectionThresholdSourceCustomer AggregateUsageCollectionThresholdSource = "customer"
	// AggregateUsageCollectionThresholdSourceSystemDefault represents the AggregateUsageCollectionThresholdSource `"system_default"`.
	AggregateUsageCollectionThresholdSourceSystemDefault AggregateUsageCollectionThresholdSource = "system_default"
)

type AggregateUsageCollectionThresholdView added in v0.2.44

type AggregateUsageCollectionThresholdView struct {
	// AdminAmount: Zoo-controlled override. When present, customer mutations are disabled.
	AdminAmount float64 `json:"admin_amount" yaml:"admin_amount" schema:"admin_amount"`
	// AdminBounds: Inclusive amount bounds for a threshold authority.
	AdminBounds AggregateUsageCollectionThresholdBounds `json:"admin_bounds" yaml:"admin_bounds" schema:"admin_bounds,required"`
	// CustomerAmount: Customer preference used when no Zoo-controlled override is active.
	CustomerAmount float64 `json:"customer_amount" yaml:"customer_amount" schema:"customer_amount"`
	// CustomerBounds: Inclusive amount bounds for a threshold authority.
	CustomerBounds AggregateUsageCollectionThresholdBounds `json:"customer_bounds" yaml:"customer_bounds" schema:"customer_bounds,required"`
	// DefaultAmount:
	DefaultAmount float64 `json:"default_amount" yaml:"default_amount" schema:"default_amount,required"`
	// EffectiveAmount:
	EffectiveAmount float64 `json:"effective_amount" yaml:"effective_amount" schema:"effective_amount,required"`
	// Source: Precedence source that determines an account's effective threshold.
	Source AggregateUsageCollectionThresholdSource `json:"source" yaml:"source" schema:"source,required"`
	// Version: Monotonic version of the account's append-only threshold history.
	Version int `json:"version" yaml:"version" schema:"version,required"`
}

AggregateUsageCollectionThresholdView: Configured and effective aggregate-usage collection-threshold state.

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 AnnotationBasicDimension added in v0.2.42

type AnnotationBasicDimension struct {
	// ArrowScale: The scale of the dimension arrows. Defaults to 1.
	ArrowScale float64 `json:"arrow_scale" yaml:"arrow_scale" schema:"arrow_scale"`
	// Dimension: Basic dimension parameters (symbol and tolerance)
	Dimension AnnotationMbdBasicDimension `json:"dimension" yaml:"dimension" schema:"dimension,required"`
	// FontPointSize: The point size of the fonts used to generate the annotation label.  Very large values can negatively affect performance.
	FontPointSize int `json:"font_point_size" yaml:"font_point_size" schema:"font_point_size,required"`
	// FontScale: The scale of the font label in 3D space
	FontScale float64 `json:"font_scale" yaml:"font_scale" schema:"font_scale,required"`
	// FromEdgeReference: Edge reference to use to measure the dimension from If both `from_entity_id` and `from_edge_reference` are provided, `from_edge_reference` takes precedence.
	FromEdgeReference EdgeSpecifier `json:"from_edge_reference" yaml:"from_edge_reference" schema:"from_edge_reference"`
	// FromEntityID: Entity to measure the dimension from
	FromEntityID UUID `json:"from_entity_id" yaml:"from_entity_id" schema:"from_entity_id"`
	// FromEntityLeaderPos: Position within the entity to position the dimension leader from
	FromEntityLeaderPos any `json:"from_entity_leader_pos" yaml:"from_entity_leader_pos" schema:"from_entity_leader_pos"`
	// FromEntityPos: Normalized position within the entity to position the dimension from Deprecated; please use `from_entity_leader_pos`
	FromEntityPos Point2D `json:"from_entity_pos" yaml:"from_entity_pos" schema:"from_entity_pos"`
	// Offset: 2D Position offset of the annotation within the plane.
	Offset Point2D `json:"offset" yaml:"offset" schema:"offset,required"`
	// PlaneID: Orientation plane.  The annotation will lie in this plane which is positioned about the leader position as its origin.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// Precision: Number of decimal places to use when displaying tolerance and dimension values
	Precision int `json:"precision" yaml:"precision" schema:"precision,required"`
	// ToEdgeReference: Edge reference to use to measure the dimension from If both `to_entity_id` and `to_edge_reference` are provided, `to_edge_reference` takes precedence.
	ToEdgeReference EdgeSpecifier `json:"to_edge_reference" yaml:"to_edge_reference" schema:"to_edge_reference"`
	// ToEntityID: Entity to measure the dimension to
	ToEntityID UUID `json:"to_entity_id" yaml:"to_entity_id" schema:"to_entity_id"`
	// ToEntityLeaderPos: Position within the entity to position the dimension leader from
	ToEntityLeaderPos any `json:"to_entity_leader_pos" yaml:"to_entity_leader_pos" schema:"to_entity_leader_pos"`
	// ToEntityPos: Normalized position within the entity to position the dimension to Deprecated; please use `to_entity_leader_pos`
	ToEntityPos Point2D `json:"to_entity_pos" yaml:"to_entity_pos" schema:"to_entity_pos"`
}

AnnotationBasicDimension: Parameters for defining an MBD Basic Dimension Annotation state which is measured between two positions in 3D

type AnnotationFeatureControl added in v0.2.42

type AnnotationFeatureControl struct {
	// ControlFrame: MBD Control frame for geometric control
	ControlFrame AnnotationMbdControlFrame `json:"control_frame" yaml:"control_frame" schema:"control_frame"`
	// DefinedDatum: Set if this annotation is defining a datum
	DefinedDatum string `json:"defined_datum" yaml:"defined_datum" schema:"defined_datum"`
	// Dimension: Basic dimensions
	Dimension AnnotationMbdBasicDimension `json:"dimension" yaml:"dimension" schema:"dimension"`
	// EdgeReference: Edge reference to use to place the annotation leader from If both `entity_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeReference EdgeSpecifier `json:"edge_reference" yaml:"edge_reference" schema:"edge_reference"`
	// EntityID: Entity to place the annotation leader from
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"`
	// EntityLeaderPos: Position within the entity to position the annotation leader from
	EntityLeaderPos any `json:"entity_leader_pos" yaml:"entity_leader_pos" schema:"entity_leader_pos"`
	// EntityPos: Normalized position within the entity to position the annotation leader from Deprecated; please use `entity_leader_pos`
	EntityPos Point2D `json:"entity_pos" yaml:"entity_pos" schema:"entity_pos"`
	// FontPointSize: The point size of the fonts used to generate the annotation label.  Very large values can negatively affect performance.
	FontPointSize int `json:"font_point_size" yaml:"font_point_size" schema:"font_point_size,required"`
	// FontScale: The scale of the font label in 3D space
	FontScale float64 `json:"font_scale" yaml:"font_scale" schema:"font_scale,required"`
	// LeaderScale: The scale of the leader (dot or arrow). Defaults to 1.
	LeaderScale float64 `json:"leader_scale" yaml:"leader_scale" schema:"leader_scale"`
	// LeaderType: Type of leader to use
	LeaderType AnnotationLineEnd `json:"leader_type" yaml:"leader_type" schema:"leader_type,required"`
	// Offset: 2D Position offset of the annotation within the plane.
	Offset Point2D `json:"offset" yaml:"offset" schema:"offset,required"`
	// PlaneID: Orientation plane.  The annotation will lie in this plane which is positioned about the leader position as its origin.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// Precision: Number of decimal places to use when displaying tolerance and dimension values
	Precision int `json:"precision" yaml:"precision" schema:"precision,required"`
	// Prefix: Prefix text which will appear before the basic dimension
	Prefix string `json:"prefix" yaml:"prefix" schema:"prefix"`
	// Suffix: Suffix text which will appear after the basic dimension
	Suffix string `json:"suffix" yaml:"suffix" schema:"suffix"`
}

AnnotationFeatureControl: Parameters for defining an MBD Feature Control Annotation state

type AnnotationFeatureTag added in v0.2.42

type AnnotationFeatureTag struct {
	// EdgeReference: Edge reference to use to place the annotation leader from If both `entity_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeReference EdgeSpecifier `json:"edge_reference" yaml:"edge_reference" schema:"edge_reference"`
	// EntityID: Entity to place the annotation leader from
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"`
	// EntityLeaderPos: Position within the entity to position the annotation leader from
	EntityLeaderPos any `json:"entity_leader_pos" yaml:"entity_leader_pos" schema:"entity_leader_pos"`
	// EntityPos: Normalized position within the entity to position the annotation leader from Deprecated; please use `entity_leader_pos`
	EntityPos Point2D `json:"entity_pos" yaml:"entity_pos" schema:"entity_pos"`
	// FontPointSize: The point size of the fonts used to generate the annotation label.  Very large values can negatively affect performance.
	FontPointSize int `json:"font_point_size" yaml:"font_point_size" schema:"font_point_size,required"`
	// FontScale: The scale of the font label in 3D space
	FontScale float64 `json:"font_scale" yaml:"font_scale" schema:"font_scale,required"`
	// Key: Tag key
	Key string `json:"key" yaml:"key" schema:"key,required"`
	// LeaderScale: The scale of the leader (dot or arrow). Defaults to 1.
	LeaderScale float64 `json:"leader_scale" yaml:"leader_scale" schema:"leader_scale"`
	// LeaderType: Type of leader to use
	LeaderType AnnotationLineEnd `json:"leader_type" yaml:"leader_type" schema:"leader_type,required"`
	// Offset: 2D Position offset of the annotation within the plane.
	Offset Point2D `json:"offset" yaml:"offset" schema:"offset,required"`
	// PlaneID: Orientation plane.  The annotation will lie in this plane which is positioned about the leader position as its origin.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// ShowKey: Whether or not to display the key on the annotation label
	ShowKey bool `json:"show_key" yaml:"show_key" schema:"show_key,required"`
	// Value: Tag value
	Value string `json:"value" yaml:"value" schema:"value,required"`
}

AnnotationFeatureTag: Parameters for defining an MBD Feature Tag Annotation state

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"
	// AnnotationLineEndDot represents the AnnotationLineEnd `"dot"`.
	AnnotationLineEndDot AnnotationLineEnd = "dot"
)

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 AnnotationMbdBasicDimension added in v0.2.42

type AnnotationMbdBasicDimension struct {
	// Dimension: The explicitly defined dimension. Only required if the measurement is not automatically calculated.
	Dimension float64 `json:"dimension" yaml:"dimension" schema:"dimension"`
	// Symbol: Type of symbol to use for this dimension (if required)
	Symbol MbdSymbol `json:"symbol" yaml:"symbol" schema:"symbol"`
	// Tolerance: The tolerance of the dimension
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance"`
}

AnnotationMbdBasicDimension: Parameters for defining an MBD basic dimension

type AnnotationMbdControlFrame added in v0.2.42

type AnnotationMbdControlFrame struct {
	// DiameterSymbol: Diameter symbol (if required) whether the geometric control requires a cylindrical or diameter tolerance
	DiameterSymbol MbdSymbol `json:"diameter_symbol" yaml:"diameter_symbol" schema:"diameter_symbol"`
	// Modifier: Feature of size or tolerance modifiers
	Modifier MbdSymbol `json:"modifier" yaml:"modifier" schema:"modifier"`
	// PrimaryDatum: Primary datum
	PrimaryDatum string `json:"primary_datum" yaml:"primary_datum" schema:"primary_datum"`
	// SecondaryDatum: Secondary datum
	SecondaryDatum string `json:"secondary_datum" yaml:"secondary_datum" schema:"secondary_datum"`
	// Symbol: Geometric symbol, the type of geometric control specified
	Symbol MbdSymbol `json:"symbol" yaml:"symbol" schema:"symbol,required"`
	// TertiaryDatum: Tertiary datum
	TertiaryDatum string `json:"tertiary_datum" yaml:"tertiary_datum" schema:"tertiary_datum"`
	// Tolerance: Tolerance value - the total tolerance of the geometric control. The unit is based on the drawing standard.
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
}

AnnotationMbdControlFrame: Parameters for defining an MBD Geometric control frame

type AnnotationMbdLeaderPosition added in v0.2.44

type AnnotationMbdLeaderPosition any

AnnotationMbdLeaderPosition: AnnotationMbdLeaderPosition: Parameters for defining a specific MBD Leader Position within an Entity

type AnnotationMbdLeaderPositionCentroid added in v0.2.44

type AnnotationMbdLeaderPositionCentroid struct {
	// Centroid:
	Centroid map[string]any `json:"centroid" yaml:"centroid" schema:"centroid,required"`
}

AnnotationMbdLeaderPositionCentroid: Geometric Center of the entity (such as on the center axis for a cylinder)

type AnnotationMbdLeaderPositionNormalizedPos added in v0.2.44

type AnnotationMbdLeaderPositionNormalizedPos struct {
	// NormalizedPos:
	NormalizedPos NormalizedPos `json:"normalized_pos" yaml:"normalized_pos" schema:"normalized_pos,required"`
}

AnnotationMbdLeaderPositionNormalizedPos: Normalized position within the entity to position the annotation leader from

type AnnotationOptions added in v0.2.22

type AnnotationOptions struct {
	// Color: Color to render the annotation
	Color Color `json:"color" yaml:"color" schema:"color"`
	// Dimension: Set as an MBD measured basic dimension annotation
	Dimension AnnotationBasicDimension `json:"dimension" yaml:"dimension" schema:"dimension"`
	// FeatureControl: Set as an MBD Feature control annotation
	FeatureControl AnnotationFeatureControl `json:"feature_control" yaml:"feature_control" schema:"feature_control"`
	// FeatureTag: Set as a feature tag annotation
	FeatureTag AnnotationFeatureTag `json:"feature_tag" yaml:"feature_tag" schema:"feature_tag"`
	// 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"`
	// Name: Human-friendly identifier for this annotation. Included in some exports and metadata of the model. This is _not_ displayed visually in, the annotation, it's only metadata.
	Name string `json:"name" yaml:"name" schema:"name"`
	// 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"`
	// Units: Length Units to use for this individual annotation.  If not provided, the units set by SetSceneUnits will be used.
	Units UnitLength `json:"units" yaml:"units" schema:"units"`
}

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 Announcement added in v0.2.44

type Announcement struct {
	// Active:
	Active bool `json:"active" yaml:"active" schema:"active,required"`
	// Body:
	Body string `json:"body" yaml:"body" schema:"body"`
	// CreatedAt:
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: A UUID usually v4 or v7
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Tag:
	Tag string `json:"tag" yaml:"tag" schema:"tag"`
	// Title:
	Title string `json:"title" yaml:"title" schema:"title,required"`
	// UpdatedAt:
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

Announcement: An announcement broadcast to all clients.

type AnnouncementResultsPage added in v0.2.45

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

AnnouncementResultsPage: A single page of results

type AppService added in v0.2.4

type AppService service

AppService: Endpoints for third party app grant flows.

type AsyncAPICallOutput added in v0.1.4

type AsyncAPICallOutput any

AsyncAPICallOutput: AsyncAPICallOutput: The output from the 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 in the KittyCAD coordinate system (+Z up, -Y forward).
	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 {
	// BoundingBox: The resulting axis-aligned bounding box in the KittyCAD coordinate system (+Z up, -Y forward).
	BoundingBox BoundingBox `json:"bounding_box" yaml:"bounding_box" schema:"bounding_box"`
	// 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 bounding box.
	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"`
}

AsyncAPICallOutputOutputs: A file bounding box.

type AsyncAPICallOutputSrcFormat added in v0.2.37

type AsyncAPICallOutputSrcFormat struct {
	// Code: The code for the model. This is optional but will be required in the future once we are at v1.
	Code string `json:"code" yaml:"code" schema:"code"`
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation ID Conversations group different prompts together.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
	// 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 MlFeedback `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"`
	// KclVersion: The version of kcl requested.
	KclVersion string `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version"`
	// Model: The model being used.
	Model TextToCadModel `json:"model" yaml:"model" schema:"model,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"`
}

AsyncAPICallOutputSrcFormat: Text to CAD.

type AsyncAPICallOutputSrcFormatOptions added in v0.2.40

type AsyncAPICallOutputSrcFormatOptions struct {
	// Code: The code for the new model.
	Code string `json:"code" yaml:"code" schema:"code,required"`
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation ID Conversations group different prompts together.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
	// 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 MlFeedback `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"`
	// Model: The model being used.
	Model TextToCadModel `json:"model" yaml:"model" schema:"model,required"`
	// ModelVersion: The version of the model.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
	// OriginalSourceCode: The original source code for the model, previous to the changes.
	OriginalSourceCode string `json:"original_source_code" yaml:"original_source_code" schema:"original_source_code,required"`
	// Prompt: The prompt for the overall changes. This is optional if you only want changes on specific source ranges.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt"`
	// SourceRanges: The source ranges the user suggested to change.
	SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges,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"`
}

AsyncAPICallOutputSrcFormatOptions: Text to CAD iteration.

type AsyncAPICallOutputStartedAt added in v0.2.44

type AsyncAPICallOutputStartedAt struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation ID Conversations group different prompts together.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
	// 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 MlFeedback `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"`
	// KclVersion: The version of kcl to use. If empty, the latest version will be used.
	KclVersion string `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version"`
	// Model: The model being used.
	Model TextToCadModel `json:"model" yaml:"model" schema:"model,required"`
	// ModelVersion: The version of the model.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
	// Outputs: The output files. Returns a map of the file name to the file contents. The file contents are not encoded since kcl files are not binary.
	Outputs map[string]string `json:"outputs" yaml:"outputs" schema:"outputs"`
	// ProjectName: The project name. This is used to tie the prompt to a project. Which helps us make our models better over time.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// Prompt: The prompt for the overall changes. This is optional if you only want changes on specific source ranges. This will apply to all the files.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt"`
	// SourceRanges: The source ranges the user suggested to change.
	SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges,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"`
}

AsyncAPICallOutputStartedAt: Text to CAD multi-file iteration.

type AttachmentRef added in v0.2.44

type AttachmentRef struct {
	// ContentHash: Stable digest of the attachment bytes, formatted as `sha256:<lowercase hex>`.
	ContentHash string `json:"content_hash" yaml:"content_hash" schema:"content_hash"`
	// Index: Position of this attachment in the message's attachment array.
	Index int `json:"index" yaml:"index" schema:"index,required"`
	// PromptID: Prompt containing the persisted message row.
	PromptID UUID `json:"prompt_id" yaml:"prompt_id" schema:"prompt_id,required"`
	// Seq: Sequence number of the persisted message row.
	Seq int `json:"seq" yaml:"seq" schema:"seq,required"`
}

AttachmentRef: Coordinates for fetching a persisted attachment on demand.

type Attachments added in v0.2.44

type Attachments struct {
	// Files: Fetched files, in the same order as the requested indices.
	Files []MlCopilotFile `json:"files" yaml:"files" schema:"files,required"`
	// PromptID: Prompt containing the persisted message row.
	PromptID UUID `json:"prompt_id" yaml:"prompt_id" schema:"prompt_id,required"`
	// Role: Authoritative role that owns the file attachment, read from the stored row.
	Role MlMessageRole `json:"role" yaml:"role" schema:"role,required"`
	// Seq: Sequence number of the persisted message row.
	Seq int `json:"seq" yaml:"seq" schema:"seq,required"`
}

Attachments is the type definition for a Attachments.

type AttachmentsError added in v0.2.44

type AttachmentsError struct {
	// Detail: Client readable error detail.
	Detail string `json:"detail" yaml:"detail" schema:"detail,required"`
	// Indices: Attachment indices from the failed request.
	Indices []int `json:"indices" yaml:"indices" schema:"indices,required"`
	// PromptID: Prompt containing the persisted message row.
	PromptID UUID `json:"prompt_id" yaml:"prompt_id" schema:"prompt_id,required"`
	// Seq: Sequence number of the persisted message row.
	Seq int `json:"seq" yaml:"seq" schema:"seq,required"`
}

AttachmentsError is the type definition for a AttachmentsError.

type AttachmentsLoaded added in v0.2.44

type AttachmentsLoaded struct {
	// RequestID: Optional backend-provided identifier to correlate request/response pairs.
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id"`
}

AttachmentsLoaded is the type definition for a AttachmentsLoaded.

type AuthAPIKeyResponse added in v0.2.42

type AuthAPIKeyResponse struct {
	// SessionToken: The session token
	SessionToken string `json:"session_token" yaml:"session_token" schema:"session_token,required"`
}

AuthAPIKeyResponse: The response from the `/auth/api-key` endpoint.

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 Axis added in v0.2.42

type Axis struct {
	// Axis: Axis to use as mirror.
	Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
	// Point: Point through which the mirror axis passes.
	Point Point3D `json:"point" yaml:"point" schema:"point,required"`
}

Axis is the type definition for a Axis.

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 BackendShutdown added in v0.2.43

type BackendShutdown struct {
	// Reason: The reason given for the backend shutdown.
	Reason string `json:"reason" yaml:"reason" schema:"reason"`
}

BackendShutdown is the type definition for a BackendShutdown.

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 BatchResponse added in v0.2.42

type BatchResponse any

BatchResponse: BatchResponse: Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.

type BatchResponseErrors added in v0.2.42

type BatchResponseErrors struct {
	// Errors: Errors that occurred during the modeling command.
	Errors []APIError `json:"errors" yaml:"errors" schema:"errors,required"`
}

BatchResponseErrors: Response sent when a request did not succeed.

type BatchResponseResponse added in v0.2.42

type BatchResponseResponse struct {
	// Response: Response to the modeling command.
	Response any `json:"response" yaml:"response" schema:"response,required"`
}

BatchResponseResponse: Response sent when a request succeeded.

type BeginExecution added in v0.2.44

type BeginExecution struct {
}

BeginExecution: The response from the 'BeginExecution'.

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 BlendType added in v0.2.43

type BlendType string

BlendType: What kind of blend to do

const (
	// BlendTypeTangent: Use the tangent of the surfaces to calculate the blend.
	BlendTypeTangent BlendType = "tangent"
)

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"
	// BlockReasonBillingThresholdReached: The account reached its configured pay-as-you-go collection threshold.
	BlockReasonBillingThresholdReached BlockReason = "billing_threshold_reached"
	// BlockReasonPayAsYouGoDisabled: The user exhausted their included credits without opting into pay-as-you-go charges.
	BlockReasonPayAsYouGoDisabled BlockReason = "pay_as_you_go_disabled"
	// BlockReasonUpgradeDowngradeAbuse: The user repeatedly upgraded and downgraded to recycle free-plan credits.
	BlockReasonUpgradeDowngradeAbuse BlockReason = "upgrade_downgrade_abuse"
	// BlockReasonAdmin: An explicit admin block that can only be removed by admin intervention.
	BlockReasonAdmin BlockReason = "admin"
)

type BodiesCreated added in v0.2.43

type BodiesCreated struct {
	// Bodies: All bodies created by this operation.
	Bodies []BodyCreated `json:"bodies" yaml:"bodies" schema:"bodies,required"`
}

BodiesCreated: List of bodies that were created by an operation.

type BodiesUpdated added in v0.2.43

type BodiesUpdated struct {
	// Bodies: All bodies created by this operation.
	Bodies []BodyUpdated `json:"bodies" yaml:"bodies" schema:"bodies,required"`
}

BodiesUpdated: List of bodies that were updated by an operation.

type BodyCreated added in v0.2.43

type BodyCreated struct {
	// ID: The body's ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Surfaces: Surfaces this body contains.
	Surfaces []SurfaceCreated `json:"surfaces" yaml:"surfaces" schema:"surfaces,required"`
}

BodyCreated: Details of a body that was created.

type BodyType added in v0.2.43

type BodyType string

BodyType: Body type determining if the operation will create a manifold (solid) body or a non-manifold collection of surfaces.

const (
	// BodyTypeSolid: Defines a body that is manifold.
	BodyTypeSolid BodyType = "solid"
	// BodyTypeSurface: Defines a body that is non-manifold (an open collection of connected surfaces).
	BodyTypeSurface BodyType = "surface"
)

type BodyUpdated added in v0.2.43

type BodyUpdated struct {
	// ID: The body's ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Surfaces: Surfaces added to this body.
	Surfaces []SurfaceCreated `json:"surfaces" yaml:"surfaces" schema:"surfaces,required"`
}

BodyUpdated: Details of a body that was updated.

type BooleanImprint added in v0.2.43

type BooleanImprint struct {
	// AnyIntersections: If the operation involved any intersecting solids.
	AnyIntersections bool `json:"any_intersections" yaml:"any_intersections" schema:"any_intersections"`
	// ExtraSolidIds: If the operation produced just one body, then its ID will be the ID of the modeling command request. But if any extra bodies are produced, then their IDs will be included here.
	ExtraSolidIds []UUID `json:"extra_solid_ids" yaml:"extra_solid_ids" schema:"extra_solid_ids"`
}

BooleanImprint: The response from the 'BooleanImprint'.

type BooleanIntersection added in v0.2.41

type BooleanIntersection struct {
	// AnyIntersections: If the operation involved any intersecting solids.
	AnyIntersections bool `json:"any_intersections" yaml:"any_intersections" schema:"any_intersections"`
	// ExtraSolidIds: If the operation produced just one solid, then its ID will be the ID of the modeling command request. But if any extra solids are produced, then their IDs will be included here.
	ExtraSolidIds []UUID `json:"extra_solid_ids" yaml:"extra_solid_ids" schema:"extra_solid_ids"`
}

BooleanIntersection: The response from the 'BooleanIntersection'.

type BooleanSubtract added in v0.2.41

type BooleanSubtract struct {
	// AnyIntersections: If the operation involved any intersecting solids.
	AnyIntersections bool `json:"any_intersections" yaml:"any_intersections" schema:"any_intersections"`
	// ExtraSolidIds: If the operation produced just one solid, then its ID will be the ID of the modeling command request. But if any extra solids are produced, then their IDs will be included here.
	ExtraSolidIds []UUID `json:"extra_solid_ids" yaml:"extra_solid_ids" schema:"extra_solid_ids"`
}

BooleanSubtract: The response from the 'BooleanSubtract'.

type BooleanUnion added in v0.2.41

type BooleanUnion struct {
	// AnyIntersections: If the operation involved any intersecting solids.
	AnyIntersections bool `json:"any_intersections" yaml:"any_intersections" schema:"any_intersections"`
	// ExtraSolidIds: If the operation produced just one solid, then its ID will be the ID of the modeling command request. But if any extra solids are produced, then their IDs will be included here.
	ExtraSolidIds []UUID `json:"extra_solid_ids" yaml:"extra_solid_ids" schema:"extra_solid_ids"`
}

BooleanUnion: The response from the 'BooleanUnion'.

type BoundingBox added in v0.2.43

type BoundingBox struct {
	// Center: Center of the box.
	Center Point3D `json:"center" yaml:"center" schema:"center,required"`
	// Dimensions: Dimensions of the box along each axis.
	Dimensions Point3D `json:"dimensions" yaml:"dimensions" schema:"dimensions,required"`
}

BoundingBox: The response from the 'BoundingBox'.

type CadDesignWorkflow added in v0.2.43

type CadDesignWorkflow string

CadDesignWorkflow: Strict design-workflow enum for onboarding/CRM form submissions.

const (
	// CadDesignWorkflowSketching: Sketch-first workflow.
	CadDesignWorkflowSketching CadDesignWorkflow = "sketching"
	// CadDesignWorkflowCoding: Code-first workflow.
	CadDesignWorkflowCoding CadDesignWorkflow = "coding"
	// CadDesignWorkflowAi: AI-first workflow.
	CadDesignWorkflowAi CadDesignWorkflow = "ai"
	// CadDesignWorkflowHybridApproach: Hybrid workflow spanning multiple approaches.
	CadDesignWorkflowHybridApproach CadDesignWorkflow = "hybrid_approach"
)

type CadDiscoverySource added in v0.2.43

type CadDiscoverySource string

CadDiscoverySource: Strict acquisition-source enum used by the website CAD user info form.

const (
	// CadDiscoverySourceGoogle: Found via Google search.
	CadDiscoverySourceGoogle CadDiscoverySource = "google"
	// CadDiscoverySourceX: Found via X/Twitter.
	CadDiscoverySourceX CadDiscoverySource = "x"
	// CadDiscoverySourceTiktok: Found via TikTok.
	CadDiscoverySourceTiktok CadDiscoverySource = "tiktok"
	// CadDiscoverySourceReddit: Found via Reddit.
	CadDiscoverySourceReddit CadDiscoverySource = "reddit"
	// CadDiscoverySourcePayloadSpace: Found via Payload Space.
	CadDiscoverySourcePayloadSpace CadDiscoverySource = "payload_space"
	// CadDiscoverySourceYoutube: Found via YouTube.
	CadDiscoverySourceYoutube CadDiscoverySource = "youtube"
	// CadDiscoverySourceInstagram: Found via Instagram.
	CadDiscoverySourceInstagram CadDiscoverySource = "instagram"
	// CadDiscoverySourceFacebook: Found via Facebook.
	CadDiscoverySourceFacebook CadDiscoverySource = "facebook"
	// CadDiscoverySourceWordOfMouth: Found through friend referral or word of mouth.
	CadDiscoverySourceWordOfMouth CadDiscoverySource = "word_of_mouth"
	// CadDiscoverySourceOther: Found through another source described in free text.
	CadDiscoverySourceOther CadDiscoverySource = "other"
)

type CadExperienceLevel added in v0.2.43

type CadExperienceLevel string

CadExperienceLevel: Strict CAD/API experience-level enum for onboarding/CRM form submissions.

const (
	// CadExperienceLevelBeginner: Beginner experience level.
	CadExperienceLevelBeginner CadExperienceLevel = "beginner"
	// CadExperienceLevelIntermediate: Intermediate experience level.
	CadExperienceLevelIntermediate CadExperienceLevel = "intermediate"
	// CadExperienceLevelAdvanced: Advanced experience level.
	CadExperienceLevelAdvanced CadExperienceLevel = "advanced"
)

type CadIndustry added in v0.2.43

type CadIndustry string

CadIndustry: Strict CAD industry enum for onboarding/CRM form submissions.

const (
	// CadIndustryMechanicalEngineering: Mechanical engineering.
	CadIndustryMechanicalEngineering CadIndustry = "mechanical_engineering"
	// CadIndustryManufacturing: Manufacturing.
	CadIndustryManufacturing CadIndustry = "manufacturing"
	// CadIndustryAutomotive: Automotive.
	CadIndustryAutomotive CadIndustry = "automotive"
	// CadIndustryAerospace: Aerospace.
	CadIndustryAerospace CadIndustry = "aerospace"
	// CadIndustryCivilEngineering: Civil engineering.
	CadIndustryCivilEngineering CadIndustry = "civil_engineering"
	// CadIndustryElectricalEngineering: Electrical engineering.
	CadIndustryElectricalEngineering CadIndustry = "electrical_engineering"
	// CadIndustryConstruction: Construction.
	CadIndustryConstruction CadIndustry = "construction"
	// CadIndustryProductDesign: Product design.
	CadIndustryProductDesign CadIndustry = "product_design"
	// CadIndustryArchitecture: Architecture.
	CadIndustryArchitecture CadIndustry = "architecture"
	// CadIndustryOther: Other industry.
	CadIndustryOther CadIndustry = "other"
)

type CadUserType added in v0.2.43

type CadUserType string

CadUserType: Strict CAD user-type enum for onboarding/CRM form submissions.

const (
	// CadUserTypeStudentOrResearcher: Student or researcher persona.
	CadUserTypeStudentOrResearcher CadUserType = "student_or_researcher"
	// CadUserTypeHobbyist: Hobbyist persona.
	CadUserTypeHobbyist CadUserType = "hobbyist"
	// CadUserTypeProfessional: Professional persona.
	CadUserTypeProfessional CadUserType = "professional"
)

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 (spherical camera revolve/orbit)
	CameraDragInteractionTypeRotate CameraDragInteractionType = "rotate"
	// CameraDragInteractionTypeRotatetrackball: Camera rotate (trackball with 3 degrees of freedom)
	CameraDragInteractionTypeRotatetrackball CameraDragInteractionType = "rotatetrackball"
	// 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 CameraDragStart added in v0.2.18

type CameraDragStart struct {
}

CameraDragStart: The response from the `CameraDragStart` endpoint.

type CameraMovement added in v0.2.40

type CameraMovement string

CameraMovement: A type of camera movement applied after certain camera operations

const (
	// CameraMovementVantage: Adjusts the camera position during the camera operation
	CameraMovementVantage CameraMovement = "vantage"
	// CameraMovementNone: Keeps the camera position in place
	CameraMovementNone CameraMovement = "none"
)

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"`
	// Orientation: The Camera's orientation (in the form of a quaternion)
	Orientation Point4D `json:"orientation" yaml:"orientation" schema:"orientation,required"`
	// 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 CameraViewState added in v0.2.40

type CameraViewState struct {
	// EyeOffset:
	EyeOffset float64 `json:"eye_offset" yaml:"eye_offset" schema:"eye_offset,required"`
	// FovY:
	FovY float64 `json:"fov_y" yaml:"fov_y" schema:"fov_y,required"`
	// IsOrtho:
	IsOrtho bool `json:"is_ortho" yaml:"is_ortho" schema:"is_ortho,required"`
	// OrthoScaleEnabled:
	OrthoScaleEnabled bool `json:"ortho_scale_enabled" yaml:"ortho_scale_enabled" schema:"ortho_scale_enabled,required"`
	// OrthoScaleFactor:
	OrthoScaleFactor float64 `json:"ortho_scale_factor" yaml:"ortho_scale_factor" schema:"ortho_scale_factor,required"`
	// PivotPosition: A point in 3D space
	PivotPosition Point3D `json:"pivot_position" yaml:"pivot_position" schema:"pivot_position,required"`
	// PivotRotation: A point in homogeneous (4D) space
	PivotRotation Point4D `json:"pivot_rotation" yaml:"pivot_rotation" schema:"pivot_rotation,required"`
	// WorldCoordSystem:
	WorldCoordSystem WorldCoordinateSystem `json:"world_coord_system" yaml:"world_coord_system" schema:"world_coord_system,required"`
}

CameraViewState is the type definition for a CameraViewState.

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 Chamfer added in v0.2.42

type Chamfer struct {
	// Angle: The angle of the chamfer, default is 45deg.
	Angle Angle `json:"angle" yaml:"angle" schema:"angle"`
	// Distance: The distance from the edge to cut on each face.
	Distance float64 `json:"distance" yaml:"distance" schema:"distance,required"`
	// SecondDistance: The second distance affects the edge length of the second face of the cut.
	SecondDistance float64 `json:"second_distance" yaml:"second_distance" schema:"second_distance"`
	// Swap: If true, the second distance or angle is applied to the other face of the cut.
	Swap bool `json:"swap" yaml:"swap" schema:"swap,required"`
}

Chamfer is the type definition for a Chamfer.

type Client

type Client struct {

	// 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
	// Factory: Operations for submitting and managing Factory manufacturing jobs.
	Factory *FactoryService
	// 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
	// Ml: Machine learning to generate CAD models and other things.
	Ml *MlService
	// 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
	// Project: Operations for user-owned projects, public project discovery, publishing, voting, and share links.
	Project *ProjectService
	// 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
	// Shortlink: Shortlinks are a way to create a short URL that redirects to a longer URL. This is useful for sharing links that are long and unwieldy.
	Shortlink *ShortlinkService
	// 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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
}

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` or `ZOO_API_TOKEN`. Optionally, you can pass in a different base url from the default with `ZOO_HOST`. But that is not recommended, unless you know what you are doing or you are hosting your own instance of the KittyCAD API.

Example

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

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
}

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 ClientCommandRequest added in v0.2.44

type ClientCommandRequest struct {
	// Arguments: Arguments validated by the client against its advertised schema.
	Arguments any `json:"arguments" yaml:"arguments" schema:"arguments,required"`
	// CatalogRevision: Catalog revision used when Zookeeper selected the command.
	CatalogRevision int `json:"catalog_revision" yaml:"catalog_revision" schema:"catalog_revision,required"`
	// CommandID: Identifier from the advertised client command catalog.
	CommandID string `json:"command_id" yaml:"command_id" schema:"command_id,required"`
	// RequestID: Unique request identifier used to correlate client responses.
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id,required"`
}

ClientCommandRequest is the type definition for a ClientCommandRequest.

type ClientErrorReport added in v0.2.43

type ClientErrorReport struct {
	// Client: Stable identifier for the client application reporting the error.
	Client string `json:"client" yaml:"client" schema:"client,required"`
	// Code: Optional application-defined error code or fingerprint.
	Code string `json:"code" yaml:"code" schema:"code"`
	// ErrorName: Optional JavaScript/runtime error name.
	ErrorName string `json:"error_name" yaml:"error_name" schema:"error_name"`
	// Message: Human-readable error message.
	Message string `json:"message" yaml:"message" schema:"message,required"`
	// Release: Client release/version string.
	Release string `json:"release" yaml:"release" schema:"release,required"`
	// Route: Optional route/path where the error occurred.
	Route string `json:"route" yaml:"route" schema:"route"`
	// Stack: Optional stack trace or equivalent debug context.
	Stack string `json:"stack" yaml:"stack" schema:"stack"`
}

ClientErrorReport: Structured client-side error report sent by authenticated clients.

type ClientErrorReportAccepted added in v0.2.43

type ClientErrorReportAccepted struct {
	// Accepted: Whether the report was accepted.
	Accepted bool `json:"accepted" yaml:"accepted" schema:"accepted,required"`
}

ClientErrorReportAccepted: Response acknowledging that the error report was accepted for logging.

type ClientMetrics added in v0.2.28

type ClientMetrics struct {
	// RtcFrameHeight: The height of the inbound video stream in pixels.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-frameheight
	RtcFrameHeight int `json:"rtc_frame_height" yaml:"rtc_frame_height" schema:"rtc_frame_height"`
	// RtcFrameWidth: The width of the inbound video stream in pixels.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-framewidth
	RtcFrameWidth int `json:"rtc_frame_width" yaml:"rtc_frame_width" schema:"rtc_frame_width"`
	// RtcFramesDecoded: Counter of the number of WebRTC frames that the client has decoded from the inbound video stream.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount
	RtcFramesDecoded int `json:"rtc_frames_decoded" yaml:"rtc_frames_decoded" schema:"rtc_frames_decoded"`
	// RtcFramesDropped: Counter of the number of WebRTC frames the client has dropped from the inbound video stream.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-framesdropped
	RtcFramesDropped int `json:"rtc_frames_dropped" yaml:"rtc_frames_dropped" schema:"rtc_frames_dropped"`
	// RtcFramesPerSecond: Current number of frames being rendered in the last second. A good target is 60 frames per second, but it can fluctuate depending on network conditions.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount
	RtcFramesPerSecond int `json:"rtc_frames_per_second" yaml:"rtc_frames_per_second" schema:"rtc_frames_per_second"`
	// RtcFramesReceived: Counter of the number of WebRTC frames that the client has received from the inbound video stream.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount
	RtcFramesReceived int `json:"rtc_frames_received" yaml:"rtc_frames_received" schema:"rtc_frames_received"`
	// RtcFreezeCount: Number of times the inbound video playback has frozen. This is usually due to network conditions.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-freezecount
	RtcFreezeCount int `json:"rtc_freeze_count" yaml:"rtc_freeze_count" schema:"rtc_freeze_count"`
	// RtcJitterSec: Amount of "jitter" in the inbound video stream. 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.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats-jitter
	RtcJitterSec float64 `json:"rtc_jitter_sec" yaml:"rtc_jitter_sec" schema:"rtc_jitter_sec"`
	// RtcKeyframesDecoded: Number of "key frames" decoded in the inbound 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.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-keyframesdecoded
	RtcKeyframesDecoded int `json:"rtc_keyframes_decoded" yaml:"rtc_keyframes_decoded" schema:"rtc_keyframes_decoded"`
	// RtcPacketsLost: Amount of packets lost in the inbound video stream.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcreceivedrtpstreamstats-packetslost
	RtcPacketsLost int `json:"rtc_packets_lost" yaml:"rtc_packets_lost" schema:"rtc_packets_lost"`
	// RtcPauseCount: Count of the total number of video pauses experienced by this receiver.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-pausecount
	RtcPauseCount int `json:"rtc_pause_count" yaml:"rtc_pause_count" schema:"rtc_pause_count"`
	// RtcPliCount: Count the total number of Picture Loss Indication (PLI) packets.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-plicount
	RtcPliCount int `json:"rtc_pli_count" yaml:"rtc_pli_count" schema:"rtc_pli_count"`
	// RtcStunRttSec: Estimated round trip time, measured in seconds.
	//
	// This is the "ping" between the client and the STUN server. Not to be confused with the E2E RTT documented [here](https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteinboundrtpstreamstats-roundtriptime)
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcicecandidatepairstats-currentroundtriptime
	RtcStunRttSec float64 `json:"rtc_stun_rtt_sec" yaml:"rtc_stun_rtt_sec" schema:"rtc_stun_rtt_sec"`
	// RtcTotalFreezesDurationSec: Number of seconds of frozen video the user has been subjected to.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalfreezesduration
	RtcTotalFreezesDurationSec float64 `json:"rtc_total_freezes_duration_sec" yaml:"rtc_total_freezes_duration_sec" schema:"rtc_total_freezes_duration_sec"`
	// RtcTotalPausesDurationSec: Count of the total number of video pauses experienced by this receiver.
	//
	// https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalpausesduration
	RtcTotalPausesDurationSec float64 `json:"rtc_total_pauses_duration_sec" yaml:"rtc_total_pauses_duration_sec" schema:"rtc_total_pauses_duration_sec"`
}

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

type ClosePath added in v0.2.18

type ClosePath struct {
	// FaceID: The UUID of the lone face of the resulting solid2D.
	FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
}

ClosePath: The response from the `ClosePath` command.

type ClosestEdge added in v0.2.43

type ClosestEdge struct {
	// EdgeID: The ID of the edge closest to the point given in the request. If there are no edges in the scene, returns None.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id"`
}

ClosestEdge: The response from the 'ClosestEdge'.

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 CodeOption added in v0.2.41

type CodeOption string

CodeOption: `CodeOption` <details><summary>JSON schema</summary>

```json { "type": "string", "enum": [ "parse", "mock_execute", "execute" ] } ``` </details>

const (
	// CodeOptionParse represents the CodeOption `"parse"`.
	CodeOptionParse CodeOption = "parse"
	// CodeOptionMockExecute represents the CodeOption `"mock_execute"`.
	CodeOptionMockExecute CodeOption = "mock_execute"
	// CodeOptionExecute represents the CodeOption `"execute"`.
	CodeOptionExecute CodeOption = "execute"
)

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 CompanySize added in v0.2.43

type CompanySize string

CompanySize: Strict company-size enum for onboarding/CRM form submissions.

const (
	// CompanySizeOneToTen: 1-10 people.
	CompanySizeOneToTen CompanySize = "one_to_ten"
	// CompanySizeElevenToFifty: 11-50 people.
	CompanySizeElevenToFifty CompanySize = "eleven_to_fifty"
	// CompanySizeFiftyOneToTwoHundred: 51-200 people.
	CompanySizeFiftyOneToTwoHundred CompanySize = "fifty_one_to_two_hundred"
	// CompanySizeTwoHundredOneToFiveHundred: 201-500 people.
	CompanySizeTwoHundredOneToFiveHundred CompanySize = "two_hundred_one_to_five_hundred"
	// CompanySizeFiveHundredOneToOneThousand: 501-1000 people.
	CompanySizeFiveHundredOneToOneThousand CompanySize = "five_hundred_one_to_one_thousand"
	// CompanySizeOneThousandPlus: 1000+ people.
	CompanySizeOneThousandPlus CompanySize = "one_thousand_plus"
	// CompanySizeOther: Other company size.
	CompanySizeOther CompanySize = "other"
)

type ComplementaryEdges added in v0.2.41

type ComplementaryEdges struct {
	// AdjacentIds: Every edge that shared one common vertex with the original edge.
	AdjacentIds []UUID `json:"adjacent_ids" yaml:"adjacent_ids" schema:"adjacent_ids,required"`
	// OppositeID: The opposite edge has no common vertices with the original edge. A wall may not have an opposite edge (i.e. a revolve that touches the axis of rotation).
	OppositeID UUID `json:"opposite_id" yaml:"opposite_id" schema:"opposite_id"`
}

ComplementaryEdges: Struct to contain the edge information of a wall of an extrude/rotate/loft/sweep.

type ComponentTransform added in v0.2.40

type ComponentTransform struct {
	// RotateAngleAxis: Rotate component of the transform. The rotation is specified as an axis and an angle (xyz are the components of the axis, w is the angle in degrees).
	RotateAngleAxis TransformByForPoint4D `json:"rotate_angle_axis" yaml:"rotate_angle_axis" schema:"rotate_angle_axis"`
	// RotateRpy: Rotate component of the transform. The rotation is specified as a roll, pitch, yaw.
	RotateRpy TransformByForPoint3D `json:"rotate_rpy" yaml:"rotate_rpy" schema:"rotate_rpy"`
	// Scale: Scale component of the transform.
	Scale TransformByForPoint3D `json:"scale" yaml:"scale" schema:"scale"`
	// Translate: Translate component of the transform.
	Translate TransformByForPoint3D `json:"translate" yaml:"translate" schema:"translate"`
}

ComponentTransform: Container that holds a translate, rotate and scale. Defaults to no change, everything stays the same (i.e. the identity function).

type ConstantService added in v0.2.5

type ConstantService service

ConstantService: Constants. These are helpful as helpers.

type Conversation added in v0.2.42

type Conversation struct {
	// CreatedAt: The date and time the conversation was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// FirstPrompt: The prompt that started this conversation.
	FirstPrompt string `json:"first_prompt" yaml:"first_prompt" schema:"first_prompt,required"`
	// ID: The unique identifier for the conversation.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// UpdatedAt: The date and time the conversation 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 conversation.
	UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

Conversation: A conversation composed of many ML prompts.

type ConversationID added in v0.2.42

type ConversationID struct {
	// ConversationID: The unique identifier for the conversation.
	ConversationID string `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
}

ConversationID is the type definition for a ConversationID.

type ConversationResultsPage added in v0.2.42

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

ConversationResultsPage: A single page of results

type ConversionParams added in v0.2.42

type ConversionParams struct {
	// OutputFormat: Describes the output file(s).
	OutputFormat any `json:"output_format" yaml:"output_format" schema:"output_format,required"`
	// SrcFormat: Describes the input file(s).
	SrcFormat any `json:"src_format" yaml:"src_format" schema:"src_format,required"`
}

ConversionParams: Describes the file to convert (src) and what it should be converted into (output).

type ConversionSortMode added in v0.2.42

type ConversionSortMode string

ConversionSortMode: Supported sort modes for org dataset conversions.

const (
	// ConversionSortModeCreatedAtAscending: Sort by created_at in increasing order.
	ConversionSortModeCreatedAtAscending ConversionSortMode = "created_at_ascending"
	// ConversionSortModeCreatedAtDescending: Sort by created_at in decreasing order.
	ConversionSortModeCreatedAtDescending ConversionSortMode = "created_at_descending"
	// ConversionSortModeStatusAscending: Sort by status in increasing order.
	ConversionSortModeStatusAscending ConversionSortMode = "status_ascending"
	// ConversionSortModeStatusDescending: Sort by status in decreasing order.
	ConversionSortModeStatusDescending ConversionSortMode = "status_descending"
	// ConversionSortModePhaseAscending: Sort by phase in increasing order.
	ConversionSortModePhaseAscending ConversionSortMode = "phase_ascending"
	// ConversionSortModePhaseDescending: Sort by phase in decreasing order.
	ConversionSortModePhaseDescending ConversionSortMode = "phase_descending"
	// ConversionSortModeUpdatedAtAscending: Sort by updated_at in increasing order.
	ConversionSortModeUpdatedAtAscending ConversionSortMode = "updated_at_ascending"
	// ConversionSortModeUpdatedAtDescending: Sort by updated_at in decreasing order.
	ConversionSortModeUpdatedAtDescending ConversionSortMode = "updated_at_descending"
)

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"`
	// 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 CreateCustomModel added in v0.2.42

type CreateCustomModel struct {
	// DatasetIds: Org dataset IDs that should be linked to the model. Must contain at least one dataset owned by the org.
	DatasetIds []UUID `json:"dataset_ids" yaml:"dataset_ids" schema:"dataset_ids,required"`
	// Name: The model's display name.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// SystemPrompt: The model's system prompt.
	SystemPrompt string `json:"system_prompt" yaml:"system_prompt" schema:"system_prompt"`
}

CreateCustomModel: Body for creating a custom ML model.

type CreateOauth2AppRequest added in v0.2.43

type CreateOauth2AppRequest struct {
	// GrantTypes: The OAuth grant types this app can use.
	GrantTypes []Oauth2AppGrantType `json:"grant_types" yaml:"grant_types" schema:"grant_types"`
	// Mode: The deployment mode for this app.
	Mode Oauth2AppMode `json:"mode" yaml:"mode" schema:"mode"`
	// Name: The display name of the app.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// RedirectUris: The redirect URIs registered for this app.
	RedirectUris []URL `json:"redirect_uris" yaml:"redirect_uris" schema:"redirect_uris"`
}

CreateOauth2AppRequest: Request body for creating a public OAuth app.

type CreateOrgDataset added in v0.2.42

type CreateOrgDataset struct {
	// Description: Optional human-readable notes about the dataset.
	Description string `json:"description" yaml:"description" schema:"description"`
	// Name: The dataset's display name.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// RequireRawKclSimilarityScoreForSuccess: Whether a low raw-KCL similarity score should block conversion success.
	RequireRawKclSimilarityScoreForSuccess bool `` /* 157-byte string literal not displayed */
	// Source: Details for accessing the dataset.
	Source OrgDatasetSource `json:"source" yaml:"source" schema:"source,required"`
}

CreateOrgDataset: Payload for creating an org dataset.

type CreatePlanarSurface added in v0.2.44

type CreatePlanarSurface struct {
	// Surfaces: the list of the ids of the surfaces that were created from the planar surface command
	Surfaces []UUID `json:"surfaces" yaml:"surfaces" schema:"surfaces,required"`
}

CreatePlanarSurface: The response from the 'CreatePlanarSurface'.

type CreateProjectShareLinkRequest added in v0.2.43

type CreateProjectShareLinkRequest struct {
	// AccessMode: Access policy for the generated share link.
	AccessMode KclProjectShareLinkAccessMode `json:"access_mode" yaml:"access_mode" schema:"access_mode"`
}

CreateProjectShareLinkRequest: Request payload for creating a new project share link.

type CreateProjectVersionResponse added in v0.2.45

type CreateProjectVersionResponse struct {
	// CurrentVersionID: Project's current version when this response was prepared.
	CurrentVersionID UUID `json:"current_version_id" yaml:"current_version_id" schema:"current_version_id,required"`
	// VersionID: Version created by this save or returned by a retry.
	VersionID UUID `json:"version_id" yaml:"version_id" schema:"version_id,required"`
}

CreateProjectVersionResponse: Result of saving an alternate project version.

type CreateRegion added in v0.2.43

type CreateRegion struct {
	// RegionMapping: a mapping from the curves within this region to the source component segment curves they were split from
	RegionMapping map[string]UUID `json:"region_mapping" yaml:"region_mapping" schema:"region_mapping,required"`
}

CreateRegion: The response from the 'CreateRegion'. The region should have an ID taken from the ID of the 'CreateRegion' modeling command.

type CreateRegionFromQueryPoint added in v0.2.43

type CreateRegionFromQueryPoint struct {
	// RegionMapping: a mapping from the curves within this region to the source component segment curves they were split from
	RegionMapping map[string]UUID `json:"region_mapping" yaml:"region_mapping" schema:"region_mapping,required"`
}

CreateRegionFromQueryPoint: The response from the 'CreateRegionFromQueryPoint'. The region should have an ID taken from the ID of the 'CreateRegionFromQueryPoint' modeling command.

type CreateShortlinkRequest added in v0.2.38

type CreateShortlinkRequest struct {
	// Password: The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.
	Password string `json:"password" yaml:"password" schema:"password"`
	// RestrictToOrg: If the shortlink should be restricted to the user's organization to view. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail.
	RestrictToOrg bool `json:"restrict_to_org" yaml:"restrict_to_org" schema:"restrict_to_org"`
	// Url: The URL to redirect back to.
	Url URL `json:"url" yaml:"url" schema:"url,required"`
}

CreateShortlinkRequest: Request to create a shortlink.

type CreateShortlinkResponse added in v0.2.38

type CreateShortlinkResponse struct {
	// Key: The key for this url. This is what you use to update or delete the specific shortlink.
	Key string `json:"key" yaml:"key" schema:"key,required"`
	// Url: The shortened url.
	Url URL `json:"url" yaml:"url" schema:"url,required"`
}

CreateShortlinkResponse: Response from creating a shortlink.

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 CurveDebug added in v0.2.44

type CurveDebug struct {
	// Center: Center point of segment.
	Center Point2D `json:"center" yaml:"center" schema:"center"`
	// End: End point of segment.
	End Point2D `json:"end" yaml:"end" schema:"end"`
	// ID: ID for this segment.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Mid: Midpoint on a three point arc
	Mid Point2D `json:"mid" yaml:"mid" schema:"mid"`
	// SegmentType: What kind of segment is it (line, arc, etc)
	SegmentType CurveTypeDebug `json:"segment_type" yaml:"segment_type" schema:"segment_type,required"`
	// Start: Start point of segment or circle.
	Start Point2D `json:"start" yaml:"start" schema:"start"`
}

CurveDebug: A debug-view of the segment of a curve.

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 CurveSetConstraint added in v0.2.38

type CurveSetConstraint struct {
}

CurveSetConstraint: The response from the `CurveSetConstraint` endpoint.

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 CurveTypeDebug added in v0.2.44

type CurveTypeDebug string

CurveTypeDebug: What type of curve is being viewed?

const (
	// CurveTypeDebugLine: Line with a start and end.
	CurveTypeDebugLine CurveTypeDebug = "line"
	// CurveTypeDebugThreePointArc: Arc with a start, end and center.
	CurveTypeDebugThreePointArc CurveTypeDebug = "three_point_arc"
	// CurveTypeDebugCircle: Circle with a center and radius.
	CurveTypeDebugCircle CurveTypeDebug = "circle"
)

type Custom added in v0.2.42

type Custom struct {
	// Path: The path that will be used for the custom profile.
	Path UUID `json:"path" yaml:"path" schema:"path,required"`
}

Custom is the type definition for a Custom.

type CustomModel added in v0.2.42

type CustomModel struct {
	// CreatedAt: The date and time the model was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: The unique identifier for the model.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Name: User-provided display name. This is mutable; lookup by ID instead.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// OrgID: The ID of the org owning the model.
	OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id,required"`
	// SystemPrompt: User-provided LLM system prompt. This is akin to `AGENTS.md`.
	SystemPrompt string `json:"system_prompt" yaml:"system_prompt" schema:"system_prompt,required"`
	// UpdatedAt: The date and time the model was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

CustomModel: Custom ML model created by a user for an organization.

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 {
	// AmountDueAfterCredits: Estimated cash charges after applying currently available monthly and stable API credits to eligible usage, including usage from earlier billing periods. Credits cannot reduce subscription charges or invoices whose provider export has already started. Credits are counted once and never beyond eligible usage.
	//
	// This read does not reserve or spend credits. The amount can change as credits are granted, spent, or refreshed, or as new charges arrive. Use this field directly instead of subtracting the credit balance from `total_due`. Like `total_due`, this is only returned when the amount due is requested and the payment provider is available; otherwise it is `null`.
	AmountDueAfterCredits float64 `json:"amount_due_after_credits" yaml:"amount_due_after_credits" schema:"amount_due_after_credits"`
	// CreatedAt: The date and time the balance was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// MonthlyAPICreditsRefreshAt: The date and time the monthly API credits are next scheduled to refresh.
	//
	// When a refresh is due but has not been applied yet, this is the due timestamp in the past. Clients can use that to show the refresh as pending rather than incorrectly advancing by a month.
	//
	// This is `null` when the customer does not have an active standard billing schedule, such as before their billing account is established or while a contract owns billing.
	MonthlyAPICreditsRefreshAt Time `json:"monthly_api_credits_refresh_at" yaml:"monthly_api_credits_refresh_at" schema:"monthly_api_credits_refresh_at"`
	// MonthlyAPICreditsRemaining: The number of monthly API credits remaining in the balance. This is the number of credits remaining in the balance.
	//
	// Both the monetary value and the number of credits are returned, but they reflect the same value in the database.
	MonthlyAPICreditsRemaining int `json:"monthly_api_credits_remaining" yaml:"monthly_api_credits_remaining" schema:"monthly_api_credits_remaining,required"`
	// MonthlyAPICreditsRemainingMonetaryValue: The monetary value of the monthly API 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.
	//
	// Both the monetary value and the number of credits are returned, but they reflect the same value in the database.
	MonthlyAPICreditsRemainingMonetaryValue float64 `` /* 166-byte string literal not displayed */
	// StableAPICreditsRemaining: The number of stable API credits remaining in the balance. These do not get reset or re-upped every month. This is separate from the monthly credits. Credits will first pull from the monthly credits, then the stable credits. Stable just means that they do not get reset every month. A user will have stable credits if a Zoo employee granted them credits.
	//
	// Both the monetary value and the number of credits are returned, but they reflect the same value in the database.
	StableAPICreditsRemaining int `json:"stable_api_credits_remaining" yaml:"stable_api_credits_remaining" schema:"stable_api_credits_remaining,required"`
	// StableAPICreditsRemainingMonetaryValue: The monetary value of stable API credits remaining in the balance. These do not get reset or re-upped every month. This is separate from the monthly credits. Credits will first pull from the monthly credits, then the stable credits. Stable just means that they do not get reset every month. A user will have stable credits if a Zoo employee granted them credits.
	//
	// Both the monetary value and the number of credits are returned, but they reflect the same value in the database.
	StableAPICreditsRemainingMonetaryValue float64 `` /* 163-byte string literal not displayed */
	// 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: Recorded cash charges for completed API usage awaiting invoicing, outstanding invoices, and pending invoice items. Credits and writeoffs already assigned to usage are reflected in this amount.
	//
	// Available credits can still reduce eligible usage charges, including usage from earlier billing periods. They are applied when an aggregate usage invoice is generated and again immediately before its first provider export, using monthly credits before stable credits.
	//
	// This amount is not a forecast of the next payment. Do not subtract the full remaining credit balance: the total can also include subscription charges and invoices whose provider export has already started, which usage credits cannot reduce. Use `amount_due_after_credits` for the estimate after applicable remaining credits. Ongoing sessions and usage still being priced are not included. This amount is only returned if requested from the API.
	TotalDue float64 `json:"total_due" yaml:"total_due" schema:"total_due"`
	// 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 CustomerBounds added in v0.2.44

type CustomerBounds struct {
	// MaximumAmount:
	MaximumAmount float64 `json:"maximum_amount" yaml:"maximum_amount" schema:"maximum_amount,required"`
	// MinimumAmount:
	MinimumAmount float64 `json:"minimum_amount" yaml:"minimum_amount" schema:"minimum_amount,required"`
}

CustomerBounds: Inclusive amount bounds for a threshold authority.

type CutStrategy added in v0.2.41

type CutStrategy string

CutStrategy: What strategy (algorithm) should be used for cutting? Defaults to Automatic.

const (
	// CutStrategyBasic: Basic fillet cut. This has limitations, like the filletted edges can't touch each other. But it's very fast and simple.
	CutStrategyBasic CutStrategy = "basic"
	// CutStrategyCsg: More complicated fillet cut. It works for more use-cases, like edges that touch each other. But it's slower than the Basic method.
	CutStrategyCsg CutStrategy = "csg"
	// CutStrategyAutomatic: Tries the Basic method, and if that doesn't work, tries the CSG strategy.
	CutStrategyAutomatic CutStrategy = "automatic"
)

type CutType added in v0.2.34

type CutType string

CutType: What kind of cut to do

const (
	// CutTypeFillet: Round off an edge.
	CutTypeFillet CutType = "fillet"
	// CutTypeChamfer: Cut away an edge.
	CutTypeChamfer CutType = "chamfer"
)

type CutTypeV2 added in v0.2.42

type CutTypeV2 any

CutTypeV2: CutTypeV2: What kind of cut to perform when cutting an edge.

type CutTypeV2Chamfer added in v0.2.42

type CutTypeV2Chamfer struct {
	// Chamfer:
	Chamfer Chamfer `json:"chamfer" yaml:"chamfer" schema:"chamfer,required"`
}

CutTypeV2Chamfer: Cut away an edge.

type CutTypeV2Custom added in v0.2.42

type CutTypeV2Custom struct {
	// Custom:
	Custom Custom `json:"custom" yaml:"custom" schema:"custom,required"`
}

CutTypeV2Custom: A custom cut profile.

type CutTypeV2Fillet added in v0.2.42

type CutTypeV2Fillet struct {
	// Fillet:
	Fillet Fillet `json:"fillet" yaml:"fillet" schema:"fillet,required"`
}

CutTypeV2Fillet: Round off an edge.

type Data added in v0.2.27

type Data struct {
	// Name: Instance name. This may or may not mean something.
	Name string `json:"name" yaml:"name" schema:"name,required"`
}

Data is the type definition for a Data.

type DatasetS3Policies added in v0.2.42

type DatasetS3Policies struct {
	// BucketPolicy: Optional S3 bucket policy that scopes Zoo's access to the dataset prefix.
	BucketPolicy any `json:"bucket_policy" yaml:"bucket_policy" schema:"bucket_policy,required"`
	// PermissionPolicy: Inline IAM permission policy the customer should attach to their role.
	PermissionPolicy any `json:"permission_policy" yaml:"permission_policy" schema:"permission_policy,required"`
	// TrustPolicy: IAM trust policy that allows Zoo's account to assume the customer's role.
	TrustPolicy any `json:"trust_policy" yaml:"trust_policy" schema:"trust_policy,required"`
}

DatasetS3Policies: Aggregated AWS policies required for onboarding an org dataset stored in S3.

type DefaultCameraCenterToScene added in v0.2.40

type DefaultCameraCenterToScene struct {
}

DefaultCameraCenterToScene: The response from the `DefaultCameraCenterToScene` endpoint.

type DefaultCameraCenterToSelection added in v0.2.38

type DefaultCameraCenterToSelection struct {
}

DefaultCameraCenterToSelection: The response from the `DefaultCameraCenterToSelection` endpoint.

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 DefaultCameraGetView added in v0.2.40

type DefaultCameraGetView struct {
	// View: Camera view state
	View CameraViewState `json:"view" yaml:"view" schema:"view,required"`
}

DefaultCameraGetView: The response from the `DefaultCameraGetView` command.

type DefaultCameraLookAt added in v0.2.19

type DefaultCameraLookAt struct {
}

DefaultCameraLookAt: The response from the `DefaultCameraLookAt` endpoint.

type DefaultCameraPerspectiveSettings added in v0.2.38

type DefaultCameraPerspectiveSettings struct {
}

DefaultCameraPerspectiveSettings: The response from the `DefaultCameraPerspectiveSettings` endpoint.

type DefaultCameraSetOrthographic added in v0.2.38

type DefaultCameraSetOrthographic struct {
}

DefaultCameraSetOrthographic: The response from the `DefaultCameraSetOrthographic` endpoint.

type DefaultCameraSetPerspective added in v0.2.38

type DefaultCameraSetPerspective struct {
}

DefaultCameraSetPerspective: The response from the `DefaultCameraSetPerspective` endpoint.

type DefaultCameraSetView added in v0.2.40

type DefaultCameraSetView struct {
}

DefaultCameraSetView: The response from the `DefaultCameraSetView` 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 Delta added in v0.2.42

type Delta struct {
	// Delta: The delta text, which is a part of the response that is being streamed.
	Delta string `json:"delta" yaml:"delta" schema:"delta,required"`
}

Delta is the type definition for a Delta.

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 DeviceAuthConfirmParams added in v0.2.41

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

DeviceAuthConfirmParams: The request parameters to confirm the `user_code` for the OAuth 2.0 Device Authorization Grant.

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 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 DirectionType added in v0.2.44

type DirectionType any

DirectionType: DirectionType: What to use as a direction when one is needed (e.g. for an extrusion).

type DirectionTypeAxis added in v0.2.44

type DirectionTypeAxis struct {
	// Axis:
	Axis Axis `json:"axis" yaml:"axis" schema:"axis,required"`
}

DirectionTypeAxis: Uses the provided vector as the direction.

type DirectionTypeEdge added in v0.2.44

type DirectionTypeEdge struct {
	// Edge:
	Edge Edge `json:"edge" yaml:"edge" schema:"edge,required"`
}

DirectionTypeEdge: Uses the direction of an edge, if linear

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 DistanceType added in v0.2.42

type DistanceType any

DistanceType: DistanceType: The type of distance Distances can vary depending on the objects used as input.

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 DxfStorage added in v0.2.40

type DxfStorage string

DxfStorage: Export storage.

const (
	// DxfStorageAscii: Plaintext encoding.
	//
	// This is the default setting.
	DxfStorageAscii DxfStorage = "ascii"
	// DxfStorageBinary: Binary encoding.
	DxfStorageBinary DxfStorage = "binary"
)

type Edge added in v0.2.44

type Edge struct {
	// ID: Edge ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
}

Edge is the type definition for a Edge.

type EdgeCutVersion added in v0.2.44

type EdgeCutVersion string

EdgeCutVersion: Edge cut algorithm version.

const (
	// EdgeCutVersionV0: Let the engine choose whichever version it wants.
	EdgeCutVersionV0 EdgeCutVersion = "v0"
	// EdgeCutVersionV1: The original fillet algorithm Zoo 1.0 shipped with. Limitations: doesn't support rolling ball fillets, has several bugs that will not be fixed.
	EdgeCutVersionV1 EdgeCutVersion = "v1"
	// EdgeCutVersionV2: Adds support for rolling ball fillets. Fixes bugs from V1. Still experimental.
	EdgeCutVersionV2 EdgeCutVersion = "v2"
)

type EdgeGetLength added in v0.2.44

type EdgeGetLength struct {
	// Length: The length of the edge.
	Length float64 `json:"length" yaml:"length" schema:"length,required"`
}

EdgeGetLength: The response from the `EdgeGetLength` command.

type EdgeInfo added in v0.2.41

type EdgeInfo struct {
	// EdgeID: The UUID of the id.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// Faces: The faces of each edge.
	Faces []UUID `json:"faces" yaml:"faces" schema:"faces,required"`
}

EdgeInfo: A list of faces for a specific edge.

type EdgeLinesVisible added in v0.2.38

type EdgeLinesVisible struct {
}

EdgeLinesVisible: The response from the `EdgeLinesVisible` endpoint.

type EdgeReference added in v0.2.44

type EdgeReference struct {
	// Reference: Stable edge reference.
	Reference EdgeSpecifier `json:"reference" yaml:"reference" schema:"reference,required"`
}

EdgeReference is the type definition for a EdgeReference.

type EdgeSpecifier added in v0.2.44

type EdgeSpecifier struct {
	// EndFaces: Optional end face ids for ambiguous edge matches.
	EndFaces []UUID `json:"end_faces" yaml:"end_faces" schema:"end_faces"`
	// Index: Optional index for disambiguation when multiple edges share the same faces. If not provided (None), all matching edges will be used. If provided (Some(n)), only the edge at index n will be used.
	Index int `json:"index" yaml:"index" schema:"index"`
	// SideFaces: Side face ids that uniquely identify the edge.
	SideFaces []UUID `json:"side_faces" yaml:"side_faces" schema:"side_faces,required"`
}

EdgeSpecifier: An edge can be referenced by its uuid or by the faces that uniquely define it.

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 EmailMarketingConfirmTokenBody added in v0.2.43

type EmailMarketingConfirmTokenBody struct {
	// Token: The token id from the confirmation email.
	Token string `json:"token" yaml:"token" schema:"token,required"`
}

EmailMarketingConfirmTokenBody: Request payload for confirming a double-opt-in token.

type EmailMarketingConsentState added in v0.2.43

type EmailMarketingConsentState struct {
	// ConfirmedAt: Time the double opt-in confirmation completed.
	ConfirmedAt Time `json:"confirmed_at" yaml:"confirmed_at" schema:"confirmed_at"`
	// IsSubscribed: Whether the user is currently subscribed to marketing email.
	IsSubscribed bool `json:"is_subscribed" yaml:"is_subscribed" schema:"is_subscribed,required"`
	// PromptSeenAt: First time the in-app prompt was seen.
	PromptSeenAt Time `json:"prompt_seen_at" yaml:"prompt_seen_at" schema:"prompt_seen_at"`
	// RequestedAt: Time the latest opt-in request email was sent.
	RequestedAt Time `json:"requested_at" yaml:"requested_at" schema:"requested_at"`
	// ShouldShowPrompt: Whether the website should show the modal for this user.
	ShouldShowPrompt bool `json:"should_show_prompt" yaml:"should_show_prompt" schema:"should_show_prompt,required"`
	// Status: Current consent state.
	Status EmailMarketingConsentStatus `json:"status" yaml:"status" schema:"status,required"`
}

EmailMarketingConsentState: Public view of an authenticated user's email marketing consent state.

type EmailMarketingConsentStatus added in v0.2.43

type EmailMarketingConsentStatus string

EmailMarketingConsentStatus: Email marketing consent state for a user.

const (
	// EmailMarketingConsentStatusUnknown: No choice has been made yet.
	EmailMarketingConsentStatusUnknown EmailMarketingConsentStatus = "unknown"
	// EmailMarketingConsentStatusDismissed: User has seen and dismissed the modal without deciding.
	EmailMarketingConsentStatusDismissed EmailMarketingConsentStatus = "dismissed"
	// EmailMarketingConsentStatusPending: User requested opt-in and must confirm via email.
	EmailMarketingConsentStatusPending EmailMarketingConsentStatus = "pending"
	// EmailMarketingConsentStatusConfirmed: User explicitly confirmed via email flow.
	EmailMarketingConsentStatusConfirmed EmailMarketingConsentStatus = "confirmed"
	// EmailMarketingConsentStatusUnsubscribed: Recipient later unsubscribed through an email unsubscribe flow.
	EmailMarketingConsentStatusUnsubscribed EmailMarketingConsentStatus = "unsubscribed"
	// EmailMarketingConsentStatusDeclined: User explicitly declined.
	EmailMarketingConsentStatusDeclined EmailMarketingConsentStatus = "declined"
)

type EnableSketchMode added in v0.2.38

type EnableSketchMode struct {
}

EnableSketchMode: The response from the `EnableSketchMode` endpoint.

type EndExecution added in v0.2.44

type EndExecution struct {
}

EndExecution: The response from the 'EndExecution'.

type EndOfStream added in v0.2.42

type EndOfStream struct {
	// CompletedAt: This indicates the time that the server has finished processing the request. This can be used by the client to measure the total time taken for the request. Although this might be passed in other contexts, outside of copilot mode, it is only relevant in copilot mode.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation id for this session.
	ConversationID string `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id"`
	// ID: The ML prompt id for this turn.
	ID UUID `json:"id" yaml:"id" schema:"id"`
	// StartedAt: This indicates the time that the server had started processing the request. This can be used by the client to measure the total time taken for the request. Although this might be passed in other contexts, outside of copilot mode, it is only relevant in copilot mode.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// WholeResponse: The whole response text, which is the final output of the AI. This is only relevant if in copilot mode, where the AI is expected to return the whole response at once.
	WholeResponse string `json:"whole_response" yaml:"whole_response" schema:"whole_response"`
}

EndOfStream is the type definition for a EndOfStream.

type EngineUtilEvaluatePath added in v0.2.38

type EngineUtilEvaluatePath struct {
	// Pos: The evaluated path curve position
	Pos Point3D `json:"pos" yaml:"pos" schema:"pos,required"`
}

EngineUtilEvaluatePath: The response of the `EngineUtilEvaluatePath` endpoint

type EntityCircularPattern added in v0.2.33

type EntityCircularPattern struct {
	// EntityFaceEdgeIds: The Face, edge, and entity ids of the patterned entities.
	EntityFaceEdgeIds []FaceEdgeInfo `json:"entity_face_edge_ids" yaml:"entity_face_edge_ids" schema:"entity_face_edge_ids"`
}

EntityCircularPattern: The response from the `EntityCircularPattern` command.

type EntityClone added in v0.2.40

type EntityClone struct {
	// FaceEdgeIds: The Face and Edge Ids of the cloned entity.
	FaceEdgeIds []FaceEdgeInfo `json:"face_edge_ids" yaml:"face_edge_ids" schema:"face_edge_ids"`
}

EntityClone: The response from the `EntityClone` command.

type EntityDeleteChildren added in v0.2.43

type EntityDeleteChildren struct {
}

EntityDeleteChildren: The response from the `EntityDeleteChildren` command.

type EntityFade added in v0.2.38

type EntityFade struct {
}

EntityFade: The response from the `EntityFade` endpoint.

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 EntityGetIndex added in v0.2.43

type EntityGetIndex struct {
	// EntityIndex: The child index of the entity.
	EntityIndex int `json:"entity_index" yaml:"entity_index" schema:"entity_index,required"`
}

EntityGetIndex: The response from the `EntityGetIndex` 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 EntityGetPrimitiveIndex added in v0.2.43

type EntityGetPrimitiveIndex struct {
	// EntityType: The type of this entity.  Helps infer whether this is an edge or a face index.
	EntityType EntityType `json:"entity_type" yaml:"entity_type" schema:"entity_type,required"`
	// PrimitiveIndex: The primitive index of the entity.
	PrimitiveIndex int `json:"primitive_index" yaml:"primitive_index" schema:"primitive_index,required"`
}

EntityGetPrimitiveIndex: The response from the `EntityGetPrimitiveIndex` command.

type EntityGetSketchPaths added in v0.2.34

type EntityGetSketchPaths struct {
	// EntityIds: The UUIDs of the sketch paths.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

EntityGetSketchPaths: The response from the `EntityGetSketchPaths` command.

type EntityLinearPattern added in v0.2.29

type EntityLinearPattern struct {
	// EntityFaceEdgeIds: The Face, edge, and entity ids of the patterned entities.
	EntityFaceEdgeIds []FaceEdgeInfo `json:"entity_face_edge_ids" yaml:"entity_face_edge_ids" schema:"entity_face_edge_ids"`
}

EntityLinearPattern: The response from the `EntityLinearPattern` command.

type EntityLinearPatternTransform added in v0.2.34

type EntityLinearPatternTransform struct {
	// EntityFaceEdgeIds: The Face, edge, and entity ids of the patterned entities.
	EntityFaceEdgeIds []FaceEdgeInfo `json:"entity_face_edge_ids" yaml:"entity_face_edge_ids" schema:"entity_face_edge_ids"`
}

EntityLinearPatternTransform: The response from the `EntityLinearPatternTransform` command.

type EntityMakeHelix added in v0.2.38

type EntityMakeHelix struct {
}

EntityMakeHelix: The response from the `EntityMakeHelix` endpoint.

type EntityMakeHelixFromEdge added in v0.2.40

type EntityMakeHelixFromEdge struct {
}

EntityMakeHelixFromEdge: The response from the `EntityMakeHelixFromEdge` endpoint.

type EntityMakeHelixFromParams added in v0.2.40

type EntityMakeHelixFromParams struct {
}

EntityMakeHelixFromParams: The response from the `EntityMakeHelixFromParams` endpoint.

type EntityMirror added in v0.2.38

type EntityMirror struct {
	// EntityFaceEdgeIds: The Face, edge, and entity ids of the patterned entities.
	EntityFaceEdgeIds []FaceEdgeInfo `json:"entity_face_edge_ids" yaml:"entity_face_edge_ids" schema:"entity_face_edge_ids"`
}

EntityMirror: The response from the `EntityMirror` endpoint.

type EntityMirrorAcross added in v0.2.44

type EntityMirrorAcross struct {
	// EntityFaceEdgeIds: The Face, edge, and entity ids of the patterned entities.
	EntityFaceEdgeIds []FaceEdgeInfo `json:"entity_face_edge_ids" yaml:"entity_face_edge_ids" schema:"entity_face_edge_ids"`
}

EntityMirrorAcross: The response from the `EntityMirrorAcross` endpoint.

type EntityMirrorAcrossEdge added in v0.2.38

type EntityMirrorAcrossEdge struct {
	// EntityFaceEdgeIds: The Face, edge, and entity ids of the patterned entities.
	EntityFaceEdgeIds []FaceEdgeInfo `json:"entity_face_edge_ids" yaml:"entity_face_edge_ids" schema:"entity_face_edge_ids"`
}

EntityMirrorAcrossEdge: The response from the `EntityMirrorAcrossEdge` endpoint.

type EntityReference added in v0.2.42

type EntityReference struct {
	// EntityID: Legacy UUID of the entity to extrude to. If both `entity_id` and `entity_reference` are provided, `entity_reference` takes precedence.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"`
	// EntityReference: Entity reference (e.g. edge by side_faces). If both `entity_id` and `entity_reference` are provided, `entity_reference` takes precedence.
	EntityReference any `json:"entity_reference" yaml:"entity_reference" schema:"entity_reference"`
}

EntityReference is the type definition for a EntityReference.

type EntityReferenceEndFaces added in v0.2.44

type EntityReferenceEndFaces struct {
	// HelixID: Id of the helix object.
	HelixID UUID `json:"helix_id" yaml:"helix_id" schema:"helix_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceEndFaces: A uuid referencing a helix.

type EntityReferenceEntityReferenceTopologyFallback added in v0.2.44

type EntityReferenceEntityReferenceTopologyFallback struct {
	// RegionID: Id of the region being referenced.
	RegionID UUID `json:"region_id" yaml:"region_id" schema:"region_id,required"`
	// TopologyFallback: Fallback: path UUID + region index on that path.
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceEntityReferenceTopologyFallback: A closed sketch region/profile area.

type EntityReferenceFace added in v0.2.44

type EntityReferenceFace struct {
	// Solid3DID: Id of the solid3d being referenced.
	Solid3DID UUID `json:"solid3d_id" yaml:"solid3d_id" schema:"solid3d_id,required"`
	// TopologyFallback: Typically omitted: `solid3d_id` is already the owning body. Present for schema parity with other variants.
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceFace: A uuid referencing a solid3d (body).

type EntityReferenceFaceID added in v0.2.44

type EntityReferenceFaceID struct {
	// Index: Optional index among the filtered candidates.
	Index int `json:"index" yaml:"index" schema:"index"`
	// SideFaces: Side face ids that identify the vertex.
	SideFaces []UUID `json:"side_faces" yaml:"side_faces" schema:"side_faces,required"`
	// TopologyFallback: Fallback: solid3d UUID + vertex index on that body.
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceFaceID: A collection of ids that uniquely identify an vertex.

type EntityReferenceIndex added in v0.2.44

type EntityReferenceIndex struct {
	// EdgeID: Id of the edge being referenced.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// TopologyFallback: Fallback: solid2d UUID + curve index in that profile.
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceIndex: A uuid referencing an edge on a solid2d (profile) - used for raw sketch/profile edges. This is distinct from the face-based Edge reference which is used for BRep/swept body edges.

type EntityReferencePlane added in v0.2.44

type EntityReferencePlane struct {
	// EndFaces: Optional end face ids for ambiguous edge matches.
	EndFaces []UUID `json:"end_faces" yaml:"end_faces" schema:"end_faces"`
	// Index: Optional index for disambiguation when multiple edges share the same faces. If not provided (None), all matching edges will be used. If provided (Some(n)), only the edge at index n will be used.
	Index int `json:"index" yaml:"index" schema:"index"`
	// SideFaces: Side face ids that uniquely identify the edge.
	SideFaces []UUID `json:"side_faces" yaml:"side_faces" schema:"side_faces,required"`
	// TopologyFallback: Fallback: solid3d UUID + edge index on that body for 3D BREP edges (distinct from `inner.index`).
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferencePlane: A collection of ids that uniquely identify an edge.

type EntityReferencePlaneID added in v0.2.44

type EntityReferencePlaneID struct {
	// PlaneID: Id of the plane being referenced.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// TopologyFallback: Optional primitive topology on a parent (not used for planes today).
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferencePlaneID: A uuid referencing a plane.

type EntityReferenceSideFaces added in v0.2.44

type EntityReferenceSideFaces struct {
	// PathID: Id of the path containing the segment.
	PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"`
	// SegmentID: Id of the segment (curve) being referenced.
	SegmentID UUID `json:"segment_id" yaml:"segment_id" schema:"segment_id,required"`
	// TopologyFallback: Fallback: path UUID + segment curve index.
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceSideFaces: A single segment (curve) within a path.

type EntityReferenceTopologyFallback added in v0.2.44

type EntityReferenceTopologyFallback struct {
	// FaceID: Id of the face being referenced.
	FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
	// TopologyFallback: Fallback: solid3d UUID + face index on that body when `face_id` cannot be resolved client-side.
	TopologyFallback PrimitiveTopologyFallback `json:"topology_fallback" yaml:"topology_fallback" schema:"topology_fallback"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

EntityReferenceTopologyFallback: A uuid referencing a face.

type EntitySetOpacity added in v0.2.38

type EntitySetOpacity struct {
}

EntitySetOpacity: The response from the `EntitySetOpacity` endpoint.

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"
	// EntityTypeSegment represents the EntityType `"segment"`.
	EntityTypeSegment EntityType = "segment"
	// 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"
	// EntityTypeRegion represents the EntityType `"region"`.
	EntityTypeRegion EntityType = "region"
	// EntityTypePatterngroup represents the EntityType `"patterngroup"`.
	EntityTypePatterngroup EntityType = "patterngroup"
)

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"
	// ErrorCodeAuthTokenMissing: Auth token is missing from the request
	ErrorCodeAuthTokenMissing ErrorCode = "auth_token_missing"
	// ErrorCodeAuthTokenInvalid: Auth token is invalid in some way (expired, incorrect format, etc)
	ErrorCodeAuthTokenInvalid ErrorCode = "auth_token_invalid"
	// 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 did not configure the server to establish WebRTC.
	ErrorCodeMessageTypeNotAcceptedForWebRTC ErrorCode = "message_type_not_accepted_for_web_r_t_c"
)

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`

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"log"
	"os"
	"os/signal"
	"time"

	"github.com/gorilla/websocket"
	"github.com/kittycad/kittycad.go"
)

func main() {
	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
		}
	}

}

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 Export2D added in v0.2.40

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

Export2D: The response from the `Export2d` endpoint.

type Export3D added in v0.2.40

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

Export3D: The response from the `Export3d` 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 ExtendPath added in v0.2.18

type ExtendPath struct {
}

ExtendPath: The response from the `ExtendPath` endpoint.

type ExtendedUser added in v0.0.9

type ExtendedUser struct {
	// AllowPayAsYouGo: Whether the user has opted into pay-as-you-go charges after using their included credits.
	AllowPayAsYouGo bool `json:"allow_pay_as_you_go" yaml:"allow_pay_as_you_go" schema:"allow_pay_as_you_go"`
	// 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"`
	// DeletionScheduled: If the user is scheduled for deletion
	DeletionScheduled bool `json:"deletion_scheduled" yaml:"deletion_scheduled" schema:"deletion_scheduled"`
	// 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"`
	// IsOnboarded: If the user has finished onboarding.
	IsOnboarded bool `json:"is_onboarded" yaml:"is_onboarded" schema:"is_onboarded"`
	// 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"`
	// 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"`
	// Username: Public username/handle for community-facing features.
	Username string `json:"username" yaml:"username" schema:"username"`
}

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: Stripe

type Extrude added in v0.2.13

type Extrude struct {
	// BodiesCreated: Any new bodies created by the request.
	BodiesCreated BodiesCreated `json:"bodies_created" yaml:"bodies_created" schema:"bodies_created"`
	// BodiesUpdated: Any existing bodies updated by the request.
	BodiesUpdated BodiesUpdated `json:"bodies_updated" yaml:"bodies_updated" schema:"bodies_updated"`
}

Extrude: The response from the `Extrude` endpoint.

type ExtrudeMethod added in v0.2.42

type ExtrudeMethod string

ExtrudeMethod: Extrusion method determining if the extrusion will be part of the existing object or an entirely new object.

const (
	// ExtrudeMethodNew: Create a new object that is not connected to the object it is extruded from. This will result in two objects after the operation.
	ExtrudeMethodNew ExtrudeMethod = "new"
	// ExtrudeMethodMerge: This extrusion will be part of object it is extruded from. This will result in one object after the operation.
	ExtrudeMethodMerge ExtrudeMethod = "merge"
)

type ExtrudeReference added in v0.2.42

type ExtrudeReference any

ExtrudeReference: ExtrudeReference: Type of reference geometry to extrude to.

type ExtrudeReferenceAxis added in v0.2.42

type ExtrudeReferenceAxis struct {
	// Axis:
	Axis Axis `json:"axis" yaml:"axis" schema:"axis,required"`
}

ExtrudeReferenceAxis: Extrudes until the top face is as close as possible to this given axis.

type ExtrudeReferenceEntityReference added in v0.2.42

type ExtrudeReferenceEntityReference struct {
	// EntityReference:
	EntityReference EntityReference `json:"entity_reference" yaml:"entity_reference" schema:"entity_reference,required"`
}

ExtrudeReferenceEntityReference: Extrudes along the normal of the top face until it is as close to the entity as possible. An entity can be a solid, a path, a face, an edge (via `entity_reference`), etc.

type ExtrudeReferencePoint added in v0.2.42

type ExtrudeReferencePoint struct {
	// Point:
	Point Point `json:"point" yaml:"point" schema:"point,required"`
}

ExtrudeReferencePoint: Extrudes until the top face is as close as possible to this given point.

type ExtrudeToReference added in v0.2.42

type ExtrudeToReference struct {
	// BodiesCreated: Any new bodies created by the request.
	BodiesCreated BodiesCreated `json:"bodies_created" yaml:"bodies_created" schema:"bodies_created"`
	// BodiesUpdated: Any existing bodies updated by the request.
	BodiesUpdated BodiesUpdated `json:"bodies_updated" yaml:"bodies_updated" schema:"bodies_updated"`
}

ExtrudeToReference: The response from the `ExtrudeToReference` endpoint.

type ExtrudedFaceInfo added in v0.2.40

type ExtrudedFaceInfo struct {
	// Bottom: The face made from the original 2D shape being extruded. If the solid is extruded from a shape which already has an ID (e.g. extruding something which was sketched on a face), this doesn't need to be sent.
	Bottom UUID `json:"bottom" yaml:"bottom" schema:"bottom"`
	// Sides: Any intermediate sides between the top and bottom.
	Sides []SideFace `json:"sides" yaml:"sides" schema:"sides,required"`
	// Top: Top face of the extrusion (parallel and further away from the original 2D shape being extruded).
	Top UUID `json:"top" yaml:"top" schema:"top,required"`
}

ExtrudedFaceInfo: IDs for the extruded faces.

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"
	// ExtrusionFaceCapTypeBoth: Capped on both ends.
	ExtrusionFaceCapTypeBoth ExtrusionFaceCapType = "both"
)

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 FaceEdgeInfo added in v0.2.41

type FaceEdgeInfo struct {
	// Edges: The edges of each object.
	Edges []UUID `json:"edges" yaml:"edges" schema:"edges,required"`
	// Faces: The faces of each object.
	Faces []UUID `json:"faces" yaml:"faces" schema:"faces,required"`
	// ObjectID: The UUID of the object.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
}

FaceEdgeInfo: Faces and edges id info (most used in identifying geometry in patterned and mirrored objects).

type FaceGetCenter added in v0.2.34

type FaceGetCenter struct {
	// Pos: The 3D position on the surface center of mass
	Pos Point3D `json:"pos" yaml:"pos" schema:"pos,required"`
}

FaceGetCenter: The 3D center of mass on the surface

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 FactoryCustomerCatalogOption added in v0.2.44

type FactoryCustomerCatalogOption struct {
	// Name: Exact catalog name to submit in the corresponding intake field.
	Name string `json:"name" yaml:"name" schema:"name,required"`
}

FactoryCustomerCatalogOption: One customer-selectable Factory catalog entry.

type FactoryCustomerCatalogOptionResultsPage added in v0.2.44

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

FactoryCustomerCatalogOptionResultsPage: A single page of results

type FactoryCustomerJobDetail added in v0.2.44

type FactoryCustomerJobDetail struct {
	// CurrentVersion: The current version, if the job has one.
	CurrentVersion FactoryCustomerJobVersion `json:"current_version" yaml:"current_version" schema:"current_version"`
	// Job: The same summary returned by the customer job list.
	Job FactoryCustomerJobSummary `json:"job" yaml:"job" schema:"job,required"`
}

FactoryCustomerJobDetail: Customer-visible detail for a single Factory job.

type FactoryCustomerJobSummary added in v0.2.44

type FactoryCustomerJobSummary struct {
	// CreatedAt: When the job was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// CurrentVersionID: The job's current version, when one exists.
	CurrentVersionID UUID `json:"current_version_id" yaml:"current_version_id" schema:"current_version_id"`
	// ID: Stable customer-facing job identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Status: Current manufacturing workflow status.
	Status string `json:"status" yaml:"status" schema:"status,required"`
	// UpdatedAt: When the job was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

FactoryCustomerJobSummary: Customer-visible summary of a manufacturing job.

type FactoryCustomerJobSummaryResultsPage added in v0.2.44

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

FactoryCustomerJobSummaryResultsPage: A single page of results

type FactoryCustomerJobVersion added in v0.2.44

type FactoryCustomerJobVersion struct {
	// CreatedAt: When this version was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// FileNames: Names of files attached to this version, without storage locations.
	FileNames []string `json:"file_names" yaml:"file_names" schema:"file_names,required"`
	// ID: Identifier of the current version.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Specs: Customer-visible fields from the version's intake payload.
	Specs any `json:"specs" yaml:"specs" schema:"specs,required"`
}

FactoryCustomerJobVersion: Customer-visible snapshot of the current job version. File names are display metadata; no private storage URI or download capability is exposed.

type FactoryJobResponse added in v0.2.44

type FactoryJobResponse struct {
	// CurrentVersionID: The current (first) version id of the job.
	CurrentVersionID UUID `json:"current_version_id" yaml:"current_version_id" schema:"current_version_id"`
	// ID: The stable, customer-facing job id.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Status: The initial workflow status (`new`).
	Status string `json:"status" yaml:"status" schema:"status,required"`
}

FactoryJobResponse: Response returned when a Factory job is created. Only customer-facing ids are exposed: the job id (the customer's reference) and its current version id. The internal Help Desk thread id is deliberately NOT returned (internal-only per the ERD).

type FactoryService added in v0.2.44

type FactoryService service

FactoryService: Operations for submitting and managing Factory manufacturing jobs.

func (*FactoryService) CreateUserJob added in v0.2.44

func (s *FactoryService) CreateUserJob(body *MultipartForm) (*FactoryJobResponse, error)

CreateUserJob: Submit a part for manufacturing. Requires a signed-in Zoo account. The request is `multipart/form-data`: - one JSON part named `body` (`FactoryIntakeForm`) whose `fields` object holds intake data (material, finish, quantity, notes, …). Material and finish are required customer-visible catalog names; all other fields are stored verbatim so they can be added or renamed without an API change. - one or more file parts (any part name). At least one file is required.

The submitter's identity (email, name, user id) comes from the authenticated account, not the form.

Fetch `GET /user/factory/materials` and `GET /user/factory/finishes`, then send the returned exact `material` and `finish` names. The server rejects missing, non-string, unknown, deleted, and internal-only choices with these stable field-specific `error_code` values: - `factory_material_input_missing` - `factory_material_input_invalid_type` - `factory_material_not_found` - `factory_material_not_customer_visible` - `factory_finish_input_missing` - `factory_finish_input_invalid_type` - `factory_finish_not_found` - `factory_finish_not_customer_visible` - `quantity`: a positive integer.

Example `body` part: ```json { "fields": { "material": "6061 Aluminum", "finish": "Anodized", "quantity": 10, "notes": "deburr all edges" } } ```

Example request (curl): ``` curl -X POST https://api.zoo.dev/user/factory/jobs \ -H "Authorization: Bearer $ZOO_API_TOKEN" \ -F 'body={"fields":{"material":"6061 Aluminum","finish":"Anodized","quantity":10}};type=application/json' \ -F 'file=@bracket.step' ```

Returns `201` with the created job (`FactoryJobResponse`).

Parameters

  • `body`
Example

CreateUserJob: Submit a part for manufacturing. Requires a signed-in Zoo account. The request is `multipart/form-data`: - one JSON part named `body` (`FactoryIntakeForm`) whose `fields` object holds intake data (material, finish, quantity, notes, …). Material and finish are required customer-visible catalog names; all other fields are stored verbatim so they can be added or renamed without an API change. - one or more file parts (any part name). At least one file is required.

The submitter's identity (email, name, user id) comes from the authenticated account, not the form.

Fetch `GET /user/factory/materials` and `GET /user/factory/finishes`, then send the returned exact `material` and `finish` names. The server rejects missing, non-string, unknown, deleted, and internal-only choices with these stable field-specific `error_code` values: - `factory_material_input_missing` - `factory_material_input_invalid_type` - `factory_material_not_found` - `factory_material_not_customer_visible` - `factory_finish_input_missing` - `factory_finish_input_invalid_type` - `factory_finish_not_found` - `factory_finish_not_customer_visible` - `quantity`: a positive integer.

Example `body` part: ```json { "fields": { "material": "6061 Aluminum", "finish": "Anodized", "quantity": 10, "notes": "deburr all edges" } } ```

Example request (curl): ``` curl -X POST https://api.zoo.dev/user/factory/jobs \ -H "Authorization: Bearer $ZOO_API_TOKEN" \ -F 'body={"fields":{"material":"6061 Aluminum","finish":"Anodized","quantity":10}};type=application/json' \ -F 'file=@bracket.step' ```

Returns `201` with the created job (`FactoryJobResponse`).

Parameters

  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

	result, err := client.Factory.CreateUserJob(form)
	if err != nil {
		panic(err)
	}

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

}

func (*FactoryService) GetOrgJob added in v0.2.44

func (s *FactoryService) GetOrgJob(jobId UUID) (*FactoryCustomerJobDetail, error)

GetOrgJob: Get an organization-owned Factory job for any current member. Parameters

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

GetOrgJob: Get an organization-owned Factory job for any current member. Parameters

  • `jobId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*FactoryService) GetUserFinishes added in v0.2.44

func (s *FactoryService) GetUserFinishes(limit int, pageToken string) (*FactoryCustomerCatalogOptionResultsPage, error)

GetUserFinishes: List finishes currently available for customer Factory submissions. Internal-only entries are omitted. Results are ordered alphabetically, ignoring case, with "Other" last. Clients should refetch this endpoint after a catalog validation error before asking the customer to choose again.

Parameters

  • `limit`
  • `pageToken`
Example

GetUserFinishes: List finishes currently available for customer Factory submissions. Internal-only entries are omitted. Results are ordered alphabetically, ignoring case, with "Other" last. Clients should refetch this endpoint after a catalog validation error before asking the customer to choose again.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*FactoryService) GetUserJob added in v0.2.44

func (s *FactoryService) GetUserJob(jobId UUID) (*FactoryCustomerJobDetail, error)

GetUserJob: Get a personal Factory job and its current customer-visible specifications. Parameters

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

GetUserJob: Get a personal Factory job and its current customer-visible specifications. Parameters

  • `jobId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*FactoryService) GetUserMaterials added in v0.2.44

func (s *FactoryService) GetUserMaterials(limit int, pageToken string) (*FactoryCustomerCatalogOptionResultsPage, error)

GetUserMaterials: List materials currently available for customer Factory submissions. Internal-only entries are omitted. Results are ordered alphabetically, ignoring case, with "Other" last. Clients should refetch this endpoint after a catalog validation error before asking the customer to choose again.

Parameters

  • `limit`
  • `pageToken`
Example

GetUserMaterials: List materials currently available for customer Factory submissions. Internal-only entries are omitted. Results are ordered alphabetically, ignoring case, with "Other" last. Clients should refetch this endpoint after a catalog validation error before asking the customer to choose again.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*FactoryService) ListOrgJobs added in v0.2.44

func (s *FactoryService) ListOrgJobs(limit int, pageToken string, sortBy CreatedAtSortMode) (*FactoryCustomerJobSummaryResultsPage, error)

ListOrgJobs: List Factory jobs owned by your organization. Any current organization member can list its jobs, including archived jobs. Ownership uses the job's stored organization, so a submitter leaving or deleting their account does not move the job. Former members lose access. Results are paginated, newest first by default, with the job id breaking ties. Internal communication, financial details, and file storage locations are omitted.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

Example

ListOrgJobs: List Factory jobs owned by your organization. Any current organization member can list its jobs, including archived jobs. Ownership uses the job's stored organization, so a submitter leaving or deleting their account does not move the job. Former members lose access. Results are paginated, newest first by default, with the job id breaking ties. Internal communication, financial details, and file storage locations are omitted.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*FactoryService) ListUserJobs added in v0.2.44

func (s *FactoryService) ListUserJobs(limit int, pageToken string, sortBy CreatedAtSortMode) (*FactoryCustomerJobSummaryResultsPage, error)

ListUserJobs: List your personal Factory jobs. Returns jobs owned by your account, including archived jobs. Jobs with an organization owner belong to that organization, even when your account is also associated with them; use `GET /org/factory/jobs` to list those jobs. Results are paginated, newest first by default, with the job id breaking ties. Internal communication, financial details, and file storage locations are omitted.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

Example

ListUserJobs: List your personal Factory jobs. Returns jobs owned by your account, including archived jobs. Jobs with an organization owner belong to that organization, even when your account is also associated with them; use `GET /org/factory/jobs` to list those jobs. Results are paginated, newest first by default, with the job id breaking ties. Internal communication, financial details, and file storage locations are omitted.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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 Feature added in v0.2.44

type Feature string

Feature: Feature-like switches determined by environment, rules, and overrides.

const (
	// FeatureAuthRestrictedToEmployees: When enabled, auth is restricted to only employees.
	FeatureAuthRestrictedToEmployees Feature = "auth_restricted_to_employees"
	// FeatureBigQueryTelemetry: Enables emitting telemetry to BigQuery, otherwise received telemetry is just dropped.
	FeatureBigQueryTelemetry Feature = "big_query_telemetry"
	// FeatureBilling: Internal ledger and contract billing are enabled.
	FeatureBilling Feature = "billing"
	// FeatureDisallowSelfSignup: Disable signup through email or OAuth.
	FeatureDisallowSelfSignup Feature = "disallow_self_signup"
	// FeatureEmailWithSES: Email sending is handled by AWS SES.
	FeatureEmailWithSES Feature = "email_with_s_e_s"
	// FeatureExecutionJobs: Grants access to the internal execution jobs API.
	FeatureExecutionJobs Feature = "execution_jobs"
	// FeatureEnableZ0006Lint: Enables the Z0006 lint, for converting to new face api syntax in Zoo Design Studio.
	FeatureEnableZ0006Lint Feature = "enable_z0006_lint"
	// FeatureFactoryPortal: Enables the Factory portal.
	FeatureFactoryPortal Feature = "factory_portal"
	// FeatureKclCekExecutor: KCL CEK machine executor.
	FeatureKclCekExecutor Feature = "kcl_cek_executor"
	// FeatureKclNewLexerParser: New KCL lexer and parser.
	FeatureKclNewLexerParser Feature = "kcl_new_lexer_parser"
	// FeatureRedirectToGovcloud: Immediately redirect to our Govcloud environment (zoogov.dev).
	FeatureRedirectToGovcloud Feature = "redirect_to_govcloud"
	// FeatureRequireSamlAuth: Requires SAML auth and orgs for all users.
	FeatureRequireSamlAuth Feature = "require_saml_auth"
	// FeatureLocalDev: Only to be used only for local development. Allows bypassing certain features or makes local dev easier.
	FeatureLocalDev Feature = "local_dev"
	// FeatureNewsletter: Enables customers to subscribe to our newsletter.
	FeatureNewsletter Feature = "newsletter"
	// FeaturePrefixEmailSubject: Prefix email subjects with the environment so we can better identify the source.
	FeaturePrefixEmailSubject Feature = "prefix_email_subject"
	// FeatureEnterpriseCockroach: Enterprise-only CockroachDB features (like `REGIONAL BY ROW`) are enabled in this environment.
	FeatureEnterpriseCockroach Feature = "enterprise_cockroach"
	// FeatureSameSiteNoneCookies: Always use cookies with same-site=none.
	FeatureSameSiteNoneCookies Feature = "same_site_none_cookies"
	// FeatureValidateTaxInfo: Notify us via slack if we're missing tax info for a customer.
	FeatureValidateTaxInfo Feature = "validate_tax_info"
	// FeatureDfmReview: Enables DFM Review mode in Zoo Design Studio.
	FeatureDfmReview Feature = "dfm_review"
	// FeatureDrawings: Enables drawing features across Zoo applications.
	FeatureDrawings Feature = "drawings"
	// FeatureModelingDialogs: Enables modeling dialogs in Zoo Design Studio.
	FeatureModelingDialogs Feature = "modeling_dialogs"
	// FeatureNamedViewsUi: Enables the named views user interface in Zoo Design Studio.
	FeatureNamedViewsUi Feature = "named_views_ui"
	// FeaturePlugins: Enables plugins in Zoo Design Studio.
	FeaturePlugins Feature = "plugins"
	// FeatureProprietaryToKclConversionBeta: Grants access to the beta proprietary-to-KCL conversion endpoint.
	FeatureProprietaryToKclConversionBeta Feature = "proprietary_to_kcl_conversion_beta"
	// FeatureSegmentsBasedRegions: Enables the topological segments-based region API for point-and-click in Zoo Design Studio.
	FeatureSegmentsBasedRegions Feature = "segments_based_regions"
	// FeatureLegacySketchMode: Allows legacy sketches to be edited using point-and-click in Zoo Design Studio.
	FeatureLegacySketchMode Feature = "legacy_sketch_mode"
	// FeatureSketchExperimentalFeatures: Enables sketch solve experimental features in Zoo Design Studio.
	FeatureSketchExperimentalFeatures Feature = "sketch_experimental_features"
	// FeatureZookeeperProMode: Enables Zookeeper Pro mode access in ML Copilot.
	FeatureZookeeperProMode Feature = "zookeeper_pro_mode"
	// FeatureZookeeperUltraMode: Enables Zookeeper Ultra mode access in ML Copilot.
	FeatureZookeeperUltraMode Feature = "zookeeper_ultra_mode"
	// FeatureZookeeperClientCommands: Enables experimental execution of client-advertised commands from Zookeeper.
	FeatureZookeeperClientCommands Feature = "zookeeper_client_commands"
	// FeatureZookeeperKclMigration: Enables sponsored, time-limited KCL project migration.
	FeatureZookeeperKclMigration Feature = "zookeeper_kcl_migration"
	// FeatureUnsafeAllowAPIKeyAuth: Allow creating a session via an existing API key
	FeatureUnsafeAllowAPIKeyAuth Feature = "unsafe_allow_api_key_auth"
	// FeatureUnsafeAllowLocalhostShortlinks: Allow shortlinks to have a domain of localhost.
	FeatureUnsafeAllowLocalhostShortlinks Feature = "unsafe_allow_localhost_shortlinks"
	// FeatureZooCorpAuth: Enable ZooCorp OAuth2. This adds https://auth.corp.zoo.dev as an OAuth2 provider.
	FeatureZooCorpAuth Feature = "zoo_corp_auth"
)

type FileBoundingBox added in v0.2.44

type FileBoundingBox struct {
	// BoundingBox: The resulting axis-aligned bounding box in the KittyCAD coordinate system (+Z up, -Y forward).
	BoundingBox BoundingBox `json:"bounding_box" yaml:"bounding_box" schema:"bounding_box"`
	// 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 bounding box.
	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"`
}

FileBoundingBox: A file bounding box result.

type FileCenterOfMass added in v0.2.8

type FileCenterOfMass struct {
	// CenterOfMass: The resulting center of mass in the KittyCAD coordinate system (+Z up, -Y forward).
	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 (
	// FileImportFormatAcis: ACIS part format.
	FileImportFormatAcis FileImportFormat = "acis"
	// FileImportFormatCatia: CATIA part format.
	FileImportFormatCatia FileImportFormat = "catia"
	// FileImportFormatCreo: PTC Creo part format.
	FileImportFormatCreo FileImportFormat = "creo"
	// FileImportFormatFbx: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX>
	FileImportFormatFbx FileImportFormat = "fbx"
	// FileImportFormatGltf: glTF 2.0.
	FileImportFormatGltf FileImportFormat = "gltf"
	// FileImportFormatInventor: Autodesk Inventor part format.
	FileImportFormatInventor FileImportFormat = "inventor"
	// FileImportFormatNx: Siemens NX part format.
	FileImportFormatNx FileImportFormat = "nx"
	// 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"
	// FileImportFormatParasolid: Parasolid part format.
	FileImportFormatParasolid FileImportFormat = "parasolid"
	// 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) CreateBoundingBox added in v0.2.44

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

CreateBoundingBox: Get CAD file bounding box. Import the CAD file into the modeling engine and calculate its bounding box.

This endpoint returns the axis-aligned bounding box as a center and dimensions in the output units, using KittyCAD coordinates (+Z up, -Y forward).

This operation is always performed asynchronously, regardless of file size. The request returns the `id` of the operation. Use this `id` to get the status and bounding box from the `/async/operations/{id}` endpoint.

Parameters

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

CreateBoundingBox: Get CAD file bounding box. Import the CAD file into the modeling engine and calculate its bounding box.

This endpoint returns the axis-aligned bounding box as a center and dimensions in the output units, using KittyCAD coordinates (+Z up, -Y forward).

This operation is always performed asynchronously, regardless of file size. The request returns the `id` of the operation. Use this `id` to get the status and bounding box from the `/async/operations/{id}` endpoint.

Parameters

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*FileService) CreateCenterOfMass added in v0.2.8

func (s *FileService) CreateCenterOfMass(srcFormat FileImportFormat, outputUnit UnitLength, 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 the KittyCAD coordinate system (+Z up, -Y forward) using the requested 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

  • `srcFormat`: The valid types of source file formats.
  • `outputUnit`: The valid types of length units.
  • `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 the KittyCAD coordinate system (+Z up, -Y forward) using the requested 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

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*FileService) CreateConversion added in v0.0.9

func (s *FileService) CreateConversion(srcFormat FileImportFormat, outputFormat FileExportFormat, 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

  • `srcFormat`: The valid types of source file formats.
  • `outputFormat`: The valid types of output 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

  • `srcFormat`: The valid types of source file formats.
  • `outputFormat`: The valid types of output file formats.
  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*FileService) CreateConversionOptions added in v0.2.42

func (s *FileService) CreateConversionOptions(body *MultipartForm) (*FileConversion, error)

CreateConversionOptions: Convert CAD file from one format to another. This takes a HTTP multipart body with these fields in any order:

  • The input and output format options (as JSON), name is 'body'. - The files to convert, in raw binary. Must supply filenames.

This starts a conversion job and returns the `id` of the operation. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.

Parameters

  • `body`: Describes the file to convert (src) and what it should be converted into (output).
Example

CreateConversionOptions: Convert CAD file from one format to another. This takes a HTTP multipart body with these fields in any order:

  • The input and output format options (as JSON), name is 'body'. - The files to convert, in raw binary. Must supply filenames.

This starts a conversion job and returns the `id` of the operation. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.

Parameters

  • `body`: Describes the file to convert (src) and what it should be converted into (output).
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

	result, err := client.File.CreateConversionOptions(form)
	if err != nil {
		panic(err)
	}

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

}

func (*FileService) CreateDensity added in v0.1.6

func (s *FileService) CreateDensity(srcFormat FileImportFormat, materialMass float64, materialMassUnit UnitMas, outputUnit UnitDensity, 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

  • `srcFormat`: The valid types of source file formats.
  • `materialMass`
  • `materialMassUnit`: The valid types of mass units.
  • `outputUnit`: The valid types for density units.
  • `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

  • `srcFormat`: The valid types of source file formats.
  • `materialMass`
  • `materialMassUnit`: The valid types of mass units.
  • `outputUnit`: The valid types for density units.
  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*FileService) CreateMass added in v0.1.4

func (s *FileService) CreateMass(srcFormat FileImportFormat, materialDensity float64, materialDensityUnit UnitDensity, outputUnit UnitMas, 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

  • `srcFormat`: The valid types of source file formats.
  • `materialDensity`
  • `materialDensityUnit`: The valid types for density units.
  • `outputUnit`: The valid types of mass units.
  • `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

  • `srcFormat`: The valid types of source file formats.
  • `materialDensity`
  • `materialDensityUnit`: The valid types for density units.
  • `outputUnit`: The valid types of mass units.
  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*FileService) CreateSurfaceArea added in v0.2.8

func (s *FileService) CreateSurfaceArea(srcFormat FileImportFormat, outputUnit UnitArea, 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

  • `srcFormat`: The valid types of source file formats.
  • `outputUnit`: The valid types of area units.
  • `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

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*FileService) CreateVolume added in v0.1.4

func (s *FileService) CreateVolume(srcFormat FileImportFormat, outputUnit UnitVolume, 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

  • `srcFormat`: The valid types of source file formats.
  • `outputUnit`: The valid types of volume units.
  • `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

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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 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 Files added in v0.2.43

type Files struct {
	// Files: The list of files being sent.
	Files []MlCopilotFile `json:"files" yaml:"files" schema:"files,required"`
}

Files is the type definition for a Files.

type Fillet added in v0.2.42

type Fillet struct {
	// Radius: The radius of the fillet.
	Radius float64 `json:"radius" yaml:"radius" schema:"radius,required"`
	// SecondLength: The second length affects the edge length of the second face of the cut. This will cause the fillet to take on the shape of a conic section, instead of an arc.
	SecondLength float64 `json:"second_length" yaml:"second_length" schema:"second_length"`
}

Fillet is the type definition for a Fillet.

type FractionOfEdge added in v0.2.43

type FractionOfEdge struct {
	// EdgeID: The id of the edge (legacy). If both `edge_id` and `edge_specifier` are provided, `edge_specifier` takes precedence.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id"`
	// EdgeSpecifier: Edge specifier (side_faces, end_faces, index) identifying the edge. If both `edge_id` and `edge_specifier` are provided, `edge_specifier` takes precedence.
	EdgeSpecifier EdgeSpecifier `json:"edge_specifier" yaml:"edge_specifier" schema:"edge_specifier"`
	// LowerBound: A value between [0.0, 1.0] (default 0.0) that is a percentage along the edge. This bound will control how much of the edge is used during the blend. If lower_bound is larger than upper_bound, the edge is effectively "flipped".
	LowerBound float64 `json:"lower_bound" yaml:"lower_bound" schema:"lower_bound"`
	// UpperBound: A value between [0.0, 1.0] (default 1.0) that is a percentage along the edge. This bound will control how much of the edge is used during the blend. If lower_bound is larger than upper_bound, the edge is effectively "flipped".
	UpperBound float64 `json:"upper_bound" yaml:"upper_bound" schema:"upper_bound"`
}

FractionOfEdge: An edge id and an upper and lower percentage bound of the edge.

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 {
	// Origin: The origin.
	Origin Point3D `json:"origin" yaml:"origin" schema:"origin,required"`
	// 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 HandleMouseDragEnd added in v0.2.38

type HandleMouseDragEnd struct {
}

HandleMouseDragEnd: The response from the `HandleMouseDragEnd` endpoint.

type HandleMouseDragMove added in v0.2.38

type HandleMouseDragMove struct {
}

HandleMouseDragMove: The response from the `HandleMouseDragMove` endpoint.

type HandleMouseDragStart added in v0.2.38

type HandleMouseDragStart struct {
}

HandleMouseDragStart: The response from the `HandleMouseDragStart` endpoint.

type HiddenService added in v0.1.4

type HiddenService service

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

func (*HiddenService) AuthAPIKey added in v0.2.42

func (s *HiddenService) AuthAPIKey() (*AuthAPIKeyResponse, error)

AuthAPIKey: Authenticate using an api-key. This is disabled on production but can be used in dev to login without email magic. This returns a session token.

Example

AuthAPIKey: Authenticate using an api-key. This is disabled on production but can be used in dev to login without email magic. This returns a session token.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Hidden.AuthAPIKey()
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"
	"net/url"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*HiddenService) AuthEmailCallback added in v0.2.4

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

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

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

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

  • `callbackUrl`
  • `token`
  • `email`
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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"}}, "some-string", "example@example.com"); err != nil {
		panic(err)
	}

}

func (*HiddenService) AuthEmailMarketingConfirmCreate added in v0.2.43

func (s *HiddenService) AuthEmailMarketingConfirmCreate(body EmailMarketingConfirmTokenBody) error

AuthEmailMarketingConfirmCreate: Consume a confirmation token and finalize double opt-in. Parameters

  • `body`: Request payload for confirming a double-opt-in token.
Example

AuthEmailMarketingConfirmCreate: Consume a confirmation token and finalize double opt-in. Parameters

  • `body`: Request payload for confirming a double-opt-in token.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Hidden.AuthEmailMarketingConfirmCreate(kittycad.EmailMarketingConfirmTokenBody{Token: "some-string"}); err != nil {
		panic(err)
	}

}

func (*HiddenService) DownloadSharedProject added in v0.2.43

func (s *HiddenService) DownloadSharedProject(key string, format ProjectArchiveFormat) error

DownloadSharedProject: Download a project using a share link. Parameters

  • `key`
  • `format`: Archive formats supported by project download endpoints.
Example

DownloadSharedProject: Download a project using a share link. Parameters

  • `key`
  • `format`: Archive formats supported by project download endpoints.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Hidden.DownloadSharedProject("some-string", ""); err != nil {
		panic(err)
	}

}

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`
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}

func (*HiddenService) GetAuthSamlByOrg added in v0.2.42

func (s *HiddenService) GetAuthSamlByOrg(orgId UUID, callbackUrl URL) error

GetAuthSamlByOrg: GET /auth/saml/{org_id} Redirects the browser straight to the org’s SAML IdP.

Parameters

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

GetAuthSamlByOrg: GET /auth/saml/{org_id} Redirects the browser straight to the org’s SAML IdP.

Parameters

  • `orgId`: A UUID usually v4 or v7
  • `callbackUrl`
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

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

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

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

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`
package main

import (
	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}
func (s *HiddenService) RedirectUserShortlink(key string) error

RedirectUserShortlink: Redirect the user to the URL for the shortlink. This endpoint might require authentication by a Zoo user. It gets the shortlink for the user and redirects them to the URL. If the shortlink is owned by an org, the user must be a member of the org.

Parameters

  • `key`

type HighlightSetEntities added in v0.2.38

type HighlightSetEntities struct {
}

HighlightSetEntities: The response from the `HighlightSetEntities` endpoint.

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 {
	*netip.Addr
}

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 IdpMetadataSource added in v0.2.42

type IdpMetadataSource any

IdpMetadataSource: IdpMetadataSource: The source of an identity provider metadata descriptor.

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

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 Info added in v0.2.42

type Info struct {
	// Text: The informational text.
	Text string `json:"text" yaml:"text" schema:"text,required"`
}

Info is the type definition for a Info.

type InputFormat3D added in v0.2.42

type InputFormat3D any

InputFormat3D: InputFormat3D: Input format specifier.

type InputFormat3Dacis added in v0.2.44

type InputFormat3Dacis struct {
	// Coords: Co-ordinate system of input data.
	Coords System `json:"coords" yaml:"coords" schema:"coords"`
	// SplitClosedFaces: Splits all closed faces into two open faces.
	//
	// Defaults to `false` but is implicitly `true` when importing into the engine.
	SplitClosedFaces bool `json:"split_closed_faces" yaml:"split_closed_faces" schema:"split_closed_faces"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormat3Dacis: PTC Creo part format.

type InputFormat3Dcatia added in v0.2.44

type InputFormat3Dcatia struct {
	// Coords: Co-ordinate system of input data.
	Coords System `json:"coords" yaml:"coords" schema:"coords"`
	// SplitClosedFaces: Splits all closed faces into two open faces.
	//
	// Defaults to `false` but is implicitly `true` when importing into the engine.
	SplitClosedFaces bool `json:"split_closed_faces" yaml:"split_closed_faces" schema:"split_closed_faces"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormat3Dcatia: Autodesk Inventor part format.

type InputFormat3Dcoords added in v0.2.40

type InputFormat3Dcoords 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"`
	// SplitClosedFaces: Splits all closed faces into two open faces.
	//
	// Defaults to `false` but is implicitly `true` when importing into the engine.
	SplitClosedFaces bool `json:"split_closed_faces" yaml:"split_closed_faces" schema:"split_closed_faces"`
	// TargetRepresentation: What representation should be used for this file after it's imported?
	TargetRepresentation StepImportTargetRepresentation `json:"target_representation" yaml:"target_representation" schema:"target_representation"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormat3Dcoords: ISO 10303-21 (STEP) format.

type InputFormat3Dcreo added in v0.2.44

type InputFormat3Dcreo struct {
	// Coords: Co-ordinate system of input data.
	Coords System `json:"coords" yaml:"coords" schema:"coords"`
	// SplitClosedFaces: Splits all closed faces into two open faces.
	//
	// Defaults to `false` but is implicitly `true` when importing into the engine.
	SplitClosedFaces bool `json:"split_closed_faces" yaml:"split_closed_faces" schema:"split_closed_faces"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormat3Dcreo: Parasolid part format.

type InputFormat3Dfbx added in v0.2.40

type InputFormat3Dfbx 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 millimeters.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

InputFormat3Dfbx: The PLY Polygon File Format.

type InputFormat3Dgltf added in v0.2.40

type InputFormat3Dgltf struct {
	// Coords: Co-ordinate system of input data.
	Coords System `json:"coords" yaml:"coords" schema:"coords"`
	// SplitClosedFaces: Splits all closed faces into two open faces.
	//
	// Defaults to `false` but is implicitly `true` when importing into the engine.
	SplitClosedFaces bool `json:"split_closed_faces" yaml:"split_closed_faces" schema:"split_closed_faces"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

InputFormat3Dgltf: SolidWorks part (SLDPRT) format.

type InputFormat3DsplitClosedFaces added in v0.2.44

type InputFormat3DsplitClosedFaces 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 millimeters.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

InputFormat3DsplitClosedFaces: *ST**ereo**L**ithography 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"`
	// AmountRefunded: Total amount refunded across all captured charges linked to this invoice.
	AmountRefunded float64 `json:"amount_refunded" yaml:"amount_refunded" schema:"amount_refunded"`
	// 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"`
	// BillingReason: Why this invoice was created (e.g. `subscription_cycle`).
	BillingReason string `json:"billing_reason" yaml:"billing_reason" schema:"billing_reason"`
	// CanRetryPayment: Whether the provider confirmed a currently failed payment can be retried. Revalidated by the provider before each retry; open invoices alone do not qualify.
	CanRetryPayment bool `json:"can_retry_payment" yaml:"can_retry_payment" schema:"can_retry_payment"`
	// CollectionMethod: Invoice collection method as returned by Stripe.
	CollectionMethod string `json:"collection_method" yaml:"collection_method" schema:"collection_method"`
	// 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).
	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"`
	// RefundStatus: Refund summary for the invoice's payments, when any refunds have posted.
	RefundStatus InvoiceRefundStatus `json:"refund_status" yaml:"refund_status" schema:"refund_status"`
	// 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"`
	// SubscriptionID: Subscription ID tied to this invoice, when available.
	SubscriptionID string `json:"subscription_id" yaml:"subscription_id" schema:"subscription_id"`
	// 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).
	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 InvoiceRefundStatus added in v0.2.43

type InvoiceRefundStatus string

InvoiceRefundStatus: Summary of the refund state for an invoice's captured payments.

const (
	// InvoiceRefundStatusPartiallyRefunded: Some, but not all, captured funds tied to the invoice were refunded.
	InvoiceRefundStatusPartiallyRefunded InvoiceRefundStatus = "partially_refunded"
	// InvoiceRefundStatusRefunded: All captured funds tied to the invoice were refunded.
	InvoiceRefundStatusRefunded InvoiceRefundStatus = "refunded"
)

type InvoiceResultsPage added in v0.2.43

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

InvoiceResultsPage: A single page of results

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"
	// InvoiceStatusUnknown: Unknown.
	InvoiceStatusUnknown InvoiceStatus = "unknown"
)

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 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"`
	// ModelVersion: Zoo provided model, or custom model which should be used to process this request.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version"`
	// 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 desired part.
	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 desired part.
	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 KclMigrationClientMessage added in v0.2.44

type KclMigrationClientMessage any

KclMigrationClientMessage: KclMigrationClientMessage: The restricted public migration connection never accepts ordinary prompts.

type KclMigrationClientMessageHeaders added in v0.2.44

type KclMigrationClientMessageHeaders struct {
	// Headers:
	Headers map[string]string `json:"headers" yaml:"headers" schema:"headers,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationClientMessageHeaders: Authenticate the connection.

type KclMigrationClientMessageKclMigrationClientMessageHeaders added in v0.2.44

type KclMigrationClientMessageKclMigrationClientMessageHeaders struct {
	// Request: A complete, immutable input snapshot. It does not grant sponsorship itself.
	Request KclMigrationRequest `json:"request" yaml:"request" schema:"request,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationClientMessageKclMigrationClientMessageHeaders: Start or retrieve the same attempt after a delivery retry.

type KclMigrationClientMessageOperationID added in v0.2.44

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

KclMigrationClientMessageOperationID: Application heartbeat.

type KclMigrationClientMessageRequest added in v0.2.44

type KclMigrationClientMessageRequest struct {
	// OperationID: A UUID usually v4 or v7
	OperationID UUID `json:"operation_id" yaml:"operation_id" schema:"operation_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationClientMessageRequest: Read an existing attempt without resuming it or changing its deadline.

type KclMigrationClientMessageStart added in v0.2.44

type KclMigrationClientMessageStart struct {
	// OperationID: A UUID usually v4 or v7
	OperationID UUID `json:"operation_id" yaml:"operation_id" schema:"operation_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationClientMessageStart: Cancel an existing attempt. Cancellation is idempotent.

type KclMigrationOperation added in v0.2.44

type KclMigrationOperation struct {
	// Deadline: Original deadline, including preparation and validation. Never extended.
	Deadline Time `json:"deadline" yaml:"deadline" schema:"deadline,required"`
	// ID: Same idempotency key supplied by the initiating client.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// ProjectSnapshot: Source revision, retained for conflict detection when applying the result.
	ProjectSnapshot MlCopilotProjectSnapshotMetadata `json:"project_snapshot" yaml:"project_snapshot" schema:"project_snapshot,required"`
	// Result: Terminal result, if available. The review itself has no execution deadline.
	Result KclMigrationResult `json:"result" yaml:"result" schema:"result"`
	// Status: Current state.
	Status KclMigrationStatus `json:"status" yaml:"status" schema:"status,required"`
	// Target: Target accepted for this attempt.
	Target KclMigrationTarget `json:"target" yaml:"target" schema:"target,required"`
}

KclMigrationOperation: Persisted operation state, safe to retrieve again without starting new work.

type KclMigrationRequest added in v0.2.44

type KclMigrationRequest struct {
	// AllowPreview: Explicit consent to unstable preview semantics.
	AllowPreview bool `json:"allow_preview" yaml:"allow_preview" schema:"allow_preview"`
	// CurrentFiles: Complete project, including unsaved edits, imports, and settings.
	CurrentFiles map[string][]int `json:"current_files" yaml:"current_files" schema:"current_files,required"`
	// Entrypoint: Project-relative KCL file to execute.
	Entrypoint string `json:"entrypoint" yaml:"entrypoint" schema:"entrypoint,required"`
	// ProjectSnapshot: Revision against which the user will review and apply the candidate.
	ProjectSnapshot MlCopilotProjectSnapshotMetadata `json:"project_snapshot" yaml:"project_snapshot" schema:"project_snapshot,required"`
	// RequestID: Client-generated idempotency key. Reuse it when retrying delivery.
	RequestID UUID `json:"request_id" yaml:"request_id" schema:"request_id,required"`
	// Target: Requested target. The worker inspects the actual source version.
	Target KclMigrationTarget `json:"target" yaml:"target" schema:"target,required"`
}

KclMigrationRequest: A complete, immutable input snapshot. It does not grant sponsorship itself.

type KclMigrationResult added in v0.2.44

type KclMigrationResult struct {
	// ConversionNotStarted: Confirmed rejection or failure before conversion started. Only unsuccessful attempts may set this; API excludes them from the daily attempt allowance. Missing evidence defaults to counting the attempt.
	ConversionNotStarted bool `json:"conversion_not_started" yaml:"conversion_not_started" schema:"conversion_not_started"`
	// Detail: User-facing outcome or failure explanation.
	Detail string `json:"detail" yaml:"detail" schema:"detail,required"`
	// Files: Candidate project, returned only after successful validation.
	Files map[string][]int `json:"files" yaml:"files" schema:"files"`
	// Status: Terminal state. `running` is not a valid result.
	Status KclMigrationStatus `json:"status" yaml:"status" schema:"status,required"`
	// Validation: Execution and equivalence evidence, required on success.
	Validation KclMigrationValidation `json:"validation" yaml:"validation" schema:"validation"`
}

KclMigrationResult: A worker's terminal candidate, held separately from ordinary project edits.

type KclMigrationServerMessage added in v0.2.44

type KclMigrationServerMessage any

KclMigrationServerMessage: KclMigrationServerMessage: Public responses never contain ordinary auto-applying tool results.

type KclMigrationServerMessageKclMigrationServerMessageOperation added in v0.2.44

type KclMigrationServerMessageKclMigrationServerMessageOperation struct {
	// Message: Existing Copilot display message. Never dispatch it as a project edit.
	Message any `json:"message" yaml:"message" schema:"message,required"`
	// OperationID: The initiating request ID, used to keep progress with its migration.
	OperationID UUID `json:"operation_id" yaml:"operation_id" schema:"operation_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationServerMessageKclMigrationServerMessageOperation: Best-effort, display-only progress on the execution connection. Only text, informational and supported reasoning messages are forwarded; candidate edits are returned solely in a validated terminal operation.

type KclMigrationServerMessageMessage added in v0.2.45

type KclMigrationServerMessageMessage struct {
	// Detail:
	Detail string `json:"detail" yaml:"detail" schema:"detail,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationServerMessageMessage: A rejected request, without starting or charging for work.

type KclMigrationServerMessageOperation added in v0.2.44

type KclMigrationServerMessageOperation struct {
	// Operation: Persisted operation state, safe to retrieve again without starting new work.
	Operation KclMigrationOperation `json:"operation" yaml:"operation" schema:"operation,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

KclMigrationServerMessageOperation: Current durable state, including a reviewable candidate when successful.

type KclMigrationServerMessageOperationID added in v0.2.45

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

KclMigrationServerMessageOperationID: Heartbeat response.

type KclMigrationStatus added in v0.2.44

type KclMigrationStatus string

KclMigrationStatus: Durable state of a migration attempt.

const (
	// KclMigrationStatusRunning: Preparation, conversion, or validation is still running.
	KclMigrationStatusRunning KclMigrationStatus = "running"
	// KclMigrationStatusSucceeded: A validated candidate is ready for review. No project has been applied.
	KclMigrationStatusSucceeded KclMigrationStatus = "succeeded"
	// KclMigrationStatusFailed: The attempt failed.
	KclMigrationStatusFailed KclMigrationStatus = "failed"
	// KclMigrationStatusTimedOut: The original execution deadline expired.
	KclMigrationStatusTimedOut KclMigrationStatus = "timed_out"
	// KclMigrationStatusCancelled: The attempt was cancelled, including loss of its execution connection.
	KclMigrationStatusCancelled KclMigrationStatus = "cancelled"
	// KclMigrationStatusUnsupported: The source, target, or project is not supported.
	KclMigrationStatusUnsupported KclMigrationStatus = "unsupported"
	// KclMigrationStatusValidationFailed: Execution, geometry, or behavioral equivalence could not be established.
	KclMigrationStatusValidationFailed KclMigrationStatus = "validation_failed"
)

type KclMigrationTarget added in v0.2.44

type KclMigrationTarget string

KclMigrationTarget: A supported migration target. Preview use always requires explicit consent.

const (
	// KclMigrationTarget30Preview: Unstable KCL 3 preview.
	KclMigrationTarget30Preview KclMigrationTarget = "3.0-preview"
	// KclMigrationTarget30: Stable KCL 3. Availability also depends on the deployed worker and client.
	KclMigrationTarget30 KclMigrationTarget = "3.0"
)

type KclMigrationValidation added in v0.2.44

type KclMigrationValidation struct {
	// BehaviorPreserved: Relevant parameter and control-flow behavior passed validation.
	BehaviorPreserved bool `json:"behavior_preserved" yaml:"behavior_preserved" schema:"behavior_preserved,required"`
	// GeometryPreserved: Geometry passed the version-pair validation policy.
	GeometryPreserved bool `json:"geometry_preserved" yaml:"geometry_preserved" schema:"geometry_preserved,required"`
	// RulesRevision: Revision of the conversion instructions and validation policy.
	RulesRevision string `json:"rules_revision" yaml:"rules_revision" schema:"rules_revision,required"`
	// RuntimeVersion: Exact target runtime used for execution and geometry checks.
	RuntimeVersion string `json:"runtime_version" yaml:"runtime_version" schema:"runtime_version,required"`
	// SourceExecuted: The unchanged source project executed successfully.
	SourceExecuted bool `json:"source_executed" yaml:"source_executed" schema:"source_executed,required"`
	// SourceVersion: Actual source semantics detected and executed by the worker.
	SourceVersion string `json:"source_version" yaml:"source_version" schema:"source_version,required"`
	// Summary: Reviewable explanation of checks, tolerances, and any accepted differences.
	Summary string `json:"summary" yaml:"summary" schema:"summary,required"`
	// Target: Target semantics used during validation, which must match the request.
	Target KclMigrationTarget `json:"target" yaml:"target" schema:"target,required"`
	// TargetExecuted: The candidate executed successfully under target semantics.
	TargetExecuted bool `json:"target_executed" yaml:"target_executed" schema:"target_executed,required"`
}

KclMigrationValidation: Evidence required before a candidate may be returned as successful.

type KclModel added in v0.2.41

type KclModel struct {
	// Code: The KCL code.
	Code string `json:"code" yaml:"code" schema:"code,required"`
}

KclModel: The response containing the KCL code.

type KclProjectFileRole added in v0.2.43

type KclProjectFileRole string

KclProjectFileRole: Logical role of a file stored under a KCL project.

const (
	// KclProjectFileRoleProjectToml: The root `project.toml` manifest.
	KclProjectFileRoleProjectToml KclProjectFileRole = "project_toml"
	// KclProjectFileRoleProjectFile: A project source file such as `.kcl`.
	KclProjectFileRoleProjectFile KclProjectFileRole = "project_file"
	// KclProjectFileRolePreviewImage: A preview image generated or uploaded for the gallery.
	KclProjectFileRolePreviewImage KclProjectFileRole = "preview_image"
)

type KclProjectPreviewStatus added in v0.2.43

type KclProjectPreviewStatus string

KclProjectPreviewStatus: Preview generation status for a KCL project.

const (
	// KclProjectPreviewStatusPending: A preview has not been generated yet.
	KclProjectPreviewStatusPending KclProjectPreviewStatus = "pending"
	// KclProjectPreviewStatusReady: The preview is available for display.
	KclProjectPreviewStatusReady KclProjectPreviewStatus = "ready"
	// KclProjectPreviewStatusFailed: Preview generation failed and needs attention.
	KclProjectPreviewStatusFailed KclProjectPreviewStatus = "failed"
)

type KclProjectPublicationStatus added in v0.2.43

type KclProjectPublicationStatus string

KclProjectPublicationStatus: Publication workflow state for a KCL project.

const (
	// KclProjectPublicationStatusPrivate: The project is owner-visible only and not intended for publication.
	KclProjectPublicationStatusPrivate KclProjectPublicationStatus = "private"
	// KclProjectPublicationStatusDraft: The project is being prepared for publication but is not yet submitted.
	KclProjectPublicationStatusDraft KclProjectPublicationStatus = "draft"
	// KclProjectPublicationStatusPendingReview: The project is awaiting moderation review.
	KclProjectPublicationStatusPendingReview KclProjectPublicationStatus = "pending_review"
	// KclProjectPublicationStatusPublished: The project is publicly visible in the gallery.
	KclProjectPublicationStatusPublished KclProjectPublicationStatus = "published"
	// KclProjectPublicationStatusRejected: The project was reviewed and rejected.
	KclProjectPublicationStatusRejected KclProjectPublicationStatus = "rejected"
	// KclProjectPublicationStatusDeleted: The project was removed from public display.
	KclProjectPublicationStatusDeleted KclProjectPublicationStatus = "deleted"
	// KclProjectPublicationStatusChangesRequested: The project was reviewed and changes were requested before it can be published.
	KclProjectPublicationStatusChangesRequested KclProjectPublicationStatus = "changes_requested"
)

type KclProjectShareLinkAccessMode added in v0.2.43

type KclProjectShareLinkAccessMode string

KclProjectShareLinkAccessMode: Access policy for a shared project download link.

const (
	// KclProjectShareLinkAccessModeAnyoneWithLink: Anyone holding the URL can download the project.
	KclProjectShareLinkAccessModeAnyoneWithLink KclProjectShareLinkAccessMode = "anyone_with_link"
	// KclProjectShareLinkAccessModeOrganizationOnly: Only members of the owner's organization can use the URL.
	KclProjectShareLinkAccessModeOrganizationOnly KclProjectShareLinkAccessMode = "organization_only"
)

type KclProjectVersionAncestryStatus added in v0.2.44

type KclProjectVersionAncestryStatus string

KclProjectVersionAncestryStatus: Whether a project's version ancestry is known.

const (
	// KclProjectVersionAncestryStatusRoot: The first version of a new project, with no parent.
	KclProjectVersionAncestryStatusRoot KclProjectVersionAncestryStatus = "root"
	// KclProjectVersionAncestryStatusRecorded: The version has a recorded parent relationship.
	KclProjectVersionAncestryStatusRecorded KclProjectVersionAncestryStatus = "recorded"
	// KclProjectVersionAncestryStatusLegacyUnknown: The version's parent was not recorded.
	KclProjectVersionAncestryStatusLegacyUnknown KclProjectVersionAncestryStatus = "legacy_unknown"
)

type KclVersion added in v0.2.44

type KclVersion string

KclVersion: Which KCL versions does Zoo support?

const (
	// KclVersion10: Original KCL released in 2025
	KclVersion10 KclVersion = "1.0"
	// KclVersion20: KCL v2 is the same as KCL v1, except that it supports the `region` function.
	KclVersion20 KclVersion = "2.0"
	// KclVersion30Preview: KCL v3 preview -- used while developing version 3.
	KclVersion30Preview KclVersion = "3.0-preview"
	// KclVersion30: KCL v3 releases 2026
	KclVersion30 KclVersion = "3.0"
)

type Loft added in v0.2.38

type Loft struct {
	// SolidID: The UUID of the newly created solid loft.
	SolidID UUID `json:"solid_id" yaml:"solid_id" schema:"solid_id,required"`
}

Loft: The response from the `Loft` command.

type MakeAxesGizmo added in v0.2.38

type MakeAxesGizmo struct {
}

MakeAxesGizmo: The response from the `MakeAxesGizmo` endpoint.

type MakeOffsetPath added in v0.2.40

type MakeOffsetPath struct {
	// EntityIds: If the offset path splits into multiple paths, this will contain the UUIDs of the new paths. If the offset path remains as a single path, this will be empty, and the resulting ID of the (single) new path will be the ID of the `MakeOffsetPath` command.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

MakeOffsetPath: The response from the `MakeOffsetPath` command.

type MakePlane added in v0.2.38

type MakePlane struct {
}

MakePlane: The response from the `MakePlane` endpoint.

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 MbdSymbol added in v0.2.42

type MbdSymbol string

MbdSymbol: MBD symbol type

const (
	// MbdSymbolNone represents the MbdSymbol `"none"`.
	MbdSymbolNone MbdSymbol = "none"
	// MbdSymbolArclength represents the MbdSymbol `"arclength"`.
	MbdSymbolArclength MbdSymbol = "arclength"
	// MbdSymbolBetween represents the MbdSymbol `"between"`.
	MbdSymbolBetween MbdSymbol = "between"
	// MbdSymbolDegrees represents the MbdSymbol `"degrees"`.
	MbdSymbolDegrees MbdSymbol = "degrees"
	// MbdSymbolPlusminus represents the MbdSymbol `"plusminus"`.
	MbdSymbolPlusminus MbdSymbol = "plusminus"
	// MbdSymbolAngularity represents the MbdSymbol `"angularity"`.
	MbdSymbolAngularity MbdSymbol = "angularity"
	// MbdSymbolCylindricity represents the MbdSymbol `"cylindricity"`.
	MbdSymbolCylindricity MbdSymbol = "cylindricity"
	// MbdSymbolRoundness represents the MbdSymbol `"roundness"`.
	MbdSymbolRoundness MbdSymbol = "roundness"
	// MbdSymbolConcentricity represents the MbdSymbol `"concentricity"`.
	MbdSymbolConcentricity MbdSymbol = "concentricity"
	// MbdSymbolStraightness represents the MbdSymbol `"straightness"`.
	MbdSymbolStraightness MbdSymbol = "straightness"
	// MbdSymbolParallelism represents the MbdSymbol `"parallelism"`.
	MbdSymbolParallelism MbdSymbol = "parallelism"
	// MbdSymbolFlatness represents the MbdSymbol `"flatness"`.
	MbdSymbolFlatness MbdSymbol = "flatness"
	// MbdSymbolProfileofline represents the MbdSymbol `"profileofline"`.
	MbdSymbolProfileofline MbdSymbol = "profileofline"
	// MbdSymbolSurfaceprofile represents the MbdSymbol `"surfaceprofile"`.
	MbdSymbolSurfaceprofile MbdSymbol = "surfaceprofile"
	// MbdSymbolSymmetry represents the MbdSymbol `"symmetry"`.
	MbdSymbolSymmetry MbdSymbol = "symmetry"
	// MbdSymbolPerpendicularity represents the MbdSymbol `"perpendicularity"`.
	MbdSymbolPerpendicularity MbdSymbol = "perpendicularity"
	// MbdSymbolRunout represents the MbdSymbol `"runout"`.
	MbdSymbolRunout MbdSymbol = "runout"
	// MbdSymbolTotalrunout represents the MbdSymbol `"totalrunout"`.
	MbdSymbolTotalrunout MbdSymbol = "totalrunout"
	// MbdSymbolPosition represents the MbdSymbol `"position"`.
	MbdSymbolPosition MbdSymbol = "position"
	// MbdSymbolCenterline represents the MbdSymbol `"centerline"`.
	MbdSymbolCenterline MbdSymbol = "centerline"
	// MbdSymbolPartingline represents the MbdSymbol `"partingline"`.
	MbdSymbolPartingline MbdSymbol = "partingline"
	// MbdSymbolIsoenvelope represents the MbdSymbol `"isoenvelope"`.
	MbdSymbolIsoenvelope MbdSymbol = "isoenvelope"
	// MbdSymbolIsoenvelopenony145M represents the MbdSymbol `"isoenvelopenony145m"`.
	MbdSymbolIsoenvelopenony145M MbdSymbol = "isoenvelopenony145m"
	// MbdSymbolFreestate represents the MbdSymbol `"freestate"`.
	MbdSymbolFreestate MbdSymbol = "freestate"
	// MbdSymbolStatisticaltolerance represents the MbdSymbol `"statisticaltolerance"`.
	MbdSymbolStatisticaltolerance MbdSymbol = "statisticaltolerance"
	// MbdSymbolContinuousfeature represents the MbdSymbol `"continuousfeature"`.
	MbdSymbolContinuousfeature MbdSymbol = "continuousfeature"
	// MbdSymbolIndependency represents the MbdSymbol `"independency"`.
	MbdSymbolIndependency MbdSymbol = "independency"
	// MbdSymbolDepth represents the MbdSymbol `"depth"`.
	MbdSymbolDepth MbdSymbol = "depth"
	// MbdSymbolStart represents the MbdSymbol `"start"`.
	MbdSymbolStart MbdSymbol = "start"
	// MbdSymbolLeastcondition represents the MbdSymbol `"leastcondition"`.
	MbdSymbolLeastcondition MbdSymbol = "leastcondition"
	// MbdSymbolMaxcondition represents the MbdSymbol `"maxcondition"`.
	MbdSymbolMaxcondition MbdSymbol = "maxcondition"
	// MbdSymbolConicaltaper represents the MbdSymbol `"conicaltaper"`.
	MbdSymbolConicaltaper MbdSymbol = "conicaltaper"
	// MbdSymbolProjected represents the MbdSymbol `"projected"`.
	MbdSymbolProjected MbdSymbol = "projected"
	// MbdSymbolSlope represents the MbdSymbol `"slope"`.
	MbdSymbolSlope MbdSymbol = "slope"
	// MbdSymbolMicro represents the MbdSymbol `"micro"`.
	MbdSymbolMicro MbdSymbol = "micro"
	// MbdSymbolTangentplane represents the MbdSymbol `"tangentplane"`.
	MbdSymbolTangentplane MbdSymbol = "tangentplane"
	// MbdSymbolUnilateral represents the MbdSymbol `"unilateral"`.
	MbdSymbolUnilateral MbdSymbol = "unilateral"
	// MbdSymbolSquarefeature represents the MbdSymbol `"squarefeature"`.
	MbdSymbolSquarefeature MbdSymbol = "squarefeature"
	// MbdSymbolCountersink represents the MbdSymbol `"countersink"`.
	MbdSymbolCountersink MbdSymbol = "countersink"
	// MbdSymbolSpotface represents the MbdSymbol `"spotface"`.
	MbdSymbolSpotface MbdSymbol = "spotface"
	// MbdSymbolTarget represents the MbdSymbol `"target"`.
	MbdSymbolTarget MbdSymbol = "target"
	// MbdSymbolDiameter represents the MbdSymbol `"diameter"`.
	MbdSymbolDiameter MbdSymbol = "diameter"
	// MbdSymbolRadius represents the MbdSymbol `"radius"`.
	MbdSymbolRadius MbdSymbol = "radius"
	// MbdSymbolSphericalradius represents the MbdSymbol `"sphericalradius"`.
	MbdSymbolSphericalradius MbdSymbol = "sphericalradius"
	// MbdSymbolSphericaldiameter represents the MbdSymbol `"sphericaldiameter"`.
	MbdSymbolSphericaldiameter MbdSymbol = "sphericaldiameter"
	// MbdSymbolControlledradius represents the MbdSymbol `"controlledradius"`.
	MbdSymbolControlledradius MbdSymbol = "controlledradius"
	// MbdSymbolBoxstart represents the MbdSymbol `"boxstart"`.
	MbdSymbolBoxstart MbdSymbol = "boxstart"
	// MbdSymbolBoxbar represents the MbdSymbol `"boxbar"`.
	MbdSymbolBoxbar MbdSymbol = "boxbar"
	// MbdSymbolBoxbarbetween represents the MbdSymbol `"boxbarbetween"`.
	MbdSymbolBoxbarbetween MbdSymbol = "boxbarbetween"
	// MbdSymbolLetterbackwardunderline represents the MbdSymbol `"letterbackwardunderline"`.
	MbdSymbolLetterbackwardunderline MbdSymbol = "letterbackwardunderline"
	// MbdSymbolPunctuationbackwardunderline represents the MbdSymbol `"punctuationbackwardunderline"`.
	MbdSymbolPunctuationbackwardunderline MbdSymbol = "punctuationbackwardunderline"
	// MbdSymbolModifierbackwardunderline represents the MbdSymbol `"modifierbackwardunderline"`.
	MbdSymbolModifierbackwardunderline MbdSymbol = "modifierbackwardunderline"
	// MbdSymbolNumericbackwardunderline represents the MbdSymbol `"numericbackwardunderline"`.
	MbdSymbolNumericbackwardunderline MbdSymbol = "numericbackwardunderline"
	// MbdSymbolBoxend represents the MbdSymbol `"boxend"`.
	MbdSymbolBoxend MbdSymbol = "boxend"
	// MbdSymbolDatumup represents the MbdSymbol `"datumup"`.
	MbdSymbolDatumup MbdSymbol = "datumup"
	// MbdSymbolDatumleft represents the MbdSymbol `"datumleft"`.
	MbdSymbolDatumleft MbdSymbol = "datumleft"
	// MbdSymbolDatumright represents the MbdSymbol `"datumright"`.
	MbdSymbolDatumright MbdSymbol = "datumright"
	// MbdSymbolDatumdown represents the MbdSymbol `"datumdown"`.
	MbdSymbolDatumdown MbdSymbol = "datumdown"
	// MbdSymbolDatumtriangle represents the MbdSymbol `"datumtriangle"`.
	MbdSymbolDatumtriangle MbdSymbol = "datumtriangle"
	// MbdSymbolHalfspace represents the MbdSymbol `"halfspace"`.
	MbdSymbolHalfspace MbdSymbol = "halfspace"
	// MbdSymbolQuarterspace represents the MbdSymbol `"quarterspace"`.
	MbdSymbolQuarterspace MbdSymbol = "quarterspace"
	// MbdSymbolEighthspace represents the MbdSymbol `"eighthspace"`.
	MbdSymbolEighthspace MbdSymbol = "eighthspace"
	// MbdSymbolModifierspace represents the MbdSymbol `"modifierspace"`.
	MbdSymbolModifierspace MbdSymbol = "modifierspace"
)

type MetaService

type MetaService service

MetaService: Meta information about the API.

func (*MetaService) CommunitySso added in v0.2.40

func (s *MetaService) CommunitySso(sso string, sig string) error

CommunitySso: Authorize an inbound auth request from our Community page. Parameters

  • `sso`
  • `sig`
Example

CommunitySso: Authorize an inbound auth request from our Community page. Parameters

  • `sso`
  • `sig`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Meta.CommunitySso("some-string", "some-string"); err != nil {
		panic(err)
	}

}

func (*MetaService) GetAnnouncements added in v0.2.44

func (s *MetaService) GetAnnouncements(limit int, pageToken string) (*AnnouncementResultsPage, error)

GetAnnouncements: List all active announcements. No authentication is required. Results are ordered newest first, with the announcement ID breaking ties.

Parameters

  • `limit`
  • `pageToken`
Example

GetAnnouncements: List all active announcements. No authentication is required. Results are ordered newest first, with the announcement ID breaking ties.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*MetaService) GetSchema added in v0.0.9

func (s *MetaService) GetSchema() error

GetSchema: Get OpenAPI schema.

Example

GetSchema: Get OpenAPI schema.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*MetaService) Ping

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

Ping: Return pong.

Example

Ping: Return pong.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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 MirrorAcross added in v0.2.44

type MirrorAcross any

MirrorAcross: MirrorAcross: What to reflect mirrored geometry across

type MirrorAcrossAxis added in v0.2.44

type MirrorAcrossAxis struct {
	// Axis:
	Axis Axis `json:"axis" yaml:"axis" schema:"axis,required"`
}

MirrorAcrossAxis: Reflect across an axis (that goes through a point) If used with a 3D mirror, the axis will define the normal of the mirror plane.

type MirrorAcrossEdge added in v0.2.44

type MirrorAcrossEdge struct {
	// Edge:
	Edge Edge `json:"edge" yaml:"edge" schema:"edge,required"`
}

MirrorAcrossEdge: Reflect across an edge If used with a 3D mirror, the edge will define the normal of the mirror plane.

type MirrorAcrossEdgeReference added in v0.2.44

type MirrorAcrossEdgeReference struct {
	// EdgeReference:
	EdgeReference EdgeReference `json:"edge_reference" yaml:"edge_reference" schema:"edge_reference,required"`
}

MirrorAcrossEdgeReference: Reflect across an edge identified by its adjacent faces. If used with a 3D mirror, the edge will define the normal of the mirror plane.

type MirrorAcrossPlane added in v0.2.44

type MirrorAcrossPlane struct {
	// Plane:
	Plane Plane `json:"plane" yaml:"plane" schema:"plane,required"`
}

MirrorAcrossPlane: Reflect across a plane (which gives two axes) Cannot be used with 2D mirrors.

type MlCopilotAccessDeniedCode added in v0.2.44

type MlCopilotAccessDeniedCode string

MlCopilotAccessDeniedCode: Stable machine-readable reasons that an account cannot open a Copilot websocket until its billing or support state changes.

const (
	// MlCopilotAccessDeniedCodeMissingPaymentMethod: The account has no payment method on file.
	MlCopilotAccessDeniedCodeMissingPaymentMethod MlCopilotAccessDeniedCode = "missing_payment_method"
	// MlCopilotAccessDeniedCodePaymentMethodFailed: The account's payment method failed.
	MlCopilotAccessDeniedCodePaymentMethodFailed MlCopilotAccessDeniedCode = "payment_method_failed"
	// MlCopilotAccessDeniedCodeBillingThresholdReached: The account reached its configured billing threshold.
	MlCopilotAccessDeniedCodeBillingThresholdReached MlCopilotAccessDeniedCode = "billing_threshold_reached"
	// MlCopilotAccessDeniedCodePayAsYouGoDisabled: The account exhausted its credits without enabling pay-as-you-go.
	MlCopilotAccessDeniedCodePayAsYouGoDisabled MlCopilotAccessDeniedCode = "pay_as_you_go_disabled"
	// MlCopilotAccessDeniedCodeUpgradeDowngradeAbuse: The account was blocked after repeated plan changes recycled credits.
	MlCopilotAccessDeniedCodeUpgradeDowngradeAbuse MlCopilotAccessDeniedCode = "upgrade_downgrade_abuse"
	// MlCopilotAccessDeniedCodeAdmin: Zoo support explicitly blocked the account.
	MlCopilotAccessDeniedCodeAdmin MlCopilotAccessDeniedCode = "admin"
)

type MlCopilotClientCommand added in v0.2.44

type MlCopilotClientCommand struct {
	// Description: Description used when Zookeeper searches the client catalog.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// ID: Stable identifier used to invoke the command, for example `modeling.export`.
	ID string `json:"id" yaml:"id" schema:"id,required"`
	// InputSchema: JSON Schema describing the command arguments.
	InputSchema any `json:"input_schema" yaml:"input_schema" schema:"input_schema,required"`
	// Title: Short human-readable command name.
	Title string `json:"title" yaml:"title" schema:"title,required"`
}

MlCopilotClientCommand: One client-owned command that Zookeeper may discover and request over the current copilot WebSocket connection. Command definitions are connection-scoped capabilities, not durable user data. Clients replace the complete catalog whenever its revision changes.

type MlCopilotClientCommandStatus added in v0.2.44

type MlCopilotClientCommandStatus string

MlCopilotClientCommandStatus: Lifecycle state reported by a client for a requested command.

const (
	// MlCopilotClientCommandStatusAccepted: The client accepted the request and execution is still in progress.
	MlCopilotClientCommandStatusAccepted MlCopilotClientCommandStatus = "accepted"
	// MlCopilotClientCommandStatusSucceeded: The command completed successfully.
	MlCopilotClientCommandStatusSucceeded MlCopilotClientCommandStatus = "succeeded"
	// MlCopilotClientCommandStatusRejected: The client or user declined the request before execution completed.
	MlCopilotClientCommandStatusRejected MlCopilotClientCommandStatus = "rejected"
	// MlCopilotClientCommandStatusFailed: The command failed during execution.
	MlCopilotClientCommandStatusFailed MlCopilotClientCommandStatus = "failed"
	// MlCopilotClientCommandStatusCancelled: Execution was cancelled after it started.
	MlCopilotClientCommandStatusCancelled MlCopilotClientCommandStatus = "cancelled"
)

type MlCopilotClientMessage added in v0.2.42

type MlCopilotClientMessage any

MlCopilotClientMessage: MlCopilotClientMessage: The types of messages that can be sent by the client to the server.

type MlCopilotClientMessageCurrentFiles deprecated added in v0.2.43

type MlCopilotClientMessageCurrentFiles = MlCopilotMessageUser

MlCopilotClientMessageCurrentFiles preserves the legacy SDK name.

Deprecated: Use MlCopilotMessageUser. This alias retains the original user payload.

type MlCopilotClientMessageHeaders deprecated added in v0.2.42

type MlCopilotClientMessageHeaders = MlCopilotMessageHeaders

MlCopilotClientMessageHeaders preserves the legacy SDK name.

Deprecated: Use MlCopilotMessageHeaders.

type MlCopilotClientMessageListModes deprecated added in v0.2.44

type MlCopilotClientMessageListModes = MlCopilotMessageListModes

MlCopilotClientMessageListModes preserves the legacy SDK name.

Deprecated: Use MlCopilotMessageListModes.

type MlCopilotClientMessageMlCopilotClientMessageHeaders deprecated added in v0.2.42

type MlCopilotClientMessageMlCopilotClientMessageHeaders = MlCopilotMessageProjectContext

MlCopilotClientMessageMlCopilotClientMessageHeaders preserves the legacy SDK name.

Deprecated: Use MlCopilotMessageProjectContext.

type MlCopilotClientMessagePing deprecated added in v0.2.43

type MlCopilotClientMessagePing = MlCopilotMessagePing

MlCopilotClientMessagePing preserves the legacy SDK name.

Deprecated: Use MlCopilotMessagePing.

type MlCopilotClientMessageProjectContext deprecated added in v0.2.44

type MlCopilotClientMessageProjectContext = MlCopilotMessageAttachmentResponse

MlCopilotClientMessageProjectContext preserves the legacy SDK name.

Deprecated: Use MlCopilotMessageAttachmentResponse. This legacy name represented attachments.

type MlCopilotClientMessageProjectName deprecated added in v0.2.43

type MlCopilotClientMessageProjectName = MlCopilotMessageSystem

MlCopilotClientMessageProjectName preserves the legacy SDK name.

Deprecated: Use MlCopilotMessageSystem. This alias retains the original system payload.

type MlCopilotFile added in v0.2.43

type MlCopilotFile struct {
	// AttachmentRef: Reference for fetching this attachment on demand.
	AttachmentRef AttachmentRef `json:"attachment_ref" yaml:"attachment_ref" schema:"attachment_ref"`
	// Data: The file contents as binary data.
	Data []int `json:"data" yaml:"data" schema:"data,required"`
	// DataRef: Optional blob storage path for the file contents.
	DataRef string `json:"data_ref" yaml:"data_ref" schema:"data_ref"`
	// Metadata: Optional metadata associated with the file.
	Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
	// Mimetype: The MIME type of the file (e.g., "image/png", "application/pdf", "model/stl").
	Mimetype string `json:"mimetype" yaml:"mimetype" schema:"mimetype,required"`
	// Name: The name of the file.
	Name string `json:"name" yaml:"name" schema:"name,required"`
}

MlCopilotFile: A file that can be transferred between the client and server.

type MlCopilotMessageAttachmentResponse added in v0.2.44

type MlCopilotMessageAttachmentResponse struct {
	// Error: Error encountered while loading attachments, if any.
	Error string `json:"error" yaml:"error" schema:"error"`
	// Files: Loaded attachment files. Empty when no matching attachments were found.
	Files []MlCopilotFile `json:"files" yaml:"files" schema:"files"`
	// PromptID: Prompt the attachments were loaded from.
	PromptID UUID `json:"prompt_id" yaml:"prompt_id" schema:"prompt_id"`
	// RequestID: Optional backend-provided identifier to correlate request/response pairs.
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id"`
	// Seq: Specific client message sequence, when requested.
	Seq int `json:"seq" yaml:"seq" schema:"seq"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageAttachmentResponse: Attachments returned by API in response to a backend `RequestAttachments` message.

type MlCopilotMessageClientCommandResponse added in v0.2.44

type MlCopilotMessageClientCommandResponse struct {
	// CatalogRevision: Catalog revision against which the request was validated.
	CatalogRevision int `json:"catalog_revision" yaml:"catalog_revision" schema:"catalog_revision,required"`
	// Error: Optional error or rejection detail.
	Error string `json:"error" yaml:"error" schema:"error"`
	// RequestID: Correlation identifier supplied in `ClientCommandRequest`.
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id,required"`
	// Result: Optional JSON-compatible result from a successful command.
	Result any `json:"result" yaml:"result" schema:"result"`
	// Status: Current execution state.
	Status MlCopilotClientCommandStatus `json:"status" yaml:"status" schema:"status,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageClientCommandResponse: Report progress or a terminal result for a requested client command.

type MlCopilotMessageFetchAttachments added in v0.2.44

type MlCopilotMessageFetchAttachments struct {
	// Indices: In-row attachment indices to retrieve.
	Indices []int `json:"indices" yaml:"indices" schema:"indices,required"`
	// PromptID: Prompt containing the persisted message row.
	PromptID UUID `json:"prompt_id" yaml:"prompt_id" schema:"prompt_id,required"`
	// Seq: Sequence number of the persisted message row.
	Seq int `json:"seq" yaml:"seq" schema:"seq,required"`
	// SupportsAttachmentsError: Whether the client can handle an `AttachmentsError` response. Defaults to false so older desktop clients keep receiving the generic `Error` response until they update and explicitly opt in.
	SupportsAttachmentsError bool `json:"supports_attachments_error" yaml:"supports_attachments_error" schema:"supports_attachments_error"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageFetchAttachments: Request persisted attachments from conversation history over the active websocket.

type MlCopilotMessageHeaders added in v0.2.44

type MlCopilotMessageHeaders struct {
	// Headers: The authentication header.
	Headers map[string]string `json:"headers" yaml:"headers" schema:"headers,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageHeaders: Authentication header request.

type MlCopilotMessageListModes added in v0.2.44

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

MlCopilotMessageListModes: Request available mode metadata for the copilot session.

type MlCopilotMessagePing added in v0.2.44

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

MlCopilotMessagePing: The client-to-server Ping to ensure the copilot protocol stays alive.

type MlCopilotMessageProjectContext added in v0.2.44

type MlCopilotMessageProjectContext struct {
	// ActiveFile: The project-relative file open in the client's active editor, if any.
	ActiveFile string `json:"active_file" yaml:"active_file" schema:"active_file"`
	// CorrelationID: Stable identifier used to correlate this project context update across services.
	CorrelationID UUID `json:"correlation_id" yaml:"correlation_id" schema:"correlation_id"`
	// CurrentFiles: The current files in the project, if any. This can be used to provide context for the AI. This should be sent in binary format if the files are not text files, like an imported binary file.
	CurrentFiles map[string][]int `json:"current_files" yaml:"current_files" schema:"current_files"`
	// EngineAPICallID: API call ID for the active Engine modeling session, when available.
	EngineAPICallID UUID `json:"engine_api_call_id" yaml:"engine_api_call_id" schema:"engine_api_call_id"`
	// ProjectName: The project name, if any.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// ProjectSnapshot: Revision and idempotency metadata for `current_files`. Its absence identifies a legacy unfenced message, not an initial revision.
	ProjectSnapshot MlCopilotProjectSnapshotMetadata `json:"project_snapshot" yaml:"project_snapshot" schema:"project_snapshot"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageProjectContext: Updates the active project context without creating a new prompt.

type MlCopilotMessageSystem added in v0.2.44

type MlCopilotMessageSystem struct {
	// Command: The content of the system message.
	Command MlCopilotSystemCommand `json:"command" yaml:"command" schema:"command,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageSystem: The system message, which can be used to set the context or instructions for the AI.

type MlCopilotMessageUpdateClientCommandSchema added in v0.2.44

type MlCopilotMessageUpdateClientCommandSchema struct {
	// Commands: Complete set of commands available at this revision.
	Commands []MlCopilotClientCommand `json:"commands" yaml:"commands" schema:"commands,required"`
	// ProtocolVersion: Version of the client-command wire protocol understood by the client.
	ProtocolVersion int `json:"protocol_version" yaml:"protocol_version" schema:"protocol_version,required"`
	// Revision: Monotonically increasing catalog revision for this connection.
	Revision int `json:"revision" yaml:"revision" schema:"revision,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageUpdateClientCommandSchema: Replace the commands advertised by this client connection. API and Zookeeper do not persist or replay this catalog. A client must advertise it again after every reconnect.

type MlCopilotMessageUser added in v0.2.44

type MlCopilotMessageUser struct {
	// ActiveFile: The project-relative file open in the client's active editor, if any.
	ActiveFile string `json:"active_file" yaml:"active_file" schema:"active_file"`
	// AdditionalFiles: The user can send additional files like images or PDFs to provide more context.
	AdditionalFiles []MlCopilotFile `json:"additional_files" yaml:"additional_files" schema:"additional_files"`
	// Content: The content of the user's message.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// CorrelationID: Stable identifier used to correlate this user request across services.
	CorrelationID UUID `json:"correlation_id" yaml:"correlation_id" schema:"correlation_id"`
	// CurrentFiles: The current files in the project, if any. This can be used to provide context for the AI. This should be sent in binary format, if the files are not text files, like an imported binary file.
	CurrentFiles map[string][]int `json:"current_files" yaml:"current_files" schema:"current_files"`
	// EngineAPICallID: API call ID for the active Engine modeling session, when available.
	EngineAPICallID UUID `json:"engine_api_call_id" yaml:"engine_api_call_id" schema:"engine_api_call_id"`
	// ForcedTools: The user can force specific tools to be used for this message.
	ForcedTools []MlCopilotTool `json:"forced_tools" yaml:"forced_tools" schema:"forced_tools"`
	// Mode: Pick a mode for the agent to operate in. Defaults to the service's configured mode. Mode identifiers are discovered at runtime through `list_modes`, so this stays open to backend-configured values that may not yet exist in the generated client enum.
	Mode string `json:"mode" yaml:"mode" schema:"mode"`
	// Model: Override the default or mode model with another.
	Model MlCopilotSupportedModel `json:"model" yaml:"model" schema:"model"`
	// ProjectName: The project name, if any. This can be used to associate the message with a specific project.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// ProjectSnapshot: Revision and idempotency metadata for `current_files`. Its absence identifies a legacy unfenced message, not an initial revision.
	ProjectSnapshot MlCopilotProjectSnapshotMetadata `json:"project_snapshot" yaml:"project_snapshot" schema:"project_snapshot"`
	// ReasoningEffort: Change the default or mode reasoning effort.
	ReasoningEffort MlReasoningEffort `json:"reasoning_effort" yaml:"reasoning_effort" schema:"reasoning_effort"`
	// SourceRanges: The source ranges the user suggested to change. If empty, the content (prompt) will be used and is required.
	SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlCopilotMessageUser: The user message, which contains the content of the user's input.

type MlCopilotMode deprecated added in v0.2.42

type MlCopilotMode = string

MlCopilotMode preserves the legacy SDK name.

Deprecated: Discover available mode strings through list_modes.

type MlCopilotModeOption added in v0.2.44

type MlCopilotModeOption struct {
	// Description: Human-readable display description.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// Disabled: Whether this mode is unavailable for the user's current plan.
	Disabled bool `json:"disabled" yaml:"disabled" schema:"disabled"`
	// Icon: Client icon identifier.
	Icon string `json:"icon" yaml:"icon" schema:"icon,required"`
	// ID: Stable mode identifier to send in user messages.
	ID string `json:"id" yaml:"id" schema:"id,required"`
	// Label: Human-readable display label.
	Label string `json:"label" yaml:"label" schema:"label,required"`
}

MlCopilotModeOption: A client-facing ML copilot mode option.

type MlCopilotProjectRevision added in v0.2.44

type MlCopilotProjectRevision struct {
	// ProjectID: Stable namespaced project identifier shared by every revision of the project.
	ProjectID string `json:"project_id" yaml:"project_id" schema:"project_id,required"`
	// Revision: Opaque identifier for the accepted project state. Every accepted write gets a fresh value, even when its contents equal an older revision. Clients must not infer file equality or ancestry from this value.
	Revision string `json:"revision" yaml:"revision" schema:"revision,required"`
	// WriterFence: Opaque API-issued token that must accompany subsequent writes to this revision.
	WriterFence string `json:"writer_fence" yaml:"writer_fence" schema:"writer_fence,required"`
}

MlCopilotProjectRevision: Canonical project revision accepted by API.

type MlCopilotProjectSnapshotMetadata added in v0.2.44

type MlCopilotProjectSnapshotMetadata struct {
	// BaseRevision: Canonical revision and writer fence on which `current_files` is based. Its `project_id` must match the outer `project_id`. Omit this only when establishing the first canonical revision; omission must not replace an existing revision.
	BaseRevision MlCopilotProjectRevision `json:"base_revision" yaml:"base_revision" schema:"base_revision"`
	// ProjectID: Stable, namespaced project identifier. Cloud projects use `cloud:<project UUID>` and API validates project access. Local projects use `local:<durable app project ID>` and API scopes the value to the authenticated principal.
	ProjectID string `json:"project_id" yaml:"project_id" schema:"project_id,required"`
	// SnapshotID: Idempotency key for this complete project snapshot, scoped to `project_id`.
	SnapshotID string `json:"snapshot_id" yaml:"snapshot_id" schema:"snapshot_id,required"`
}

MlCopilotProjectSnapshotMetadata: Revision metadata for the complete `current_files` map in a client message.

type MlCopilotProjectSnapshotStatus added in v0.2.44

type MlCopilotProjectSnapshotStatus string

MlCopilotProjectSnapshotStatus: Outcome of comparing a client project snapshot with canonical state.

const (
	// MlCopilotProjectSnapshotStatusAccepted: The snapshot was based on current state and became canonical.
	MlCopilotProjectSnapshotStatusAccepted MlCopilotProjectSnapshotStatus = "accepted"
	// MlCopilotProjectSnapshotStatusMerged: Non-overlapping client changes were merged into canonical state.
	MlCopilotProjectSnapshotStatusMerged MlCopilotProjectSnapshotStatus = "merged"
	// MlCopilotProjectSnapshotStatusRejectedStale: A clean snapshot based on an older revision was not accepted.
	MlCopilotProjectSnapshotStatusRejectedStale MlCopilotProjectSnapshotStatus = "rejected_stale"
	// MlCopilotProjectSnapshotStatusConflict: Client changes overlap canonical changes and require explicit resolution.
	MlCopilotProjectSnapshotStatusConflict MlCopilotProjectSnapshotStatus = "conflict"
)

type MlCopilotReplayAttachmentMode added in v0.2.44

type MlCopilotReplayAttachmentMode string

MlCopilotReplayAttachmentMode: Controls whether replayed attachments are sent inline or fetched on demand.

const (
	// MlCopilotReplayAttachmentModeFull: Include full attachment bytes in replayed files.
	MlCopilotReplayAttachmentModeFull MlCopilotReplayAttachmentMode = "full"
	// MlCopilotReplayAttachmentModeMetadataOnly: Omit attachment bytes and include only socket fetch metadata.
	MlCopilotReplayAttachmentModeMetadataOnly MlCopilotReplayAttachmentMode = "metadata_only"
)

type MlCopilotServerMessage added in v0.2.42

type MlCopilotServerMessage any

MlCopilotServerMessage: MlCopilotServerMessage: The types of messages that can be sent by the server to the client.

type MlCopilotServerMessageAccessDenied added in v0.2.44

type MlCopilotServerMessageAccessDenied struct {
	// AccessDenied:
	AccessDenied AccessDenied `json:"access_denied" yaml:"access_denied" schema:"access_denied,required"`
}

MlCopilotServerMessageAccessDenied: A permanent account or billing denial that must be resolved outside this websocket before retrying.

type MlCopilotServerMessageAttachments added in v0.2.44

type MlCopilotServerMessageAttachments struct {
	// Attachments:
	Attachments Attachments `json:"attachments" yaml:"attachments" schema:"attachments,required"`
}

MlCopilotServerMessageAttachments: Persisted attachments fetched over the websocket on demand.

type MlCopilotServerMessageAttachmentsError added in v0.2.44

type MlCopilotServerMessageAttachmentsError struct {
	// AttachmentsError:
	AttachmentsError AttachmentsError `json:"attachments_error" yaml:"attachments_error" schema:"attachments_error,required"`
}

MlCopilotServerMessageAttachmentsError: Failure to fetch a batch of persisted attachments over the websocket. This response is not persisted and does not indicate a generation failure.

type MlCopilotServerMessageAttachmentsLoaded added in v0.2.44

type MlCopilotServerMessageAttachmentsLoaded struct {
	// AttachmentsLoaded:
	AttachmentsLoaded AttachmentsLoaded `json:"attachments_loaded" yaml:"attachments_loaded" schema:"attachments_loaded,required"`
}

MlCopilotServerMessageAttachmentsLoaded: Notification that API finished loading all attachments for the conversation.

type MlCopilotServerMessageBackendShutdown added in v0.2.43

type MlCopilotServerMessageBackendShutdown struct {
	// BackendShutdown:
	BackendShutdown BackendShutdown `json:"backend_shutdown" yaml:"backend_shutdown" schema:"backend_shutdown,required"`
}

MlCopilotServerMessageBackendShutdown: Notification that the backend is shutting down.

type MlCopilotServerMessageClientCommandRequest added in v0.2.44

type MlCopilotServerMessageClientCommandRequest struct {
	// ClientCommandRequest:
	ClientCommandRequest ClientCommandRequest `json:"client_command_request" yaml:"client_command_request" schema:"client_command_request,required"`
}

MlCopilotServerMessageClientCommandRequest: Ask the connected client to execute one of its advertised commands. This request is transient and is never persisted or replayed by API.

type MlCopilotServerMessageConversationID added in v0.2.42

type MlCopilotServerMessageConversationID struct {
	// ConversationID:
	ConversationID ConversationID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
}

MlCopilotServerMessageConversationID: The ID of the conversation, which can be used to track the session.

type MlCopilotServerMessageDelta added in v0.2.42

type MlCopilotServerMessageDelta struct {
	// Delta:
	Delta Delta `json:"delta" yaml:"delta" schema:"delta,required"`
}

MlCopilotServerMessageDelta: Delta of the response, e.g. a chunk of text/tokens.

type MlCopilotServerMessageEndOfStream added in v0.2.42

type MlCopilotServerMessageEndOfStream struct {
	// EndOfStream:
	EndOfStream EndOfStream `json:"end_of_stream" yaml:"end_of_stream" schema:"end_of_stream,required"`
}

MlCopilotServerMessageEndOfStream: Marks the end of a streamed answer.

type MlCopilotServerMessageError added in v0.2.42

type MlCopilotServerMessageError struct {
	// Error:
	Error Error `json:"error" yaml:"error" schema:"error,required"`
}

MlCopilotServerMessageError: Error sent by server.

type MlCopilotServerMessageErrorError added in v0.2.42

type MlCopilotServerMessageErrorError struct {
	// Detail: The error message.
	Detail string `json:"detail" yaml:"detail" schema:"detail,required"`
}

MlCopilotServerMessageErrorError is the type definition for a MlCopilotServerMessageErrorError.

type MlCopilotServerMessageFiles added in v0.2.43

type MlCopilotServerMessageFiles struct {
	// Files:
	Files Files `json:"files" yaml:"files" schema:"files,required"`
}

MlCopilotServerMessageFiles: Files sent from the server to the client.

type MlCopilotServerMessageInfo added in v0.2.42

type MlCopilotServerMessageInfo struct {
	// Info:
	Info Info `json:"info" yaml:"info" schema:"info,required"`
}

MlCopilotServerMessageInfo: Log / banner text.

type MlCopilotServerMessageModesResponse added in v0.2.44

type MlCopilotServerMessageModesResponse struct {
	// ModesResponse:
	ModesResponse ModesResponse `json:"modes_response" yaml:"modes_response" schema:"modes_response,required"`
}

MlCopilotServerMessageModesResponse: Available mode metadata for clients.

type MlCopilotServerMessagePong added in v0.2.43

type MlCopilotServerMessagePong struct {
	// Pong:
	Pong map[string]any `json:"pong" yaml:"pong" schema:"pong,required"`
}

MlCopilotServerMessagePong: Pong response to a Ping message.

type MlCopilotServerMessageProjectRevisionUpdated added in v0.2.44

type MlCopilotServerMessageProjectRevisionUpdated struct {
	// ProjectRevisionUpdated:
	ProjectRevisionUpdated ProjectRevisionUpdated `json:"project_revision_updated" yaml:"project_revision_updated" schema:"project_revision_updated,required"`
}

MlCopilotServerMessageProjectRevisionUpdated: Revision-aware notification that the canonical project was updated. API emits this only after the new canonical revision is durable.

type MlCopilotServerMessageProjectSnapshotResult added in v0.2.44

type MlCopilotServerMessageProjectSnapshotResult struct {
	// ProjectSnapshotResult:
	ProjectSnapshotResult ProjectSnapshotResult `json:"project_snapshot_result" yaml:"project_snapshot_result" schema:"project_snapshot_result,required"`
}

MlCopilotServerMessageProjectSnapshotResult: Result of validating a revision-aware client project snapshot. `Accepted` and `Merged` are emitted only after the new canonical revision is durable.

type MlCopilotServerMessageProjectUpdated added in v0.2.42

type MlCopilotServerMessageProjectUpdated struct {
	// ProjectUpdated:
	ProjectUpdated ProjectUpdated `json:"project_updated" yaml:"project_updated" schema:"project_updated,required"`
}

MlCopilotServerMessageProjectUpdated: Notification that the KCL project has been updated.

type MlCopilotServerMessageReasoning added in v0.2.42

type MlCopilotServerMessageReasoning struct {
	// Reasoning: A message containing reasoning information.
	Reasoning any `json:"reasoning" yaml:"reasoning" schema:"reasoning,required"`
}

MlCopilotServerMessageReasoning: Assistant reasoning / chain-of-thought (if you expose it).

type MlCopilotServerMessageReplay added in v0.2.42

type MlCopilotServerMessageReplay struct {
	// Replay:
	Replay Replay `json:"replay" yaml:"replay" schema:"replay,required"`
}

MlCopilotServerMessageReplay: Replay containing raw bytes for previously-saved messages for a conversation. Includes server messages and client `User` messages. Invariants: - Client replay includes server messages: `Info`, `Error`, `Reasoning(..)`, `ToolOutput { .. }`, `Files { .. }`, `ProjectUpdated { .. }`, and `EndOfStream { .. }`. - Client replay also includes client `User` messages. - Backend replay includes client `User` messages plus selected reasoning, edit metadata, recovery output, and final responses. - The following are NEVER included from persisted chat rows: `SessionData`, `ConversationId`, `Delta`, `BackendShutdown`, `ZookeeperAutoRouterMetadata`, `ZookeeperOpenAiResponseCheckpoint`, `ZookeeperOpenAiIntermediateResponseCheckpoint`, or `ZookeeperTurnUsage`. - `ZookeeperRecoveryToolOutput` is included only in replay sent to the text-to-CAD backend and is filtered from client replay. - The latest completed `ZookeeperOpenAiResponseCheckpoint` is synthesized from prompt metadata only for replay sent to the text-to-CAD backend. - The active unfinished prompt's latest `ZookeeperOpenAiIntermediateResponseCheckpoint` is synthesized only for replay sent to the text-to-CAD backend. - Ordering is stable: messages are ordered by prompt creation time within the conversation, then by the per-prompt `seq` value (monotonically increasing as seen in the original stream).

Wire format: - Each element is canonical serialized bytes (typically JSON) for either a `MlCopilotServerMessage` or a `MlCopilotClientMessage::User`. - Client-facing replays may omit large attachment bytes and instead place socket fetch metadata in `MlCopilotFile.metadata`. - When delivered as an initial replay over the websocket (upon `?replay=true&conversation_id=<uuid>`), the server sends a single WebSocket Binary frame containing a MsgPack-encoded document of this enum: `Replay { messages }`.

type MlCopilotServerMessageRequestAttachments added in v0.2.44

type MlCopilotServerMessageRequestAttachments struct {
	// RequestAttachments:
	RequestAttachments RequestAttachments `json:"request_attachments" yaml:"request_attachments" schema:"request_attachments,required"`
}

MlCopilotServerMessageRequestAttachments: Backend-only request for API to reload client attachments from storage. API handles this message internally and responds upstream with `MlCopilotClientMessage::AttachmentResponse`; it is not forwarded to the browser.

type MlCopilotServerMessageSessionData added in v0.2.42

type MlCopilotServerMessageSessionData struct {
	// SessionData:
	SessionData SessionData `json:"session_data" yaml:"session_data" schema:"session_data,required"`
}

MlCopilotServerMessageSessionData: Session metadata sent by the server right after authentication. Semantics: - This message is NOT persisted in the database and will NEVER appear in a subsequent `Replay` message. However, we do have the `api_call_id` in the database. - Timing: sent immediately after a client is authenticated on a websocket. Useful for correlating logs and traces.

type MlCopilotServerMessageToolOutput added in v0.2.42

type MlCopilotServerMessageToolOutput struct {
	// ToolOutput:
	ToolOutput ToolOutput `json:"tool_output" yaml:"tool_output" schema:"tool_output,required"`
}

MlCopilotServerMessageToolOutput: Completed tool call result.

type MlCopilotServerMessageZookeeperAutoRouterMetadata added in v0.2.44

type MlCopilotServerMessageZookeeperAutoRouterMetadata struct {
	// ZookeeperAutoRouterMetadata: Zookeeper Auto-router decision metadata persisted on a copilot prompt.
	ZookeeperAutoRouterMetadata ZookeeperAutoRouterMetadata `json:"zookeeper_auto_router_metadata" yaml:"zookeeper_auto_router_metadata" schema:"zookeeper_auto_router_metadata,required"`
}

MlCopilotServerMessageZookeeperAutoRouterMetadata: Backend-only Zookeeper Auto-router metadata. API persists this on the active prompt and does not forward it to clients or replay it as a chat message.

type MlCopilotServerMessageZookeeperOpenAiIntermediateResponseCheckpoint added in v0.2.44

type MlCopilotServerMessageZookeeperOpenAiIntermediateResponseCheckpoint struct {
	// ZookeeperOpenAiIntermediateResponseCheckpoint: OpenAI response state required to resume an unfinished Zookeeper turn.
	ZookeeperOpenAiIntermediateResponseCheckpoint ZookeeperOpenAiIntermediateResponseCheckpoint `` /* 184-byte string literal not displayed */
}

MlCopilotServerMessageZookeeperOpenAiIntermediateResponseCheckpoint: Backend-only OpenAI checkpoint for an unfinished Zookeeper turn. API persists the latest checkpoint on the active prompt and includes it only in replay sent to the text-to-CAD backend. It is never forwarded to browser clients.

type MlCopilotServerMessageZookeeperOpenAiResponseCheckpoint added in v0.2.44

type MlCopilotServerMessageZookeeperOpenAiResponseCheckpoint struct {
	// ZookeeperOpenAiResponseCheckpoint:
	ZookeeperOpenAiResponseCheckpoint ZookeeperOpenAiResponseCheckpoint `` /* 145-byte string literal not displayed */
}

MlCopilotServerMessageZookeeperOpenAiResponseCheckpoint: Backend-only completed OpenAI response checkpoint. API persists this on the active prompt and includes the latest completed checkpoint only in replay sent to the text-to-CAD backend. It is never forwarded to browser clients.

type MlCopilotServerMessageZookeeperRecoveryToolOutput added in v0.2.44

type MlCopilotServerMessageZookeeperRecoveryToolOutput struct {
	// ZookeeperRecoveryToolOutput:
	ZookeeperRecoveryToolOutput ZookeeperRecoveryToolOutput `json:"zookeeper_recovery_tool_output" yaml:"zookeeper_recovery_tool_output" schema:"zookeeper_recovery_tool_output,required"`
}

MlCopilotServerMessageZookeeperRecoveryToolOutput: Backend-only completed tool result used for portable Zookeeper recovery. API persists this message and includes it only in replay sent to the text-to-CAD backend. It is never forwarded to browser clients.

type MlCopilotServerMessageZookeeperTurnUsage added in v0.2.44

type MlCopilotServerMessageZookeeperTurnUsage struct {
	// ZookeeperTurnUsage: Token usage and cost for one completed Zookeeper turn.
	//
	// A turn is many model calls: the streamed agent loop, helper agents, conversation compaction, Auto-mode routing, and any retried attempts. This is the sum of all of them, with breakdowns by model and by stage.
	ZookeeperTurnUsage ZookeeperTurnUsage `json:"zookeeper_turn_usage" yaml:"zookeeper_turn_usage" schema:"zookeeper_turn_usage,required"`
}

MlCopilotServerMessageZookeeperTurnUsage: Backend-only token usage and cost for one completed Zookeeper turn. Sent just before `EndOfStream`. API records it in `meta.usage` on the turn's `EndOfStream` message row, alongside the `meta.billing` revenue figures, and never forwards it to clients or replays it as a chat message. It exists so spend can be compared against what the turn was billed; it is not customer-facing.

type MlCopilotSupportedModel added in v0.2.42

type MlCopilotSupportedModel string

MlCopilotSupportedModel: AI models that we support using with the system. In theory any model with reasoning capabilities can work.

const (
	// MlCopilotSupportedModelGpt5Nano: gpt-5-nano
	MlCopilotSupportedModelGpt5Nano MlCopilotSupportedModel = "gpt5_nano"
	// MlCopilotSupportedModelGpt5Mini: gpt-5-mini
	MlCopilotSupportedModelGpt5Mini MlCopilotSupportedModel = "gpt5_mini"
	// MlCopilotSupportedModelGpt5Codex: gpt-5-codex
	MlCopilotSupportedModelGpt5Codex MlCopilotSupportedModel = "gpt5_codex"
	// MlCopilotSupportedModelGpt5: gpt-5
	MlCopilotSupportedModelGpt5 MlCopilotSupportedModel = "gpt5"
	// MlCopilotSupportedModelO3Mini: o3-mini
	MlCopilotSupportedModelO3Mini MlCopilotSupportedModel = "o3_mini"
	// MlCopilotSupportedModelAzureO3Mini: azure o3-mini
	MlCopilotSupportedModelAzureO3Mini MlCopilotSupportedModel = "azure_o3_mini"
	// MlCopilotSupportedModelAzureGpt4O: azure gpt-4o
	MlCopilotSupportedModelAzureGpt4O MlCopilotSupportedModel = "azure_gpt4o"
	// MlCopilotSupportedModelAzureGpt4OMini: azure gpt-4o-mini
	MlCopilotSupportedModelAzureGpt4OMini MlCopilotSupportedModel = "azure_gpt4o_mini"
)

type MlCopilotSystemCommand added in v0.2.42

type MlCopilotSystemCommand string

MlCopilotSystemCommand: The type of system command that can be sent to the ML Copilot.

const (
	// MlCopilotSystemCommandNew: Reset the conversation state, by creating a new state.
	MlCopilotSystemCommandNew MlCopilotSystemCommand = "new"
	// MlCopilotSystemCommandBye: Disconnect the client, which can be used to end the session.
	MlCopilotSystemCommandBye MlCopilotSystemCommand = "bye"
	// MlCopilotSystemCommandContinue: Continue a previously-started turn after the client reconnects.
	MlCopilotSystemCommandContinue MlCopilotSystemCommand = "continue"
	// MlCopilotSystemCommandInterrupt: Interrupt the current prompt that is being processed.
	MlCopilotSystemCommandInterrupt MlCopilotSystemCommand = "interrupt"
	// MlCopilotSystemCommandCancel: Cancel the current prompt that is being processed.
	MlCopilotSystemCommandCancel MlCopilotSystemCommand = "cancel"
	// MlCopilotSystemCommandAnswerNow: Answer now, which forces the AI to finish the current response.
	MlCopilotSystemCommandAnswerNow MlCopilotSystemCommand = "answer_now"
)

type MlCopilotTool added in v0.2.42

type MlCopilotTool string

MlCopilotTool: The tools that can be used by the ML Copilot.

const (
	// MlCopilotToolEditKclCode: The tool for generating or editing KCL code based on user prompts.
	MlCopilotToolEditKclCode MlCopilotTool = "edit_kcl_code"
	// MlCopilotToolTextToCad: The tool for generating CAD models from textual descriptions.
	MlCopilotToolTextToCad MlCopilotTool = "text_to_cad"
	// MlCopilotToolMechanicalKnowledgeBase: The tool for querying a mechanical knowledge base.
	MlCopilotToolMechanicalKnowledgeBase MlCopilotTool = "mechanical_knowledge_base"
	// MlCopilotToolWebSearch: The tool for searching the web for information.
	MlCopilotToolWebSearch MlCopilotTool = "web_search"
)

type MlFeedback added in v0.2.37

type MlFeedback string

MlFeedback: Human feedback on an ML response.

const (
	// MlFeedbackThumbsUp: Thumbs up.
	MlFeedbackThumbsUp MlFeedback = "thumbs_up"
	// MlFeedbackThumbsDown: Thumbs down.
	MlFeedbackThumbsDown MlFeedback = "thumbs_down"
	// MlFeedbackAccepted: Accepted.
	MlFeedbackAccepted MlFeedback = "accepted"
	// MlFeedbackRejected: Rejected.
	MlFeedbackRejected MlFeedback = "rejected"
)

type MlMessageRole added in v0.2.44

type MlMessageRole string

MlMessageRole: The role of the author of a chat message.

const (
	// MlMessageRoleClient: Client-authored input.
	MlMessageRoleClient MlMessageRole = "client"
	// MlMessageRoleServer: Server-authored message.
	MlMessageRoleServer MlMessageRole = "server"
)

type MlReasoningEffort added in v0.2.42

type MlReasoningEffort string

MlReasoningEffort: Specify the amount of effort used in reasoning. Read the following for more info: https://platform.openai.com/docs/guides/reasoning#how-reasoning-works

const (
	// MlReasoningEffortLow: Low reasoning
	MlReasoningEffortLow MlReasoningEffort = "low"
	// MlReasoningEffortMedium: Medium reasoning
	MlReasoningEffortMedium MlReasoningEffort = "medium"
	// MlReasoningEffortHigh: High reasoning
	MlReasoningEffortHigh MlReasoningEffort = "high"
	// MlReasoningEffortXhigh: Xhigh reasoning
	MlReasoningEffortXhigh MlReasoningEffort = "xhigh"
)

type MlService added in v0.2.36

type MlService service

MlService: Machine learning to generate CAD models and other things.

func (*MlService) CopilotWs added in v0.2.42

func (s *MlService) CopilotWs(replay bool, conversationId UUID, replayAttachmentMode MlCopilotReplayAttachmentMode, pr int, body any) (*websocket.Conn, error)

CopilotWs: Open a websocket to a Zookeeper agent instance. Remember to authenticate before sending messages. [For WebSockets it's a little different.](/docs/developer-tools/api/authentication?lang=curl#websockets)

As with all Zoo WebSockets, you must implement a ping-pong interval / heartbeat to keep the connection open. This involves a simple `{ type: "ping" }` every ~5s and **check that a `{ pong: {} } ` is received**.

For the "standard experience" where the agent continues off conversations, you'll want to set the `replay` query string param to `true` and record "conversation ids", which are then passed as the other query string parameter.

A list of past conversations can be fetch from [/ml/conversations](/docs/developer-tools/api/ml/list-conversations?lang=curl).

The general use-case is to fire off `{ type: "user", content: "my prompt goes here" }` messages and interpret the various message types that return.

Notable behavior: **ONLY KCL IS RETURNED.** It's a common misunderstanding that Zookeeper returns models in formats such as STEP and STL directly. This is incorrect. All outputs are in KCL, which can then be fed into the [Engine API](/docs/developer-tools/engine-api) (specifically the `exec_kcl_project` command) or the [Zoo CLI](/docs/developer-tools/cli/manual) (`zoo kcl snapshot ...`).

In the future we may add a more direct method, but you can always rely on those.

Parameters

  • `replay`
  • `conversationId`
  • `replayAttachmentMode`: Controls whether replayed attachments are sent inline or fetched on demand.
  • `pr`
  • `body`: The types of messages that can be sent by the client to the server.
Example

CopilotWs: Open a websocket to a Zookeeper agent instance. Remember to authenticate before sending messages. [For WebSockets it's a little different.](/docs/developer-tools/api/authentication?lang=curl#websockets)

As with all Zoo WebSockets, you must implement a ping-pong interval / heartbeat to keep the connection open. This involves a simple `{ type: "ping" }` every ~5s and **check that a `{ pong: {} } ` is received**.

For the "standard experience" where the agent continues off conversations, you'll want to set the `replay` query string param to `true` and record "conversation ids", which are then passed as the other query string parameter.

A list of past conversations can be fetch from [/ml/conversations](/docs/developer-tools/api/ml/list-conversations?lang=curl).

The general use-case is to fire off `{ type: "user", content: "my prompt goes here" }` messages and interpret the various message types that return.

Notable behavior: **ONLY KCL IS RETURNED.** It's a common misunderstanding that Zookeeper returns models in formats such as STEP and STL directly. This is incorrect. All outputs are in KCL, which can then be fed into the [Engine API](/docs/developer-tools/engine-api) (specifically the `exec_kcl_project` command) or the [Zoo CLI](/docs/developer-tools/cli/manual) (`zoo kcl snapshot ...`).

In the future we may add a more direct method, but you can always rely on those.

Parameters

  • `replay`
  • `conversationId`
  • `replayAttachmentMode`: Controls whether replayed attachments are sent inline or fetched on demand.
  • `pr`
  • `body`: The types of messages that can be sent by the client to the server.
package main

import (
	"log"
	"os"
	"os/signal"
	"time"

	"github.com/gorilla/websocket"
	"github.com/kittycad/kittycad.go"
)

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

	// Create the websocket connection.
	ws, err := client.Ml.CopilotWs(true, kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), "", 123, "")
	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
		}
	}

}

func (*MlService) CreateCustomModel added in v0.2.42

func (s *MlService) CreateCustomModel(body CreateCustomModel) (*CustomModel, error)

CreateCustomModel: Create a custom ML model that is backed by one or more org datasets. Dataset readiness is enforced via `OrgDatasetFileConversion::status_counts_for_datasets`: - At least one conversion must have status `success`. - No conversions may remain in `queued`. If even a single file is still queued the dataset is treated as “not ready for training.” - A dataset consisting only of `canceled` or `error_*` entries is rejected because there’s nothing usable.

Parameters

  • `body`: Body for creating a custom ML model.
Example

CreateCustomModel: Create a custom ML model that is backed by one or more org datasets. Dataset readiness is enforced via `OrgDatasetFileConversion::status_counts_for_datasets`: - At least one conversion must have status `success`. - No conversions may remain in `queued`. If even a single file is still queued the dataset is treated as “not ready for training.” - A dataset consisting only of `canceled` or `error_*` entries is rejected because there’s nothing usable.

Parameters

  • `body`: Body for creating a custom ML model.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Ml.CreateCustomModel(kittycad.CreateCustomModel{DatasetIds: []kittycad.UUID{}, Name: "some-string", SystemPrompt: "some-string"})
	if err != nil {
		panic(err)
	}

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

}

func (*MlService) CreateKclCodeCompletions added in v0.2.36

func (s *MlService) 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.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*MlService) CreateProprietaryToKcl added in v0.2.41

func (s *MlService) CreateProprietaryToKcl(codeOption CodeOption, body *MultipartForm) (*KclModel, error)

CreateProprietaryToKcl: Converts a proprietary CAD format to KCL. This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.

A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.

This endpoint is designed to work with any native proprietary CAD format, for example: - SolidWorks (.sldprt) - Creo (.prt) - Catia (.catpart) - NX (.prt) - Fusion 360 (.f3d)

This endpoint is deterministic, it preserves the original design intent by using the feature tree data. This endpoint does not use any machine learning or AI.

This endpoint is currently in beta, and is only available to users with access to the feature. Please contact support if you are interested in getting access.

This endpoint might have limitations and bugs, please report any issues you encounter. It will be improved over time.

Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.

Parameters

  • `codeOption`: `CodeOption`

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

    ```json { "type": "string", "enum": [ "parse", "mock_execute", "execute" ] } ``` </details>

  • `body`

Example

CreateProprietaryToKcl: Converts a proprietary CAD format to KCL. This endpoint is used to convert a proprietary CAD format to KCL. The file passed MUST have feature tree data.

A STEP file does not have feature tree data, so it will not work. A sldprt file does have feature tree data, so it will work.

This endpoint is designed to work with any native proprietary CAD format, for example: - SolidWorks (.sldprt) - Creo (.prt) - Catia (.catpart) - NX (.prt) - Fusion 360 (.f3d)

This endpoint is deterministic, it preserves the original design intent by using the feature tree data. This endpoint does not use any machine learning or AI.

This endpoint is currently in beta, and is only available to users with access to the feature. Please contact support if you are interested in getting access.

This endpoint might have limitations and bugs, please report any issues you encounter. It will be improved over time.

Input filepaths will be normalized and re-canonicalized to be under the current working directory -- so returned paths may differ from provided paths, and care must be taken when handling user provided paths.

Parameters

  • `codeOption`: `CodeOption`

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

    ```json { "type": "string", "enum": [ "parse", "mock_execute", "execute" ] } ``` </details>

  • `body`

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

	result, err := client.Ml.CreateProprietaryToKcl(kittycad.CodeOptionParse, form)
	if err != nil {
		panic(err)
	}

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

}

func (*MlService) CreateTextToCadPartFeedback added in v0.2.42

func (s *MlService) CreateTextToCadPartFeedback(id UUID, feedback MlFeedback) error

CreateTextToCadPartFeedback: Give feedback to a specific ML response. This can be a text-to-CAD creation or iteration.

This endpoint requires authentication by any Zoo user. The user must be the owner of the ML response, in order to give feedback.

Parameters

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

CreateTextToCadPartFeedback: Give feedback to a specific ML response. This can be a text-to-CAD creation or iteration.

This endpoint requires authentication by any Zoo user. The user must be the owner of the ML response, in order to give feedback.

Parameters

  • `id`
  • `feedback`: Human feedback on an ML response.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*MlService) GetCustomModel added in v0.2.42

func (s *MlService) GetCustomModel(id UUID) (*CustomModel, error)

GetCustomModel: Retrieve the details of a single custom ML model so long as it belongs to the caller’s organization. Parameters

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

GetCustomModel: Retrieve the details of a single custom ML model so long as it belongs to the caller’s organization. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*MlService) GetTextToCadPartForUser added in v0.2.42

func (s *MlService) GetTextToCadPartForUser(id UUID) (*any, error)

GetTextToCadPartForUser: 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

GetTextToCadPartForUser: 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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*MlService) KclMigrationWs added in v0.2.44

func (s *MlService) KclMigrationWs(body any) (*websocket.Conn, error)

KclMigrationWs: Open a sponsored KCL migration connection. It cannot execute ordinary prompts. Parameters

  • `body`: The restricted public migration connection never accepts ordinary prompts.
Example

KclMigrationWs: Open a sponsored KCL migration connection. It cannot execute ordinary prompts. Parameters

  • `body`: The restricted public migration connection never accepts ordinary prompts.
package main

import (
	"log"
	"os"
	"os/signal"
	"time"

	"github.com/gorilla/websocket"
	"github.com/kittycad/kittycad.go"
)

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

	// Create the websocket connection.
	ws, err := client.Ml.KclMigrationWs("")
	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
		}
	}

}

func (*MlService) ListConversationsForUser added in v0.2.42

func (s *MlService) ListConversationsForUser(limit int, pageToken string, sortBy CreatedAtSortMode) (*ConversationResultsPage, error)

ListConversationsForUser: List conversations This endpoint requires authentication by any Zoo user. It returns the conversations for the authenticated user.

The conversations are returned in order of creation, with the most recently created conversations 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

ListConversationsForUser: List conversations This endpoint requires authentication by any Zoo user. It returns the conversations for the authenticated user.

The conversations are returned in order of creation, with the most recently created conversations first.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*MlService) ListTextToCadPartsForUser added in v0.2.42

func (s *MlService) ListTextToCadPartsForUser(limit int, pageToken string, sortBy CreatedAtSortMode, noModels bool, noParts bool, conversationId UUID) (*TextToCadResponseResultsPage, error)

ListTextToCadPartsForUser: List text-to-CAD parts 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 parts for the authenticated user.

The text-to-CAD parts are returned in order of creation, with the most recently created text-to-CAD parts 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`

  • `noParts`

  • `conversationId`: A UUID usually v4 or v7

Example

ListTextToCadPartsForUser: List text-to-CAD parts 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 parts for the authenticated user.

The text-to-CAD parts are returned in order of creation, with the most recently created text-to-CAD parts 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`

  • `noParts`

  • `conversationId`: A UUID usually v4 or v7

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Ml.ListTextToCadPartsForUser(123, "some-string", "", true, true, kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
	if err != nil {
		panic(err)
	}

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

}

func (*MlService) ReasoningWs added in v0.2.42

func (s *MlService) ReasoningWs(id UUID, body any) (*websocket.Conn, error)

ReasoningWs: Open a websocket to prompt the ML copilot. Parameters

  • `id`
  • `body`: The types of messages that can be sent by the client to the server.
Example

ReasoningWs: Open a websocket to prompt the ML copilot. Parameters

  • `id`
  • `body`: The types of messages that can be sent by the client to the server.
package main

import (
	"log"
	"os"
	"os/signal"
	"time"

	"github.com/gorilla/websocket"
	"github.com/kittycad/kittycad.go"
)

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

	// Create the websocket connection.
	ws, err := client.Ml.ReasoningWs(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), "")
	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
		}
	}

}

func (*MlService) UpdateCustomModel added in v0.2.42

func (s *MlService) UpdateCustomModel(id UUID, body UpdateCustomModel) (*CustomModel, error)

UpdateCustomModel: Update mutable metadata (name, system prompt) for a custom ML model owned by the caller's organization. Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: Body for updating a custom ML model.
Example

UpdateCustomModel: Update mutable metadata (name, system prompt) for a custom ML model owned by the caller's organization. Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: Body for updating a custom ML model.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Ml.UpdateCustomModel(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdateCustomModel{Name: "some-string", SystemPrompt: "some-string"})
	if err != nil {
		panic(err)
	}

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

}

type MlToolResult added in v0.2.42

type MlToolResult any

MlToolResult: MlToolResult: Responses from tools.

type MlToolResultError added in v0.2.42

type MlToolResultError struct {
	// Error: Any error that occurred during the tool execution.
	Error string `json:"error" yaml:"error" schema:"error"`
	// Outputs: The output files. Returns a map of the file name to the file contents. The file contents are not encoded since kcl files are not binary.
	Outputs map[string]string `json:"outputs" yaml:"outputs" schema:"outputs"`
	// ProjectName: The name of the project, if any.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// StatusCode: The status code of the tool execution.
	StatusCode int `json:"status_code" yaml:"status_code" schema:"status_code,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlToolResultError: Response from the `TextToCad` tool.

type MlToolResultOutputs added in v0.2.42

type MlToolResultOutputs struct {
	// Error: Any error that occurred during the tool execution.
	Error string `json:"error" yaml:"error" schema:"error"`
	// Outputs: The output files. Returns a map of the file name to the file contents. The file contents are not encoded since kcl files are not binary.
	Outputs map[string]string `json:"outputs" yaml:"outputs" schema:"outputs"`
	// ProjectName: The name of the project, if any.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// StatusCode: The status code of the tool execution.
	StatusCode int `json:"status_code" yaml:"status_code" schema:"status_code,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// ZookeeperEditPatch: Optional reversible delta for undoing/redoing a Zookeeper project edit locally. The `outputs` map remains the resulting project state.
	ZookeeperEditPatch ZookeeperEditPatch `json:"zookeeper_edit_patch" yaml:"zookeeper_edit_patch" schema:"zookeeper_edit_patch"`
}

MlToolResultOutputs: Response from the `EditKclCode` tool.

type MlToolResultProjectName added in v0.2.42

type MlToolResultProjectName struct {
	// Response: The response from the mechanical knowledge base.
	Response string `json:"response" yaml:"response" schema:"response,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

MlToolResultProjectName: Mechanical knowledge base response.

type ModelingAppShareLinks string

ModelingAppShareLinks: Modeling App share link capabilities.

const (
	// ModelingAppShareLinksPublic: Publicly accessible share links.
	ModelingAppShareLinksPublic ModelingAppShareLinks = "public"
	// ModelingAppShareLinksPasswordProtected: Share links guarded by a password.
	ModelingAppShareLinksPasswordProtected ModelingAppShareLinks = "password_protected"
	// ModelingAppShareLinksOrganizationOnly: Share links restricted to members of the organization.
	ModelingAppShareLinksOrganizationOnly ModelingAppShareLinks = "organization_only"
)

type ModelingAppSubscriptionTier added in v0.2.33

type ModelingAppSubscriptionTier struct {
	// AnnualDiscount: Annual discount. The percentage off the monthly price if the user pays annually.
	AnnualDiscount float64 `json:"annual_discount" yaml:"annual_discount" schema:"annual_discount"`
	// BillingMode: Indicates how billing collection is routed for this plan.
	BillingMode SubscriptionBillingMode `json:"billing_mode" yaml:"billing_mode" schema:"billing_mode"`
	// Description: A description of the tier.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// DisplayName: The display name of the tier.
	DisplayName string `json:"display_name" yaml:"display_name" schema:"display_name"`
	// EndpointsIncluded: The Zoo API endpoints that are included when through an approved zoo tool.
	EndpointsIncluded []APIEndpoint `json:"endpoints_included" yaml:"endpoints_included" schema:"endpoints_included"`
	// Features: Features that are included in the subscription.
	Features []SubscriptionTierFeature `json:"features" yaml:"features" schema:"features"`
	// MlCustomModels: Indicates whether the plan enables custom ML models.
	MlCustomModels bool `json:"ml_custom_models" yaml:"ml_custom_models" schema:"ml_custom_models"`
	// MonthlyPayAsYouGoAPICredits: The amount of pay-as-you-go API credits the individual or org gets outside the modeling app for each monthly account-anniversary period. The boundary is evaluated in UTC and does not change with monthly versus annual subscription payment cadence. This is equivalent to the monetary value divided by the price of an API credit.
	MonthlyPayAsYouGoAPICredits int `json:"monthly_pay_as_you_go_api_credits" yaml:"monthly_pay_as_you_go_api_credits" schema:"monthly_pay_as_you_go_api_credits"`
	// MonthlyPayAsYouGoAPICreditsMonetaryValue: The monetary value of pay-as-you-go API credits the individual or org gets outside the modeling app for each monthly account-anniversary period. The boundary is evaluated in UTC and does not change with monthly versus annual subscription payment cadence.
	MonthlyPayAsYouGoAPICreditsMonetaryValue float64 `` /* 169-byte string literal not displayed */
	// Name: The name of the tier.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// PayAsYouGoAPICreditPrice: The price of an API credit.
	PayAsYouGoAPICreditPrice float64 `json:"pay_as_you_go_api_credit_price" yaml:"pay_as_you_go_api_credit_price" schema:"pay_as_you_go_api_credit_price"`
	// 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"`
	// ShareLinks: The options for sharable links through the modeling app.
	ShareLinks []ModelingAppShareLinks `json:"share_links" yaml:"share_links" schema:"share_links"`
	// 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: Rich information about a Modeling App subscription tier.

type ModelingCmd added in v0.2.42

type ModelingCmd any

ModelingCmd: ModelingCmd: Commands that the KittyCAD engine can execute.

type ModelingCmdAngle added in v0.2.33

type ModelingCmdAngle struct {
	// EdgeID: The edge to use as the mirror axis (legacy API). Must be linear and lie in the plane of the solid. If both `edge_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id"`
	// EdgeReference: Edge reference to use as the mirror axis (new API). If both `edge_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeReference EdgeSpecifier `json:"edge_reference" yaml:"edge_reference" schema:"edge_reference"`
	// Ids: ID of the mirror entities.
	Ids []UUID `json:"ids" yaml:"ids" schema:"ids,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdAngle: Mirror the input entities over the specified edge. Deprecated; please use `EntityMirrorAcross`

type ModelingCmdAngleStepSize added in v0.2.42

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

ModelingCmdAngleStepSize: Export the scene to a file. The response is a MsgPack-encoded message in a WebSocket binary frame.

type ModelingCmdAxis added in v0.2.33

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

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

type ModelingCmdAxisIs2D added in v0.2.33

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

ModelingCmdAxisIs2D: Query the type of entity that was selected. E.g. if a face is selected the face id is returned, if an edge/vertex is selected then the face ids that uniquely define the edge/vertex are returned (typically two).

type ModelingCmdBaseCurveIndex added in v0.2.38

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

ModelingCmdBaseCurveIndex: Set the color of a plane.

type ModelingCmdBezApproximateRational added in v0.2.38

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

ModelingCmdBezApproximateRational: Set the current tool.

type ModelingCmdBlendType added in v0.2.43

type ModelingCmdBlendType struct {
	// ObjectID: Which object is being flipped.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdBlendType: Flips (reverses) a brep that is "inside-out".

type ModelingCmdBodyType added in v0.2.43

type ModelingCmdBodyType struct {
	// ObjectIds: Which bodies are being joined.
	ObjectIds []UUID `json:"object_ids" yaml:"object_ids" schema:"object_ids,required"`
	// Tolerance: The maximum acceptable surface gap computed between the 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"`
}

ModelingCmdBodyType: Command for joining multiple Surfaces (non-manifold) to a Solid.

type ModelingCmdCameraDragEnd added in v0.2.18

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

ModelingCmdCameraDragEnd: Query the given path.

type ModelingCmdCameraDragMove added in v0.2.18

type ModelingCmdCameraDragMove struct {
	// PlaneID: The id of the plane used for the projection.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// Points: The list of points that will be projected.
	Points []Point3D `json:"points" yaml:"points" schema:"points,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// UsePlaneCoords: If true: the projected points are returned in the plane_id's coordinate sysetm. else: the projected points are returned in the world coordinate system.
	UsePlaneCoords bool `json:"use_plane_coords" yaml:"use_plane_coords" schema:"use_plane_coords,required"`
}

ModelingCmdCameraDragMove: Project a list of points on to a plane.

type ModelingCmdCameraDragStart added in v0.2.18

type ModelingCmdCameraDragStart struct {
	// BackfaceColor: The default color to use for all backfaces
	BackfaceColor Color `json:"backface_color" yaml:"backface_color" schema:"backface_color"`
	// Color: The default system color.
	Color Color `json:"color" yaml:"color" schema:"color"`
	// Edge3DColor: The default color to use for the edges of 3D bodies.
	Edge3DColor Color `json:"edge_3d_color" yaml:"edge_3d_color" schema:"edge_3d_color"`
	// HighlightColor: The default color to use for highlight
	HighlightColor Color `json:"highlight_color" yaml:"highlight_color" schema:"highlight_color"`
	// SelectionColor: The default color to use for selection
	SelectionColor Color `json:"selection_color" yaml:"selection_color" schema:"selection_color"`
	// Tolerance: The default tolerance values.
	Tolerance Tolerance `json:"tolerance" yaml:"tolerance" schema:"tolerance"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdCameraDragStart: Set the default system properties used when a specific property isn't set.

type ModelingCmdCenter added in v0.2.22

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

ModelingCmdCenter: Continue dragging the mouse.

type ModelingCmdCenter2D added in v0.2.42

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

ModelingCmdCenter2D: How many children does the entity have?

type ModelingCmdChildEntityIds added in v0.2.43

type ModelingCmdChildEntityIds struct {
	// BodyIds: Which target input bodies to intersect. Inputs with non-solid body types are permitted
	BodyIds []UUID `json:"body_ids" yaml:"body_ids" schema:"body_ids,required"`
	// KeepTools: If true, the provided tool bodies will not be modified
	KeepTools bool `json:"keep_tools" yaml:"keep_tools" schema:"keep_tools"`
	// SeparateBodies: If true, target bodies will be separated into multiple objects at their intersection boundaries.
	SeparateBodies bool `json:"separate_bodies" yaml:"separate_bodies" schema:"separate_bodies"`
	// Tolerance: The maximum acceptable surface gap between the intersected bodies. Must be positive (i.e. greater than zero).
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// ToolIds: If provided, only these bodies will be used to intersect with the target bodies in body_ids, Otherwise, all bodies in body_ids will be intersected with themselves.
	ToolIds []UUID `json:"tool_ids" yaml:"tool_ids" schema:"tool_ids"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// UseLegacy: If true, use the legacy CSG algorithm.
	UseLegacy bool `json:"use_legacy" yaml:"use_legacy" schema:"use_legacy"`
}

ModelingCmdChildEntityIds: Create a new non-manifold body by intersecting all the input bodies, cutting and splitting all the faces at the intersection boundaries.

type ModelingCmdChildIndex added in v0.2.27

type ModelingCmdChildIndex struct {
	// Entities: Which entities to select (face-based references for edges/vertices, face_id for faces)
	Entities []EntityReference `json:"entities" yaml:"entities" schema:"entities,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdChildIndex: Set the selection to exactly these entities (replaces previous selection). Empty array clears the selection.

type ModelingCmdClosePath added in v0.2.18

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

ModelingCmdClosePath: Set the background color of the scene.

type ModelingCmdDefaultCameraGetSettings added in v0.2.33

type ModelingCmdDefaultCameraGetSettings struct {
	// Index: IDs of the vertices for which to obtain curve ids from
	Index int `json:"index" yaml:"index" schema:"index,required"`
	// PathID: Which path to query
	PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdDefaultCameraGetSettings: Obtain curve id by index

type ModelingCmdDefaultCameraGetView added in v0.2.40

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

ModelingCmdDefaultCameraGetView: Obtain vertex ids for a path

type ModelingCmdDefaultCameraLookAt added in v0.2.19

type ModelingCmdDefaultCameraLookAt struct {
	// ObjectIds: Objects to remove.
	ObjectIds []UUID `json:"object_ids" yaml:"object_ids" schema:"object_ids,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdDefaultCameraLookAt: Remove scene objects.

type ModelingCmdDefaultCameraPerspectiveSettings added in v0.2.33

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

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

type ModelingCmdDefaultCameraSetView added in v0.2.40

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

ModelingCmdDefaultCameraSetView: Obtain the sketch target id (if the path was drawn in sketchmode) for a path

type ModelingCmdDefaultCameraZoom added in v0.2.27

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

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

type ModelingCmdDirection added in v0.2.44

type ModelingCmdDirection struct {
	// BlendType: The type of blend to use.
	BlendType BlendType `json:"blend_type" yaml:"blend_type" schema:"blend_type"`
	// Surfaces: The two surfaces that the blend will span between
	Surfaces []SurfaceEdgeReference `json:"surfaces" yaml:"surfaces" schema:"surfaces,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdDirection: Command for creating a blend between the edge of two given surfaces

type ModelingCmdDirectionReference added in v0.2.44

type ModelingCmdDirectionReference struct {
	// EdgeIndex: The primitive index of the edge being queried.
	EdgeIndex int `json:"edge_index" yaml:"edge_index" schema:"edge_index,required"`
	// ObjectID: The Solid3D parent who owns the edge
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdDirectionReference: What is the UUID of this body's n-th edge?

type ModelingCmdDistance added in v0.2.22

type ModelingCmdDistance struct {
	// FaceIndex: The primitive index of the face being queried.
	FaceIndex int `json:"face_index" yaml:"face_index" schema:"face_index,required"`
	// ObjectID: The Solid3D parent who owns the face
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdDistance: What is the UUID of this body's n-th face?

type ModelingCmdDistanceType added in v0.2.33

type ModelingCmdDistanceType struct {
	// CurveClockwise: By default, curve counterclockwise at intersections. If this is true, instead curve clockwise.
	CurveClockwise bool `json:"curve_clockwise" yaml:"curve_clockwise" schema:"curve_clockwise"`
	// IntersectionIndex: At which intersection between `segment` and `intersection_segment` should we stop following the `segment` and start following `intersection_segment`? Defaults to -1, which means the last intersection.
	IntersectionIndex int `json:"intersection_index" yaml:"intersection_index" schema:"intersection_index"`
	// IntersectionSegment: Second segment to follow to find the region. Intersects the first segment.
	IntersectionSegment UUID `json:"intersection_segment" yaml:"intersection_segment" schema:"intersection_segment,required"`
	// ObjectID: Which sketch object to create the region from.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Segment: First segment to follow to find the region.
	Segment UUID `json:"segment" yaml:"segment" schema:"segment,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Version: Which version of the Region endpoint to call.
	Version RegionVersion `json:"version" yaml:"version" schema:"version"`
}

ModelingCmdDistanceType: Create a region bounded by the intersection of various paths. The region should have an ID taken from the ID of the 'CreateRegion' modeling command.

type ModelingCmdDraftAngle added in v0.2.44

type ModelingCmdDraftAngle struct {
	// ObjectID: The Solid3D whose body type 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"`
}

ModelingCmdDraftAngle: Retrieves the body type.

type ModelingCmdEdgeGetLength added in v0.2.44

type ModelingCmdEdgeGetLength struct {
	// SelectedAtWindow: Where in the window was selected
	SelectedAtWindow Point2D `json:"selected_at_window" yaml:"selected_at_window" schema:"selected_at_window,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEdgeGetLength: The user clicked on a point in the window, returns the region the user clicked on, if any.

type ModelingCmdEdgeID added in v0.2.33

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

ModelingCmdEdgeID: Obtains the surface "center of mass"

type ModelingCmdEdgeIndex added in v0.2.43

type ModelingCmdEdgeIndex struct {
	// AlongVector: If given, only faces parallel to this vector will be considered.
	AlongVector Point3D `json:"along_vector" yaml:"along_vector" schema:"along_vector"`
	// EdgeID: Which edge you want the opposites of.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// 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"`
}

ModelingCmdEdgeIndex: Gets all edges which are opposite the given edge, across all possible faces.

type ModelingCmdEdgeReference added in v0.2.44

type ModelingCmdEdgeReference 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 parameter-space u,v position to evaluate the surface at
	Uv Point2D `json:"uv" yaml:"uv" schema:"uv,required"`
}

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

type ModelingCmdEngineUtilEvaluatePath added in v0.2.38

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

ModelingCmdEngineUtilEvaluatePath: Move the path's "pen". If you're in sketch mode, these coordinates are in the local coordinate system, not the world's coordinate system. For example, say you're sketching on the plane {x: (1,0,0), y: (0,1,0), origin: (0, 0, 50)}. In other words, the plane 50 units above the default XY plane. Then, moving the pen to (1, 1, 0) with this command uses local coordinates. So, it would move the pen to (1, 1, 50) in global coordinates.

type ModelingCmdEntityClone added in v0.2.40

type ModelingCmdEntityClone struct {
	// Distance: The distance to offset the surface by.
	Distance float64 `json:"distance" yaml:"distance" schema:"distance,required"`
	// Flip: Flip the newly created face.
	Flip bool `json:"flip" yaml:"flip" schema:"flip,required"`
	// SurfaceID: The surface to offset.
	SurfaceID UUID `json:"surface_id" yaml:"surface_id" schema:"surface_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityClone: Offset a surface by a given distance.

type ModelingCmdEntityDeleteChildren added in v0.2.43

type ModelingCmdEntityDeleteChildren struct {
	// ObjectID: The closed path to add a hole to.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Offset: The distance to offset the path (positive for outset, negative for inset)
	Offset float64 `json:"offset" yaml:"offset" schema:"offset,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityDeleteChildren: Add a hole to a closed path by offsetting it a uniform distance inward.

type ModelingCmdEntityGetAllChildUuids added in v0.2.27

type ModelingCmdEntityGetAllChildUuids struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Units: Which units the `value` field uses.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
	// Value: Distance between grid lines represents this much distance.
	Value float64 `json:"value" yaml:"value" schema:"value,required"`
}

ModelingCmdEntityGetAllChildUuids: Set the scale of the grid lines in the video feed.

type ModelingCmdEntityGetChildUuid added in v0.2.27

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

ModelingCmdEntityGetChildUuid: Get the number of objects in the scene

type ModelingCmdEntityGetDistance added in v0.2.33

type ModelingCmdEntityGetDistance struct {
	// ObjectID: Which sketch object to create the region from.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// QueryPoint: The query point (in the same coordinates as the sketch itself) if a possible sketch region contains this point, then that region will be created
	QueryPoint Point2D `json:"query_point" yaml:"query_point" schema:"query_point,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Version: Which version of the Region endpoint to call.
	Version RegionVersion `json:"version" yaml:"version" schema:"version"`
}

ModelingCmdEntityGetDistance: Create a region with a query point. The region should have an ID taken from the ID of the 'CreateRegionFromQueryPoint' modeling command.

type ModelingCmdEntityGetIndex added in v0.2.43

type ModelingCmdEntityGetIndex struct {
	// SeparateBodies: If true, non-contiguous bodies in the result will be returned as separate objects
	SeparateBodies bool `json:"separate_bodies" yaml:"separate_bodies" schema:"separate_bodies"`
	// SolidIds: Which solids to union together. Cannot be empty.
	SolidIds []UUID `json:"solid_ids" yaml:"solid_ids" schema:"solid_ids,required"`
	// Tolerance: The maximum acceptable surface gap computed between the joined solids. 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"`
	// UseLegacy: If true, use the legacy CSG algorithm.
	UseLegacy bool `json:"use_legacy" yaml:"use_legacy" schema:"use_legacy"`
}

ModelingCmdEntityGetIndex: Given a set of overlapping solids, create a new single solid. Most successful unions come from solids who's faces do not overlap aka non-coplanar.

Failure cases: * A common failure is unsupported coincident faces try to be unioned.

Warning cases: * When an element of the set doesn't overlap.

Notable behaviors: * What appear to be coincident points will succeed and not give a "no overlap" warning, even if they're not. * Elements' top or bottom faces may not combine into one new face, which can seem like the union failed. You can tell they succeeded from side faces not extending into the original solids. * When exporting to STEP, if the above behavior is observed, will merged the faces.

type ModelingCmdEntityGetNumChildren added in v0.2.27

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

ModelingCmdEntityGetNumChildren: Clear the selection

type ModelingCmdEntityGetParentID added in v0.2.27

type ModelingCmdEntityGetParentID struct {
	// EdgeID: Any edge that lies on the extrusion base path.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id"`
	// 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"`
}

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

type ModelingCmdEntityGetPrimitiveIndex added in v0.2.43

type ModelingCmdEntityGetPrimitiveIndex struct {
	// SeparateBodies: If true, non-contiguous bodies in the result will be returned as separate objects
	SeparateBodies bool `json:"separate_bodies" yaml:"separate_bodies" schema:"separate_bodies"`
	// TargetIds: Geometry to cut out from.
	TargetIds []UUID `json:"target_ids" yaml:"target_ids" schema:"target_ids,required"`
	// Tolerance: The maximum acceptable surface gap computed between the target and the solids cut out from it. Must be positive (i.e. greater than zero).
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// ToolIds: Will be cut out from the 'target'.
	ToolIds []UUID `json:"tool_ids" yaml:"tool_ids" schema:"tool_ids,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// UseLegacy: If true, use the legacy CSG algorithm.
	UseLegacy bool `json:"use_legacy" yaml:"use_legacy" schema:"use_legacy"`
}

ModelingCmdEntityGetPrimitiveIndex: Given a target solid, subtract a set of "tool solids" to create a new solid. Most successful subtracts come from solids who's faces do not overlap aka non-coplanar.

Prefer one `tool` over multiple when calling this feature.

Failure cases: * A common failure is unsupported coplanar faces try to be unioned.

Warning cases:

Notable behaviors: If two tools occupy the same vertical range and overlap, like two cubes of the same height, the subtract of the first will cause the second tool to fail because the first leaves behind coplanar faces, causing an aforementioned failure case.

Unlike `boolean_union`, if one tool in the set overlaps, any OTHER tool in the set that doesn't WILL NOT signal a non-overlap warning.

type ModelingCmdEntityGetSketchPaths added in v0.2.34

type ModelingCmdEntityGetSketchPaths struct {
	// Enabled: Enables or disables OIT. If not given, toggles it.
	Enabled bool `json:"enabled" yaml:"enabled" schema:"enabled"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityGetSketchPaths: Render transparent surfaces more accurately, but this might make rendering slower. Because it can interfere with runtime performance, it defaults to false.

type ModelingCmdEntityID added in v0.2.27

type ModelingCmdEntityID struct {
	// Padding: How much to pad the view frame by, as a fraction of the object(s) bounding box size. Negative padding will crop the view of the object proportionally. e.g. padding = 0.2 means the view will span 120% of the object(s) bounding box, and padding = -0.2 means the view will span 80% of the object(s) bounding box.
	Padding float64 `json:"padding" yaml:"padding" schema:"padding"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityID: Fit the view to the scene with an isometric view.

type ModelingCmdEntityId1 added in v0.2.33

type ModelingCmdEntityId1 struct {
	// CurveIds: Which curves to create the planar surface(s) from. Curves must be provided in the order they are connected to each other They must form a closed loop, either by themselves or in a group
	CurveIds []UUID `json:"curve_ids" yaml:"curve_ids" schema:"curve_ids,required"`
	// Tolerance: Tolerance for the planar surface creation. 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"`
}

ModelingCmdEntityId1: Create a planar surface bounded by the connection of various paths and curves. 'CreatePlanarSurface' modeling command.

type ModelingCmdEntityId2 added in v0.2.33

type ModelingCmdEntityId2 struct {
	// RegionID: Which region to resolve
	RegionID UUID `json:"region_id" yaml:"region_id" schema:"region_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdEntityId2: Finds a suitable set of arguments that can be passed to CreateRegion to resolve this very region.

type ModelingCmdEntityIds added in v0.2.27

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

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

type ModelingCmdEntityLinearPatternTransform added in v0.2.34

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

ModelingCmdEntityLinearPatternTransform: Gets debug information about a sketch

type ModelingCmdExport added in v0.2.19

type ModelingCmdExport struct {
	// Animated: Whether or not to animate the camera movement. (Animation is currently not supported.)
	Animated bool `json:"animated" yaml:"animated" schema:"animated"`
	// FaceID: Which face to orient camera to. If the face is not planar, no action will occur.
	FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
	// Padding: How much to pad the view frame by, as a fraction of the face bounding box size. Negative padding will crop the view of the face proportionally. e.g. padding = 0.2 means the view will span 120% of the face bounding box, and padding = -0.2 means the view will span 80% of the face bounding box.
	Padding float64 `json:"padding" yaml:"padding" schema:"padding"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdExport: Looks along the normal of the specified face (if it is planar!), and fits the view to it.

type ModelingCmdExport2D added in v0.2.40

type ModelingCmdExport2D struct {
	// Filter: The entity types to be queried.
	Filter []EntityType `json:"filter" yaml:"filter" schema:"filter,required"`
	// Skip: Skip the first n returned ids. If multiple filters are provided, this skip will apply to each filter individually.
	Skip int `json:"skip" yaml:"skip" schema:"skip,required"`
	// Take: Take n ids after any ids skipped. This value must be greater than zero and not exceed 1000. If multiple filters are provided, this take will apply to each filter individually. If there are fewer than `take` items of the provided filter type then the returned list's length will be the smaller value.
	Take int `json:"take" yaml:"take" schema:"take,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdExport2D: Get the ids of a given entity type.

type ModelingCmdExport3D added in v0.2.40

type ModelingCmdExport3D struct {
	// CameraMovement: Dictates whether or not the camera position should be adjusted during this operation If no movement is requested, the camera will orbit around the new center from its current position
	CameraMovement CameraMovement `json:"camera_movement" yaml:"camera_movement" schema:"camera_movement"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdExport3D: Updates the camera to center to the center of the current selection (or the origin if nothing is selected)

type ModelingCmdExtendPath added in v0.2.18

type ModelingCmdExtendPath struct {
	// ObjectID: Which Solid3D is being joined.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdExtendPath: Command for joining a Surface (non-manifold) body back to a Solid. All of the surfaces should already be contained within the body mated topologically. This operation should be the final step after a sequence of Solid modeling commands such as BooleanImprint, EntityDeleteChildren, Solid3dFlipFace If successful, the new body type will become "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 ModelingCmdExtrudeMethod added in v0.2.42

type ModelingCmdExtrudeMethod struct {
	// Angle: The signed angle of revolution (in degrees, must be <= 360 in either direction)
	Angle Angle `json:"angle" yaml:"angle" schema:"angle,required"`
	// BodyType: Should this extrude create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// 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"`
	// EdgeReference: Edge reference to use as the axis of revolution (new API). If both `edge_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeReference EdgeSpecifier `json:"edge_reference" yaml:"edge_reference" schema:"edge_reference"`
	// Opposite: Should the revolution also revolve in the opposite direction along the given axis? If so, this specifies its angle.
	Opposite string `json:"opposite" yaml:"opposite" schema:"opposite"`
	// 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"`
}

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

type ModelingCmdExtrudeToReference added in v0.2.42

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

ModelingCmdExtrudeToReference: Export the scene to a file. The response is a MsgPack-encoded message in a WebSocket binary frame.

type ModelingCmdFaceIds added in v0.2.34

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

ModelingCmdFaceIds: Changes the current highlighted entity to these entities.

type ModelingCmdFaceIndex added in v0.2.43

type ModelingCmdFaceIndex struct {
	// EdgeID: Which edge you want the previous edge 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"`
}

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

type ModelingCmdFaces added in v0.2.40

type ModelingCmdFaces struct {
	// BaseCurveIndex: This can be set to override the automatically determined topological base curve, which is usually the first section encountered.
	BaseCurveIndex int `json:"base_curve_index" yaml:"base_curve_index" schema:"base_curve_index"`
	// BezApproximateRational: Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs.  It may produce errors in other scenarios Over time, this field won't be necessary.
	BezApproximateRational bool `json:"bez_approximate_rational" yaml:"bez_approximate_rational" schema:"bez_approximate_rational,required"`
	// BodyType: Should this loft create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// SectionIds: The closed section curves to create a lofted solid from. Currently, these must be Solid2Ds
	SectionIds []UUID `json:"section_ids" yaml:"section_ids" schema:"section_ids,required"`
	// Tolerance: Tolerance
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// VDegree: Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction.
	VDegree int `json:"v_degree" yaml:"v_degree" schema:"v_degree,required"`
}

ModelingCmdFaces: Command for lofting sections to create a solid

type ModelingCmdFormat added in v0.2.27

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

ModelingCmdFormat: What kind of entities can be selected?

type ModelingCmdFovY added in v0.2.33

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

ModelingCmdFovY: Import CAD files to the current scene. Send a request containing binary file data as a MsgPack-encoded message in a WebSocket binary frame.

Note: These imports are non-editable. In the future we may expose a proprietary-to-KCL function to resolve this. The main intention today is to use imports as design references.

type ModelingCmdHollow added in v0.2.37

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

ModelingCmdHollow: Create a new annotation

type ModelingCmdInteraction added in v0.2.27

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

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

type ModelingCmdLabel added in v0.2.42

type ModelingCmdLabel struct {
	// BodyType: Should this sweep create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// OrientProfilePerpendicular: If true, before the sweep starts, the profile will be re-oriented so that it is perpendicular to the path being swept along. If false, the profile is left in its current orientation. Defaults to false.
	OrientProfilePerpendicular bool `json:"orient_profile_perpendicular" yaml:"orient_profile_perpendicular" schema:"orient_profile_perpendicular"`
	// ProjectedAxis: If orient_profile_perpendicular is true, the sketch shall be oriented such that the local Y axis of the sketch will be oriented to align with this element as much as possible. Defaults to +Z if not set
	ProjectedAxis any `json:"projected_axis" yaml:"projected_axis" schema:"projected_axis"`
	// RelativeTo: What is this sweep relative to? Deprecated; please use `translate_profile_to_path` and `orient_profile_perpendicular` instead.
	RelativeTo RelativeTo `json:"relative_to" yaml:"relative_to" schema:"relative_to"`
	// Sectional: If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components.
	Sectional bool `json:"sectional" yaml:"sectional" schema:"sectional,required"`
	// Target: Which sketch to sweep. 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"`
	// Trajectory: Path along which to sweep.
	Trajectory UUID `json:"trajectory" yaml:"trajectory" schema:"trajectory,required"`
	// TranslateProfileToPath: If true, the profile being swept will be moved to the path being swept along, before the sweep starts. If false, the profile stays where it is, and the sweep starts from there. Defaults to false.
	TranslateProfileToPath bool `json:"translate_profile_to_path" yaml:"translate_profile_to_path" schema:"translate_profile_to_path"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Version: What version of the sweeping algorithm to use. If None, or zero, the engine's default algorithm will be used
	Version int `json:"version" yaml:"version" schema:"version"`
}

ModelingCmdLabel: Extrude the object along a path.

type ModelingCmdLoft added in v0.2.38

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

ModelingCmdLoft: Get the plane for sketch mode.

type ModelingCmdMagnitude added in v0.2.27

type ModelingCmdMagnitude struct {
	// BoundingBoxOutputUnit: The output unit for the bounding box's dimensions.
	BoundingBoxOutputUnit UnitLength `json:"bounding_box_output_unit" yaml:"bounding_box_output_unit" schema:"bounding_box_output_unit,required"`
	// CenterOfMassOutputUnit: The output unit for center of mass.
	CenterOfMassOutputUnit UnitLength `json:"center_of_mass_output_unit" yaml:"center_of_mass_output_unit" schema:"center_of_mass_output_unit,required"`
	// DensityOutputUnit: The output unit for density.
	DensityOutputUnit UnitDensity `json:"density_output_unit" yaml:"density_output_unit" schema:"density_output_unit,required"`
	// EntityIds: IDs of the entities to query. If empty, query the default scene, as with the individual property commands.
	EntityIds []UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
	// MassOutputUnit: The output unit for mass.
	MassOutputUnit UnitMas `json:"mass_output_unit" yaml:"mass_output_unit" schema:"mass_output_unit,required"`
	// MaterialDensity: The material density used to calculate mass.
	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"`
	// MaterialMass: The material mass used to calculate density, independently of the calculated 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"`
	// SurfaceAreaOutputUnit: The output unit for surface area.
	SurfaceAreaOutputUnit UnitArea `json:"surface_area_output_unit" yaml:"surface_area_output_unit" schema:"surface_area_output_unit,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// VolumeOutputUnit: The output unit for volume.
	VolumeOutputUnit UnitVolume `json:"volume_output_unit" yaml:"volume_output_unit" schema:"volume_output_unit,required"`
}

ModelingCmdMagnitude: Get mass, density, volume, center of mass, surface area, and bounding box together. Equivalent to querying each property separately for the same entities, while allowing the engine to share the intermediate geometry used by the calculations.

type ModelingCmdMergeCoplanarFaces added in v0.2.43

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

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

type ModelingCmdModelingCmdAngle added in v0.2.33

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

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

type ModelingCmdModelingCmdAxis added in v0.2.33

type ModelingCmdModelingCmdAxis struct {
	// KclVersion: Which KCL version the following commands should be executed with.
	KclVersion KclVersion `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdAxis: Sets the KCL Version used by the engine.

type ModelingCmdModelingCmdBodyType added in v0.2.43

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

ModelingCmdModelingCmdBodyType: Send a mouse move event

type ModelingCmdModelingCmdCenter added in v0.2.33

type ModelingCmdModelingCmdCenter struct {
	// Bitrate: Video feed's constant bitrate (CBR)
	Bitrate int `json:"bitrate" yaml:"bitrate" schema:"bitrate"`
	// 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"`
}

ModelingCmdModelingCmdCenter: Reconfigure the stream.

type ModelingCmdModelingCmdDistance added in v0.2.42

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

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

type ModelingCmdModelingCmdEdgeID added in v0.2.34

type ModelingCmdModelingCmdEdgeID struct {
	// RegionID: Which region to search within
	RegionID UUID `json:"region_id" yaml:"region_id" schema:"region_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdEdgeID: Finds a suitable point inside the region for calling such that CreateRegionFromQueryPoint will generate an identical region.

type ModelingCmdModelingCmdEntityID added in v0.2.27

type ModelingCmdModelingCmdEntityID struct {
	// EnableRender: Should rendering occur, or not? If enabled, rendering will be low resolution until you call EndExecution.
	EnableRender bool `json:"enable_render" yaml:"enable_render" schema:"enable_render,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdEntityID: Tell the engine you're beginning execution, and will be sending many API calls shortly. The engine will render your geometry in reduced detail, to make execution faster. Call EndExecution to restore high quality once you're done sending commands.

type ModelingCmdModelingCmdEntityIds added in v0.2.40

type ModelingCmdModelingCmdEntityIds struct {
	// CameraMovement: Dictates whether or not the camera position should be adjusted during this operation If no movement is requested, the camera will orbit around the new center from its current position
	CameraMovement CameraMovement `json:"camera_movement" yaml:"camera_movement" schema:"camera_movement"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdEntityIds: Updates the camera to center to the center of the current scene's bounds

type ModelingCmdModelingCmdExtrudeMethod added in v0.2.42

type ModelingCmdModelingCmdExtrudeMethod struct {
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// View: Camera view state
	View CameraViewState `json:"view" yaml:"view" schema:"view,required"`
}

ModelingCmdModelingCmdExtrudeMethod: Sets the default camera's view state

type ModelingCmdModelingCmdFaces added in v0.2.42

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

ModelingCmdModelingCmdFaces: What is this entity's child index within its parent

type ModelingCmdModelingCmdFormat added in v0.2.40

type ModelingCmdModelingCmdFormat struct {
	// Animated: Whether or not to animate the camera movement.
	Animated bool `json:"animated" yaml:"animated" schema:"animated"`
	// ObjectIds: Which objects to fit camera to; if empty, fit to all non-default objects. Defaults to empty vector.
	ObjectIds []UUID `json:"object_ids" yaml:"object_ids" schema:"object_ids"`
	// Padding: How much to pad the view frame by, as a fraction of the object(s) bounding box size. Negative padding will crop the view of the object proportionally. e.g. padding = 0.2 means the view will span 120% of the object(s) bounding box, and padding = -0.2 means the view will span 80% of the object(s) bounding box.
	Padding float64 `json:"padding" yaml:"padding" schema:"padding"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdModelingCmdFormat: Fit the view to the specified object(s).

type ModelingCmdModelingCmdInteraction added in v0.2.27

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

ModelingCmdModelingCmdInteraction: Add a gizmo showing the axes.

type ModelingCmdModelingCmdObjectID added in v0.2.43

type ModelingCmdModelingCmdObjectID struct {
	// CutType: The cut type and information required to perform the cut.
	CutType any `json:"cut_type" yaml:"cut_type" schema:"cut_type,required"`
	// EdgesReferences: A struct containing the information required to reference an edge.
	EdgesReferences []EdgeSpecifier `json:"edges_references" yaml:"edges_references" schema:"edges_references"`
	// ExtraFaceIds: What IDs should the resulting faces have? If you've only passed one edge ID, its ID will be the command ID used to send this command, and this field should be empty. If you've passed `n` IDs (to cut `n` edges), then this should be length `n-1`, and the first edge will use the command ID used to send this command.
	ExtraFaceIds []UUID `json:"extra_face_ids" yaml:"extra_face_ids" schema:"extra_face_ids"`
	// ObjectID: Which object is being cut.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Strategy: Which cutting algorithm to use.
	Strategy CutStrategy `json:"strategy" yaml:"strategy" schema:"strategy"`
	// TangentChain: If true, also cut edges that are tangent to the selected edges.
	TangentChain bool `json:"tangent_chain" yaml:"tangent_chain" schema:"tangent_chain"`
	// Tolerance: The maximum acceptable surface gap computed between the cut 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"`
	// UseLegacy: If true, use the legacy CSG algorithm.
	UseLegacy bool `json:"use_legacy" yaml:"use_legacy" schema:"use_legacy"`
	// Version: Which version of the edge cut algorithm to use.
	Version EdgeCutVersion `json:"version" yaml:"version" schema:"version"`
}

ModelingCmdModelingCmdObjectID: Cut the list of edge references with the given cut parameters

type ModelingCmdModelingCmdOpposite added in v0.2.41

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

ModelingCmdModelingCmdOpposite: Send object to front or back.

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"`
	// BodyType: Should this extrude create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// Opposite: Should the revolution also revolve in the opposite direction along the given axis? If so, this specifies its angle.
	Opposite string `json:"opposite" yaml:"opposite" schema:"opposite"`
	// 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 {
	// 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"`
}

ModelingCmdModelingCmdSequence: Set the units of the scene. For all following commands, the units will be interpreted as the given units. Any previously executed commands will not be affected or have their units changed. They will remain in the units they were originally executed in. If not set, engine units default to mm.

type ModelingCmdModelingCmdTarget added in v0.2.27

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

ModelingCmdModelingCmdTarget: Set opacity of the entity.

type ModelingCmdModelingCmdTargetReference added in v0.2.44

type ModelingCmdModelingCmdTargetReference struct {
	// EntityIds: IDs of the entities to be 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"`
}

ModelingCmdModelingCmdTargetReference: Export a sketch to a file.

type ModelingCmdModelingCmdTolerance added in v0.2.33

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

ModelingCmdModelingCmdTolerance: 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 ModelingCmdModelingCmdUp added in v0.2.33

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

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

type ModelingCmdModelingCmdVantage added in v0.2.33

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

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

type ModelingCmdModelingCmdWindow added in v0.2.27

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

ModelingCmdModelingCmdWindow: Obtain curve ids for vertex ids

type ModelingCmdMovePathPen added in v0.2.18

type ModelingCmdMovePathPen struct {
	// AngleStepSize: Angle step interval (converted to whole number degrees and bounded between 4° and 90°)
	AngleStepSize Angle `json:"angle_step_size" yaml:"angle_step_size" schema:"angle_step_size"`
	// BodyType: Should this extrude create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// Center2D: Center to twist about (relative to plane's origin) Defaults to `[0, 0]` i.e. the plane's origin
	Center2D Point2D `json:"center_2d" yaml:"center_2d" schema:"center_2d"`
	// Distance: How far off the plane to extrude
	Distance float64 `json:"distance" yaml:"distance" schema:"distance,required"`
	// Faces: Which IDs should the new faces have? If this isn't given, the engine will generate IDs.
	Faces ExtrudedFaceInfo `json:"faces" yaml:"faces" schema:"faces"`
	// Target: Which sketch to extrude. Must be a closed 2D solid.
	Target UUID `json:"target" yaml:"target" schema:"target,required"`
	// Tolerance: The twisted surface loft tolerance
	Tolerance float64 `json:"tolerance" yaml:"tolerance" schema:"tolerance,required"`
	// TotalRotationAngle: Total rotation of the section
	TotalRotationAngle Angle `json:"total_rotation_angle" yaml:"total_rotation_angle" schema:"total_rotation_angle,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdMovePathPen: Command for twist extruding a solid 2d.

type ModelingCmdObjectID added in v0.2.34

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

ModelingCmdObjectID: Update an annotation

type ModelingCmdObjectIds added in v0.2.43

type ModelingCmdObjectIds struct {
	// Name: Name of the object. Using a zero-length name unsets the name.
	Name string `json:"name" yaml:"name" schema:"name"`
	// 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"`
}

ModelingCmdObjectIds: Set the name of an object

type ModelingCmdOpposite added in v0.2.41

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

ModelingCmdOpposite: Camera drag started.

type ModelingCmdOrientProfilePerpendicular added in v0.2.44

type ModelingCmdOrientProfilePerpendicular struct {
	// EdgeID: ID of the edge being queried.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdOrientProfilePerpendicular: What is the length of this edge?

type ModelingCmdOrigin added in v0.2.22

type ModelingCmdOrigin struct {
	// Entities: Which entities to unselect
	Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdOrigin: Removes one or more entities (by UUID) from the selection.

type ModelingCmdPath added in v0.2.27

type ModelingCmdPath struct {
	// BodyType: Should this extrude create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// Direction: What direction to extrude in. If None, the engine will extrude in the direction normal of the target's plane. Legacy field; if `direction_reference` is provided, the reference takes precedence.
	Direction any `json:"direction" yaml:"direction" schema:"direction"`
	// DirectionReference: Edge specifier identifying the edge direction to use. If provided, this takes precedence over `direction`.
	DirectionReference EdgeSpecifier `json:"direction_reference" yaml:"direction_reference" schema:"direction_reference"`
	// Distance: How far off the plane to extrude This distance is relative to the target's plane, not an absolute coordinate. Symmetric extrusions will extrude outwards from both sides of the sketch to the length specified.
	Distance float64 `json:"distance" yaml:"distance" schema:"distance,required"`
	// DraftAngle: What draft angle should be used in this extrusion? Negative values indicate an outward draft, while positive values indicate an inward draft
	DraftAngle Angle `json:"draft_angle" yaml:"draft_angle" schema:"draft_angle"`
	// ExtrudeMethod: Should the extrusion create a new object or be part of the existing object.
	ExtrudeMethod ExtrudeMethod `json:"extrude_method" yaml:"extrude_method" schema:"extrude_method"`
	// Faces: Which IDs should the new faces have? If this isn't given, the engine will generate IDs.
	Faces ExtrudedFaceInfo `json:"faces" yaml:"faces" schema:"faces"`
	// MergeCoplanarFaces: Only used if the extrusion is created from a face and extrude_method = Merge If true, coplanar faces will be merged and seams will be hidden. Otherwise, seams between the extrusion and original body will be shown.
	MergeCoplanarFaces bool `json:"merge_coplanar_faces" yaml:"merge_coplanar_faces" schema:"merge_coplanar_faces"`
	// Opposite: Should the extrusion also extrude in the opposite direction? If so, this specifies its distance.
	Opposite string `json:"opposite" yaml:"opposite" schema:"opposite"`
	// Target: Which sketch to extrude (legacy API). Must be a closed 2D solid. If `target_reference` is provided, the reference takes precedence.
	Target UUID `json:"target" yaml:"target" schema:"target"`
	// TargetReference: Edge specifier identifying the edge to extrude. If provided, this takes precedence over `target`.
	TargetReference EdgeSpecifier `json:"target_reference" yaml:"target_reference" schema:"target_reference"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdPath: Command for extruding a solid 2d.

type ModelingCmdPathID added in v0.2.22

type ModelingCmdPathID 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"`
	// PlanarNormal: If provided, ensures that the normal of the sketch plane must be aligned with this supplied normal (otherwise the camera position will be used to infer the normal to point towards the viewer)
	PlanarNormal Point3D `json:"planar_normal" yaml:"planar_normal" schema:"planar_normal"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

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

type ModelingCmdPathJson added in v0.2.38

type ModelingCmdPathJson struct {
	// PathJson: The path in json form (the serialized result of the kcl Sketch/Path object
	PathJson string `json:"path_json" yaml:"path_json" schema:"path_json,required"`
	// T: The evaluation parameter (path curve parameter in the normalized domain [0, 1])
	T float64 `json:"t" yaml:"t" schema:"t,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdPathJson: Evaluates the position of a path in one shot (engine utility for kcl executor)

type ModelingCmdProjectedAxis added in v0.2.44

type ModelingCmdProjectedAxis struct {
	// EntityID: ID of the entity being cloned.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdProjectedAxis: Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.

type ModelingCmdReference added in v0.2.42

type ModelingCmdReference 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"`
	// 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"`
	// ZNear: The distance to the near clipping plane.
	ZNear float64 `json:"z_near" yaml:"z_near" schema:"z_near"`
}

ModelingCmdReference: Change what the default camera is looking at.

type ModelingCmdRelativeTo added in v0.2.41

type ModelingCmdRelativeTo struct {
	// EntityID: ID of the entity being copied.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
	// Transform: How to transform each repeated solid. The 0th transform will create the first copy of the entity. The total number of (optional) repetitions equals the size of this list.
	Transform []Transform `json:"transform" yaml:"transform" schema:"transform"`
	// Transforms: Alternatively, you could set this key instead. If you want to use multiple transforms per item. If this is non-empty then the `transform` key must be empty, and vice-versa.
	Transforms [][]Transform `json:"transforms" yaml:"transforms" schema:"transforms"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdRelativeTo: Create a pattern using this entity by specifying the transform for each desired repetition. Transformations are performed in the following order (first applied to last applied): scale, rotate, translate.

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 ModelingCmdRevolve added in v0.2.33

type ModelingCmdRevolve struct {
	// SelectedAtWindow: Coordinates of the window being clicked
	SelectedAtWindow Point2D `json:"selected_at_window" yaml:"selected_at_window" schema:"selected_at_window,required"`
	// Sequence: Logical timestamp. The client should increment this with every event in the current mouse drag. That way, if the events are being sent over an unordered channel, the API can ignore the older events.
	Sequence int `json:"sequence" yaml:"sequence" schema:"sequence"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdRevolve: Changes the current highlighted entity to whichever one is at the given window coordinate. If there's no entity at this location, clears the highlight.

type ModelingCmdRevolveAboutEdge added in v0.2.33

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

ModelingCmdRevolveAboutEdge: Make a new plane

type ModelingCmdSectionIds added in v0.2.38

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

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

type ModelingCmdSectional added in v0.2.40

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

ModelingCmdSectional: Create a linear pattern using this entity.

type ModelingCmdSegment added in v0.2.22

type ModelingCmdSegment struct {
	// FaceIds: Which faces to remove, leaving only the shell.
	FaceIds []UUID `json:"face_ids" yaml:"face_ids" schema:"face_ids,required"`
	// Hollow: If true, the Solid3D is made hollow instead of removing the selected faces
	Hollow bool `json:"hollow" yaml:"hollow" schema:"hollow"`
	// ObjectID: Which Solid3D is being shelled.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// ShellThickness: How thick the shell should be. Smaller values mean a thinner shell.
	ShellThickness float64 `json:"shell_thickness" yaml:"shell_thickness" schema:"shell_thickness,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdSegment: Command for shelling a solid3d face

type ModelingCmdSequence added in v0.2.22

type ModelingCmdSequence struct {
	// EntityID: Which entity to project (vertex or edge). Legacy; if both `entity_id` and `entity_reference` are provided, `entity_reference` takes precedence.
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id"`
	// EntityReference: Entity reference (e.g. edge by side_faces, vertex, face) to project. If both `entity_id` and `entity_reference` are provided, `entity_reference` takes precedence.
	EntityReference any `json:"entity_reference" yaml:"entity_reference" schema:"entity_reference"`
	// PlaneID: Which plane to project the entity onto.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// UsePlaneCoords: If true: the projected points are returned in the plane_id's coordinate system, else: the projected points are returned in the world coordinate system.
	UsePlaneCoords bool `json:"use_plane_coords" yaml:"use_plane_coords" schema:"use_plane_coords,required"`
}

ModelingCmdSequence: Project an entity on to a plane.

type ModelingCmdShellThickness added in v0.2.34

type ModelingCmdShellThickness struct {
	// Hidden: Whether or not the edge lines should be hidden.
	Hidden bool `json:"hidden" yaml:"hidden" schema:"hidden,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdShellThickness: Changes visibility of scene-wide edge lines on brep solids

type ModelingCmdSolid3DgetBodyType added in v0.2.43

type ModelingCmdSolid3DgetBodyType struct {
	// CutType: The cut type and information required to perform the cut.
	CutType any `json:"cut_type" yaml:"cut_type" schema:"cut_type,required"`
	// EdgeIds: Which edges you want to cut.
	EdgeIds []UUID `json:"edge_ids" yaml:"edge_ids" schema:"edge_ids"`
	// ExtraFaceIds: What IDs should the resulting faces have? If you've only passed one edge ID, its ID will be the command ID used to send this command, and this field should be empty. If you've passed `n` IDs (to cut `n` edges), then this should be length `n-1`, and the first edge will use the command ID used to send this command.
	ExtraFaceIds []UUID `json:"extra_face_ids" yaml:"extra_face_ids" schema:"extra_face_ids"`
	// ObjectID: Which object is being cut.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Strategy: Which cutting algorithm to use.
	Strategy CutStrategy `json:"strategy" yaml:"strategy" schema:"strategy"`
	// TangentChain: If true, also cut edges that are tangent to the selected edges.
	TangentChain bool `json:"tangent_chain" yaml:"tangent_chain" schema:"tangent_chain"`
	// Tolerance: The maximum acceptable surface gap computed between the cut 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"`
	// UseLegacy: If true, use the legacy CSG algorithm.
	UseLegacy bool `json:"use_legacy" yaml:"use_legacy" schema:"use_legacy"`
	// Version: Which version of the edge cut algorithm to use.
	Version EdgeCutVersion `json:"version" yaml:"version" schema:"version"`
}

ModelingCmdSolid3DgetBodyType: Cut the list of given edges with the given cut parameters.

type ModelingCmdSolid3DgetEdgeUuid added in v0.2.43

type ModelingCmdSolid3DgetEdgeUuid struct {
	// EdgeID: Which edge you want the next edge 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"`
}

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

type ModelingCmdSolid3DgetFaceUuid added in v0.2.43

type ModelingCmdSolid3DgetFaceUuid struct {
	// CutType: How to apply the cut.
	CutType CutType `json:"cut_type" yaml:"cut_type" schema:"cut_type"`
	// EdgeID: Which edge you want to fillet.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id"`
	// EdgeIds: Which edges you want to fillet.
	EdgeIds []UUID `json:"edge_ids" yaml:"edge_ids" schema:"edge_ids"`
	// EdgesReferences: A struct containing the information required to reference an edge.
	EdgesReferences []EdgeSpecifier `json:"edges_references" yaml:"edges_references" schema:"edges_references"`
	// ExtraFaceIds: What IDs should the resulting faces have? If you've only passed one edge ID, its ID will be the command ID used to send this command, and this field should be empty. If you've passed `n` IDs (to fillet `n` edges), then this should be length `n-1`, and the first edge will use the command ID used to send this command.
	ExtraFaceIds []UUID `json:"extra_face_ids" yaml:"extra_face_ids" schema:"extra_face_ids"`
	// 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"`
	// Strategy: Which cutting algorithm to use.
	Strategy CutStrategy `json:"strategy" yaml:"strategy" schema:"strategy"`
	// 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"`
	// UseLegacy: If true, use the legacy CSG algorithm.
	UseLegacy bool `json:"use_legacy" yaml:"use_legacy" schema:"use_legacy"`
	// Version: Which version of the edge cut algorithm to use.
	Version EdgeCutVersion `json:"version" yaml:"version" schema:"version"`
}

ModelingCmdSolid3DgetFaceUuid: Fillets the given edge with the specified radius.

type ModelingCmdSolid3Djoin added in v0.2.43

type ModelingCmdSolid3Djoin struct {
	// AmbientOcclusion: Ambient Occlusion of the new material
	AmbientOcclusion float64 `json:"ambient_occlusion" yaml:"ambient_occlusion" schema:"ambient_occlusion,required"`
	// BackfaceColor: Color of the backface
	BackfaceColor Color `json:"backface_color" yaml:"backface_color" schema:"backface_color"`
	// Color: Color of the new material
	Color Color `json:"color" yaml:"color" schema:"color,required"`
	// Metalness: Metalness of the new material
	Metalness float64 `json:"metalness" yaml:"metalness" schema:"metalness,required"`
	// ObjectID: Which object to change
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
	// Roughness: Roughness of the new material
	Roughness float64 `json:"roughness" yaml:"roughness" schema:"roughness,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdSolid3Djoin: Set the material properties of an object

type ModelingCmdSolid3DmultiJoin added in v0.2.43

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

ModelingCmdSolid3DmultiJoin: Gets all faces which use the given edge.

type ModelingCmdSolid3DshellFace added in v0.2.34

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

ModelingCmdSolid3DshellFace: Hide or show an object

type ModelingCmdStartPath added in v0.2.22

type ModelingCmdStartPath struct {
	// Label: Optional label to associate with the new path segment.
	Label string `json:"label" yaml:"label" schema:"label"`
	// 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"`
}

ModelingCmdStartPath: 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 ModelingCmdSurfaceBlend added in v0.2.43

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

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

type ModelingCmdSurfaces added in v0.2.43

type ModelingCmdSurfaces struct {
	// FaceID: Which face you want to flip.
	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"`
}

ModelingCmdSurfaces: Flips (reverses) a face. If the solid3d body type is "Solid", then body type will become non-manifold ("Surface").

type ModelingCmdSweep added in v0.2.40

type ModelingCmdSweep struct {
	// Across: What to mirror across
	Across any `json:"across" yaml:"across" schema:"across,required"`
	// Ids: ID of the mirror entities.
	Ids []UUID `json:"ids" yaml:"ids" schema:"ids,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdSweep: Mirror the input entities over the specified axis, edge, or plane.

type ModelingCmdT added in v0.2.38

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

ModelingCmdT: 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"`
	// 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"`
}

ModelingCmdTarget: Camera drag continued.

type ModelingCmdTargetReference added in v0.2.44

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

ModelingCmdTargetReference: Camera drag ended

type ModelingCmdTo added in v0.2.22

type ModelingCmdTo struct {
	// BodyType: Should this extrude create a solid body or a surface?
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type"`
	// ExtrudeMethod: Should the extrusion create a new object or be part of the existing object.
	ExtrudeMethod ExtrudeMethod `json:"extrude_method" yaml:"extrude_method" schema:"extrude_method"`
	// Faces: Which IDs should the new faces have? If this isn't given, the engine will generate IDs.
	Faces ExtrudedFaceInfo `json:"faces" yaml:"faces" schema:"faces"`
	// Reference: Reference to extrude to. Extrusion occurs along the target's normal until it is as close to the reference as possible.
	Reference any `json:"reference" yaml:"reference" schema:"reference,required"`
	// Target: Which sketch or edge to extrude (legacy API).
	//
	// Must be a closed 2D solid, or an edge for surface extrusions. Either `target` or `target_reference` must be provided.
	Target UUID `json:"target" yaml:"target" schema:"target"`
	// TargetReference: Edge specifier identifying the source edge to extrude. If provided, this takes precedence over `target`.
	TargetReference EdgeSpecifier `json:"target_reference" yaml:"target_reference" schema:"target_reference"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTo: Command for extruding a solid 2d to a reference geometry.

type ModelingCmdTolerance added in v0.2.33

type ModelingCmdTolerance struct {
	// ChildEntityIds: ID of the entity's child being deleted
	ChildEntityIds []UUID `json:"child_entity_ids" yaml:"child_entity_ids" schema:"child_entity_ids,required"`
	// EntityID: ID of the entity being modified
	EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTolerance: Attempts to delete children entity from an entity. Note that this API may change the body type of certain entities from Solid to Surface.

type ModelingCmdTotalRotationAngle added in v0.2.42

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

ModelingCmdTotalRotationAngle: What are all UUIDs of this entity's children?

type ModelingCmdTrajectory added in v0.2.40

type ModelingCmdTrajectory struct {
	// Axis: Axis of the helix. The helix will be created around and in the direction of this axis.
	Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
	// Center: Center of the helix at the base of the helix.
	Center Point3D `json:"center" yaml:"center" schema:"center,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"`
	// Radius: Radius of the helix.
	Radius float64 `json:"radius" yaml:"radius" schema:"radius,required"`
	// Revolutions: Number of revolutions.
	Revolutions float64 `json:"revolutions" yaml:"revolutions" schema:"revolutions,required"`
	// StartAngle: Start angle.
	StartAngle Angle `json:"start_angle" yaml:"start_angle" schema:"start_angle"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTrajectory: Create a helix using the specified parameters.

type ModelingCmdTransform added in v0.2.34

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

ModelingCmdTransform: Tell the engine you're finished execution, and it should resume rendering at high resolution.

type ModelingCmdTransforms added in v0.2.40

type ModelingCmdTransforms struct {
	// ClosestTo: Find the edge closest to this point. Assumed to be in absolute coordinates, relative to global (scene) origin.
	ClosestTo Point3D `json:"closest_to" yaml:"closest_to" schema:"closest_to,required"`
	// ObjectID: The body whose edges are being queried. If not given, will search all bodies in the scene.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTransforms: Returns the closest edge to this point.

type ModelingCmdTranslateProfileToPath added in v0.2.44

type ModelingCmdTranslateProfileToPath struct {
	// EdgeID: Edge ID about which to make the helix (legacy API, for backwards compatibility). If both `edge_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id"`
	// EdgeReference: Edge reference about which to make the helix (new API). If both `edge_id` and `edge_reference` are provided, `edge_reference` takes precedence.
	EdgeReference EdgeSpecifier `json:"edge_reference" yaml:"edge_reference" schema:"edge_reference"`
	// IsClockwise: Is the helix rotation clockwise?
	IsClockwise bool `json:"is_clockwise" yaml:"is_clockwise" schema:"is_clockwise,required"`
	// Length: Length of the helix. If None, the length of the edge will be used instead.
	Length float64 `json:"length" yaml:"length" schema:"length"`
	// Radius: Radius of the helix.
	Radius float64 `json:"radius" yaml:"radius" schema:"radius,required"`
	// Revolutions: Number of revolutions.
	Revolutions float64 `json:"revolutions" yaml:"revolutions" schema:"revolutions,required"`
	// StartAngle: Start angle.
	StartAngle Angle `json:"start_angle" yaml:"start_angle" schema:"start_angle"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdTranslateProfileToPath: Create a helix using the specified parameters.

type ModelingCmdTwistExtrude added in v0.2.42

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

ModelingCmdTwistExtrude: What are all UUIDs of all the paths sketched on top of this entity?

type ModelingCmdUp added in v0.2.22

type ModelingCmdUp struct {
	// PlaneID: The plane you're intersecting against.
	PlaneID UUID `json:"plane_id" yaml:"plane_id" schema:"plane_id,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
	// Window: Window coordinates where the ray cast should be aimed.
	Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}

ModelingCmdUp: Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.

type ModelingCmdVantage added in v0.2.22

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

ModelingCmdVantage: Find the start and end of a curve.

type ModelingCmdVdegree added in v0.2.38

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

ModelingCmdVdegree: Get the plane for sketch mode.

type ModelingCmdVersion added in v0.2.43

type ModelingCmdVersion struct {
	// Axis: Axis to use as mirror.
	Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
	// Ids: ID of the mirror entities.
	Ids []UUID `json:"ids" yaml:"ids" schema:"ids,required"`
	// Point: Point through which the mirror axis passes.
	Point Point3D `json:"point" yaml:"point" schema:"point,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ModelingCmdVersion: Mirror the input entities over the specified axis. Deprecated; please use `EntityMirrorAcross`

type ModelingCmdView added in v0.2.40

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

ModelingCmdView: Start dragging the mouse.

type ModelingCmdWindow added in v0.2.27

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

ModelingCmdWindow: Get type of the given curve.

type ModelingCmdZfar added in v0.2.33

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

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

type ModelingCmdZnear added in v0.2.33

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

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

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(videoResWidth int, videoResHeight int, fps int, unlockedFramerate bool, postEffect PostEffectType, webrtc bool, geometryOnly bool, pool string, showGrid bool, replay string, apicallId string, orderIndependentTransparency bool, kclVersion KclVersion, pr int, body any) (*websocket.Conn, error)

CommandsWs: Opens a WebSocket to a Zoo KittyCAD engine instance. **Note**: Currently it's recommended to set `webrtc=true` in the WebSocket query string, otherwise some features, such as opacity setting, will cause the engine to fail.

Due to the long-lived nature of the instances, it's possible the resources on have been used and not freed entirely, or the instance is in a bad state. Thus it's good practice to expect to have to potentially reconnect at any moment -even almost immediately after the first connection!

Authorization happens via a pseudo HTTP header over the WebSocket: `{ type: "headers", headers: { "Authorization": "Bearer xxxxxxxxx" }}`

The very next thing recommended is to setup a ping-pong interval. The current timeout is 10s and has no documented guarantee, so use a conservative number below that. 5s should be sufficient. A ping-pong interval is sending `{ type: 'ping" }` when `{ request_id, success, resp: { type: "pong", data: {} } }` message is received.

You're ready to start sending modeling commands!

If you want to understand how to connect to the WebRTC video stream, https://github.com/KittyCAD/kittycad.ts/blob/main/src/webrtc.ts is a nice example to learn from.

Parameters

  • `videoResWidth`
  • `videoResHeight`
  • `fps`
  • `unlockedFramerate`
  • `postEffect`: Post effect type
  • `webrtc`
  • `geometryOnly`
  • `pool`
  • `showGrid`
  • `replay`
  • `apicallId`
  • `orderIndependentTransparency`
  • `kclVersion`: Which KCL versions does Zoo support?
  • `pr`
  • `body`: The websocket messages the server receives.
Example

CommandsWs: Opens a WebSocket to a Zoo KittyCAD engine instance. **Note**: Currently it's recommended to set `webrtc=true` in the WebSocket query string, otherwise some features, such as opacity setting, will cause the engine to fail.

Due to the long-lived nature of the instances, it's possible the resources on have been used and not freed entirely, or the instance is in a bad state. Thus it's good practice to expect to have to potentially reconnect at any moment -even almost immediately after the first connection!

Authorization happens via a pseudo HTTP header over the WebSocket: `{ type: "headers", headers: { "Authorization": "Bearer xxxxxxxxx" }}`

The very next thing recommended is to setup a ping-pong interval. The current timeout is 10s and has no documented guarantee, so use a conservative number below that. 5s should be sufficient. A ping-pong interval is sending `{ type: 'ping" }` when `{ request_id, success, resp: { type: "pong", data: {} } }` message is received.

You're ready to start sending modeling commands!

If you want to understand how to connect to the WebRTC video stream, https://github.com/KittyCAD/kittycad.ts/blob/main/src/webrtc.ts is a nice example to learn from.

Parameters

  • `videoResWidth`
  • `videoResHeight`
  • `fps`
  • `unlockedFramerate`
  • `postEffect`: Post effect type
  • `webrtc`
  • `geometryOnly`
  • `pool`
  • `showGrid`
  • `replay`
  • `apicallId`
  • `orderIndependentTransparency`
  • `kclVersion`: Which KCL versions does Zoo support?
  • `pr`
  • `body`: The websocket messages the server receives.
package main

import (
	"log"
	"os"
	"os/signal"
	"time"

	"github.com/gorilla/websocket"
	"github.com/kittycad/kittycad.go"
)

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

	// Create the websocket connection.
	ws, err := client.Modeling.CommandsWs(123, 123, 123, true, kittycad.PostEffectTypePhosphor, true, true, "some-string", true, "some-string", "some-string", true, "", 123, "")
	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
		}
	}

}

type ModelingSessionData added in v0.2.38

type ModelingSessionData struct {
	// APICallID: ID of the API call this modeling session is using. Useful for tracing and debugging.
	APICallID string `json:"api_call_id" yaml:"api_call_id" schema:"api_call_id,required"`
}

ModelingSessionData: Successful Websocket response.

type ModesResponse added in v0.2.44

type ModesResponse struct {
	// DefaultMode: Default mode identifier used when no mode is requested.
	DefaultMode string `json:"default_mode" yaml:"default_mode" schema:"default_mode,required"`
	// Modes: Available modes in configuration order.
	Modes []MlCopilotModeOption `json:"modes" yaml:"modes" schema:"modes,required"`
}

ModesResponse is the type definition for a ModesResponse.

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 MouseMove added in v0.2.38

type MouseMove struct {
}

MouseMove: The response from the `MouseMove` endpoint.

type MovePathPen added in v0.2.18

type MovePathPen struct {
}

MovePathPen: The response from the `MovePathPen` endpoint.

type MultipartForm added in v0.2.43

type MultipartForm struct {
	// contains filtered or unexported fields
}

MultipartForm builds multipart/form-data request bodies for generated endpoints.

func NewMultipartForm added in v0.2.43

func NewMultipartForm() *MultipartForm

NewMultipartForm creates a new multipart/form-data body.

func (*MultipartForm) Close added in v0.2.43

func (f *MultipartForm) Close() error

Close finalizes the multipart body.

func (*MultipartForm) ContentType added in v0.2.43

func (f *MultipartForm) ContentType() string

ContentType returns the multipart/form-data content type with boundary.

func (*MultipartForm) WriteFile added in v0.2.43

func (f *MultipartForm) WriteFile(field, filename string, body []byte) error

WriteFile adds a binary file part to the multipart body.

func (*MultipartForm) WriteFilePart added in v0.2.43

func (f *MultipartForm) WriteFilePart(field, filename, contentType string, body []byte) error

WriteFilePart adds a file part with a custom content type.

func (*MultipartForm) WriteJSONField added in v0.2.43

func (f *MultipartForm) WriteJSONField(field string, value any) error

WriteJSONField adds a JSON field to the multipart body.

type NewAnnotation added in v0.2.38

type NewAnnotation struct {
}

NewAnnotation: The response from the `NewAnnotation` endpoint.

type NormalizedPos added in v0.2.44

type NormalizedPos struct {
	// Pos: The position
	Pos Point2D `json:"pos" yaml:"pos" schema:"pos,required"`
}

NormalizedPos is the type definition for a NormalizedPos.

type Oauth2AppClientType added in v0.2.43

type Oauth2AppClientType string

Oauth2AppClientType: The type of an OAuth 2.0 client.

const (
	// Oauth2AppClientTypePublic: A public client.
	Oauth2AppClientTypePublic Oauth2AppClientType = "public"
	// Oauth2AppClientTypeConfidential: A confidential client.
	Oauth2AppClientTypeConfidential Oauth2AppClientType = "confidential"
)

type Oauth2AppGrantType added in v0.2.43

type Oauth2AppGrantType string

Oauth2AppGrantType: An OAuth 2.0 grant type allowed for an app.

const (
	// Oauth2AppGrantTypeDeviceCode: OAuth 2.0 Device Authorization Grant.
	Oauth2AppGrantTypeDeviceCode Oauth2AppGrantType = "device_code"
	// Oauth2AppGrantTypeAuthorizationCode: OAuth 2.0 Authorization Code Grant.
	Oauth2AppGrantTypeAuthorizationCode Oauth2AppGrantType = "authorization_code"
	// Oauth2AppGrantTypeRefreshToken: OAuth 2.0 Refresh Token Grant.
	Oauth2AppGrantTypeRefreshToken Oauth2AppGrantType = "refresh_token"
	// Oauth2AppGrantTypeClientCredentials: OAuth 2.0 Client Credentials Grant.
	Oauth2AppGrantTypeClientCredentials Oauth2AppGrantType = "client_credentials"
)

type Oauth2AppMode added in v0.2.44

type Oauth2AppMode string

Oauth2AppMode: The deployment mode for an OAuth 2.0 app.

const (
	// Oauth2AppModeDevelopment: Development mode permits HTTPS redirect URIs and local HTTP redirect URIs. Only the app owner, or an org admin for organization apps, can authorize development apps.
	Oauth2AppModeDevelopment Oauth2AppMode = "development"
	// Oauth2AppModeProduction: Production mode only permits secure non-local redirect URIs.
	Oauth2AppModeProduction Oauth2AppMode = "production"
)

type Oauth2AppResponse added in v0.2.43

type Oauth2AppResponse struct {
	// ClientID: The OAuth 2.0 client identifier.
	ClientID UUID `json:"client_id" yaml:"client_id" schema:"client_id,required"`
	// ClientType: The client type.
	ClientType Oauth2AppClientType `json:"client_type" yaml:"client_type" schema:"client_type,required"`
	// CreatedAt: When the app record was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// FirstParty: Whether this app is first-party.
	FirstParty bool `json:"first_party" yaml:"first_party" schema:"first_party,required"`
	// GrantTypes: The OAuth grant types this app can use.
	GrantTypes []Oauth2AppGrantType `json:"grant_types" yaml:"grant_types" schema:"grant_types,required"`
	// IsActive: Whether this app is active.
	IsActive bool `json:"is_active" yaml:"is_active" schema:"is_active,required"`
	// Mode: The deployment mode for this app.
	Mode Oauth2AppMode `json:"mode" yaml:"mode" schema:"mode,required"`
	// Name: The display name of the app.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// RedirectUris: The registered redirect URIs for this app.
	RedirectUris []URL `json:"redirect_uris" yaml:"redirect_uris" schema:"redirect_uris,required"`
	// UpdatedAt: When the app record was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

Oauth2AppResponse: API response for a managed OAuth app.

type Oauth2AppResponseResultsPage added in v0.2.43

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

Oauth2AppResponseResultsPage: A single page of results

type Oauth2AuthorizationDecisionResponse added in v0.2.44

type Oauth2AuthorizationDecisionResponse struct {
	// RedirectUrl: The URL the user agent should navigate to after the decision.
	RedirectUrl string `json:"redirect_url" yaml:"redirect_url" schema:"redirect_url,required"`
}

Oauth2AuthorizationDecisionResponse: Result of approving or denying an OAuth authorization request.

type Oauth2AuthorizationRequestResponse added in v0.2.44

type Oauth2AuthorizationRequestResponse struct {
	// AppName: The OAuth app display name.
	AppName string `json:"app_name" yaml:"app_name" schema:"app_name,required"`
	// ExpiresAt: When this authorization request expires.
	ExpiresAt Time `json:"expires_at" yaml:"expires_at" schema:"expires_at,required"`
	// OwnerName: The OAuth app owner display name, if available.
	OwnerName string `json:"owner_name" yaml:"owner_name" schema:"owner_name"`
	// RedirectUri: The redirect URI that will receive the authorization result.
	RedirectUri URL `json:"redirect_uri" yaml:"redirect_uri" schema:"redirect_uri,required"`
	// RequestID: The pending authorization request ID.
	RequestID UUID `json:"request_id" yaml:"request_id" schema:"request_id,required"`
	// Scopes: The scopes requested by the app.
	Scopes []Oauth2Scope `json:"scopes" yaml:"scopes" schema:"scopes,required"`
}

Oauth2AuthorizationRequestResponse: Details rendered by the OAuth consent page.

type Oauth2AuthorizationResponseType added in v0.2.43

type Oauth2AuthorizationResponseType string

Oauth2AuthorizationResponseType: The OAuth 2.0 authorization response type.

const (
	// Oauth2AuthorizationResponseTypeCode: The authorization code response type.
	Oauth2AuthorizationResponseTypeCode Oauth2AuthorizationResponseType = "code"
)

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"`
	// OidcNonce: Nonce required for OIDC flows.
	OidcNonce string `json:"oidc_nonce" yaml:"oidc_nonce" schema:"oidc_nonce"`
	// 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 Oauth2CodeChallengeMethod added in v0.2.43

type Oauth2CodeChallengeMethod string

Oauth2CodeChallengeMethod: The PKCE code challenge method.

const (
	// Oauth2CodeChallengeMethodPlain: Plain code challenge comparison.
	Oauth2CodeChallengeMethodPlain Oauth2CodeChallengeMethod = "PLAIN"
	// Oauth2CodeChallengeMethodS256: SHA-256 based PKCE challenge.
	Oauth2CodeChallengeMethodS256 Oauth2CodeChallengeMethod = "S256"
)

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 Oauth2Scope added in v0.2.44

type Oauth2Scope string

Oauth2Scope: Supported OAuth 2.0 scopes.

const (
	// Oauth2ScopeUserread: Grants read access to the authenticated user's profile.
	Oauth2ScopeUserread Oauth2Scope = "user:read"
	// Oauth2ScopeModeling: Grants access to modeling APIs.
	Oauth2ScopeModeling Oauth2Scope = "modeling"
	// Oauth2ScopeAdminwrite: Grants write access to admin APIs.
	Oauth2ScopeAdminwrite Oauth2Scope = "admin:write"
)

type Oauth2Service added in v0.1.9

type Oauth2Service service

Oauth2Service: Endpoints that implement OAuth 2.0 grant flows.

func (*Oauth2Service) ApproveAuthorizationRequest added in v0.2.44

func (s *Oauth2Service) ApproveAuthorizationRequest(requestId UUID) (*Oauth2AuthorizationDecisionResponse, error)

ApproveAuthorizationRequest: Approve a pending OAuth 2.0 authorization request. Parameters

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

ApproveAuthorizationRequest: Approve a pending OAuth 2.0 authorization request. Parameters

  • `requestId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*Oauth2Service) Authorize added in v0.2.43

func (s *Oauth2Service) Authorize(responseType Oauth2AuthorizationResponseType, clientId UUID, redirectUri URL, state string, scope string, codeChallenge string, codeChallengeMethod Oauth2CodeChallengeMethod) error

Authorize: Start an OAuth 2.0 authorization code flow with PKCE. Parameters

  • `responseType`: The OAuth 2.0 authorization response type.
  • `clientId`
  • `redirectUri`
  • `state`
  • `scope`: OAuth 2.0 scopes encoded as a space-delimited string.
  • `codeChallenge`
  • `codeChallengeMethod`: The PKCE code challenge method.
Example

Authorize: Start an OAuth 2.0 authorization code flow with PKCE. Parameters

  • `responseType`: The OAuth 2.0 authorization response type.
  • `clientId`
  • `redirectUri`
  • `state`
  • `scope`: OAuth 2.0 scopes encoded as a space-delimited string.
  • `codeChallenge`
  • `codeChallengeMethod`: The PKCE code challenge method.
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*Oauth2Service) CreateOrgApp added in v0.2.43

func (s *Oauth2Service) CreateOrgApp(body CreateOauth2AppRequest) (*Oauth2AppResponse, error)

CreateOrgApp: Create an org OAuth app. This endpoint requires authentication by an org admin. It creates an active public OAuth app owned by the authenticated organization.

Parameters

  • `body`: Request body for creating a public OAuth app.
Example

CreateOrgApp: Create an org OAuth app. This endpoint requires authentication by an org admin. It creates an active public OAuth app owned by the authenticated organization.

Parameters

  • `body`: Request body for creating a public OAuth app.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Oauth2.CreateOrgApp(kittycad.CreateOauth2AppRequest{GrantTypes: []kittycad.Oauth2AppGrantType{}, Mode: "", Name: "some-string", RedirectUris: []kittycad.URL{}})
	if err != nil {
		panic(err)
	}

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

}

func (*Oauth2Service) CreateUserApp added in v0.2.43

func (s *Oauth2Service) CreateUserApp(body CreateOauth2AppRequest) (*Oauth2AppResponse, error)

CreateUserApp: Create a personal OAuth app. This endpoint requires authentication by any Zoo user. It creates an active public OAuth app owned by the authenticated user.

Parameters

  • `body`: Request body for creating a public OAuth app.
Example

CreateUserApp: Create a personal OAuth app. This endpoint requires authentication by any Zoo user. It creates an active public OAuth app owned by the authenticated user.

Parameters

  • `body`: Request body for creating a public OAuth app.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Oauth2.CreateUserApp(kittycad.CreateOauth2AppRequest{GrantTypes: []kittycad.Oauth2AppGrantType{}, Mode: "", Name: "some-string", RedirectUris: []kittycad.URL{}})
	if err != nil {
		panic(err)
	}

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

}

func (*Oauth2Service) DeleteOrgApp added in v0.2.43

func (s *Oauth2Service) DeleteOrgApp(clientId UUID) error

DeleteOrgApp: Delete an org OAuth app. This endpoint requires authentication by an org admin. It deactivates the organization's active public OAuth app.

Parameters

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

DeleteOrgApp: Delete an org OAuth app. This endpoint requires authentication by an org admin. It deactivates the organization's active public OAuth app.

Parameters

  • `clientId`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*Oauth2Service) DeleteUserApp added in v0.2.43

func (s *Oauth2Service) DeleteUserApp(clientId UUID) error

DeleteUserApp: Delete a personal OAuth app. This endpoint requires authentication by any Zoo user. It deactivates the authenticated user's active public OAuth app.

Parameters

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

DeleteUserApp: Delete a personal OAuth app. This endpoint requires authentication by any Zoo user. It deactivates the authenticated user's active public OAuth app.

Parameters

  • `clientId`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*Oauth2Service) DenyAuthorizationRequest added in v0.2.44

func (s *Oauth2Service) DenyAuthorizationRequest(requestId UUID) (*Oauth2AuthorizationDecisionResponse, error)

DenyAuthorizationRequest: Deny a pending OAuth 2.0 authorization request. Parameters

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

DenyAuthorizationRequest: Deny a pending OAuth 2.0 authorization request. Parameters

  • `requestId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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

import (
	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}

func (*Oauth2Service) DeviceAuthConfirm added in v0.2.4

func (s *Oauth2Service) DeviceAuthConfirm(body DeviceAuthConfirmParams) 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 confirm 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 confirm the `user_code` for the OAuth 2.0 Device Authorization Grant.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

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

import (
	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}

func (*Oauth2Service) DeviceAuthVerify added in v0.2.4

func (s *Oauth2Service) DeviceAuthVerify(userCode string, appName 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`
  • `appName`
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`
  • `appName`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*Oauth2Service) GetAuthorizationRequest added in v0.2.44

func (s *Oauth2Service) GetAuthorizationRequest(requestId UUID) (*Oauth2AuthorizationRequestResponse, error)

GetAuthorizationRequest: Get a pending OAuth 2.0 authorization request for the consent page. Parameters

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

GetAuthorizationRequest: Get a pending OAuth 2.0 authorization request for the consent page. Parameters

  • `requestId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*Oauth2Service) GetOrgApp added in v0.2.43

func (s *Oauth2Service) GetOrgApp(clientId UUID) (*Oauth2AppResponse, error)

GetOrgApp: Get an org OAuth app. This endpoint requires authentication by an org member. It returns the organization's active public OAuth app by client ID.

Parameters

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

GetOrgApp: Get an org OAuth app. This endpoint requires authentication by an org member. It returns the organization's active public OAuth app by client ID.

Parameters

  • `clientId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*Oauth2Service) GetUserApp added in v0.2.43

func (s *Oauth2Service) GetUserApp(clientId UUID) (*Oauth2AppResponse, error)

GetUserApp: Get a personal OAuth app. This endpoint requires authentication by any Zoo user. It returns the authenticated user's active public OAuth app by client ID.

Parameters

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

GetUserApp: Get a personal OAuth app. This endpoint requires authentication by any Zoo user. It returns the authenticated user's active public OAuth app by client ID.

Parameters

  • `clientId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*Oauth2Service) ListOrgApps added in v0.2.43

func (s *Oauth2Service) ListOrgApps(limit int, pageToken string, sortBy CreatedAtSortMode) (*Oauth2AppResponseResultsPage, error)

ListOrgApps: List org OAuth apps. This endpoint requires authentication by an org member. It lists the organization's active public OAuth apps.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

Example

ListOrgApps: List org OAuth apps. This endpoint requires authentication by an org member. It lists the organization's active public OAuth apps.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*Oauth2Service) ListUserApps added in v0.2.43

func (s *Oauth2Service) ListUserApps(limit int, pageToken string, sortBy CreatedAtSortMode) (*Oauth2AppResponseResultsPage, error)

ListUserApps: List personal OAuth apps. This endpoint requires authentication by any Zoo user. It lists the authenticated user's active public OAuth apps.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

Example

ListUserApps: List personal OAuth apps. This endpoint requires authentication by any Zoo user. It lists the authenticated user's active public OAuth apps.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*Oauth2Service) ProviderCallback added in v0.2.4

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

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

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

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

  • `provider`: An account provider.
  • `code`
  • `state`
  • `idToken`
  • `user`
package main

import (
	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}

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

import (
	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*Oauth2Service) Token added in v0.2.43

Token: Exchange an authorization code or refresh token for an OAuth 2.0 access token. Parameters

  • `body`: Form body for `/oauth2/token`.
Example

Token: Exchange an authorization code or refresh token for an OAuth 2.0 access token. Parameters

  • `body`: Form body for `/oauth2/token`.
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Oauth2.Token(kittycad.Oauth2TokenRequestForm{ClientID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), Code: "some-string", CodeVerifier: "some-string", GrantType: "", RedirectUri: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, RefreshToken: "some-string"}); err != nil {
		panic(err)
	}

}

func (*Oauth2Service) TokenRevoke added in v0.2.38

func (s *Oauth2Service) TokenRevoke(body TokenRevokeRequestForm) error

TokenRevoke: Revoke an OAuth2 token. This endpoint is designed to be accessed from an *unauthenticated* API client.

Parameters

  • `body`: The request parameters for the OAuth 2.0 token revocation flow.
Example

TokenRevoke: Revoke an OAuth2 token. This endpoint is designed to be accessed from an *unauthenticated* API client.

Parameters

  • `body`: The request parameters for the OAuth 2.0 token revocation flow.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Oauth2.TokenRevoke(kittycad.TokenRevokeRequestForm{ClientID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), ClientSecret: "some-string", Token: "some-string"}); err != nil {
		panic(err)
	}

}

func (*Oauth2Service) UpdateOrgApp added in v0.2.43

func (s *Oauth2Service) UpdateOrgApp(clientId UUID, body UpdateOauth2AppRequest) (*Oauth2AppResponse, error)

UpdateOrgApp: Update an org OAuth app. This endpoint requires authentication by an org admin. It updates the configuration of the organization's active public OAuth app.

Parameters

  • `clientId`: A UUID usually v4 or v7
  • `body`: Request body for updating a public OAuth app.
Example

UpdateOrgApp: Update an org OAuth app. This endpoint requires authentication by an org admin. It updates the configuration of the organization's active public OAuth app.

Parameters

  • `clientId`: A UUID usually v4 or v7
  • `body`: Request body for updating a public OAuth app.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Oauth2.UpdateOrgApp(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdateOauth2AppRequest{GrantTypes: []kittycad.Oauth2AppGrantType{}, Mode: "", Name: "some-string", RedirectUris: []kittycad.URL{}})
	if err != nil {
		panic(err)
	}

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

}

func (*Oauth2Service) UpdateUserApp added in v0.2.43

func (s *Oauth2Service) UpdateUserApp(clientId UUID, body UpdateOauth2AppRequest) (*Oauth2AppResponse, error)

UpdateUserApp: Update a personal OAuth app. This endpoint requires authentication by any Zoo user. It updates the configuration of the authenticated user's active public OAuth app.

Parameters

  • `clientId`: A UUID usually v4 or v7
  • `body`: Request body for updating a public OAuth app.
Example

UpdateUserApp: Update a personal OAuth app. This endpoint requires authentication by any Zoo user. It updates the configuration of the authenticated user's active public OAuth app.

Parameters

  • `clientId`: A UUID usually v4 or v7
  • `body`: Request body for updating a public OAuth app.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Oauth2.UpdateUserApp(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdateOauth2AppRequest{GrantTypes: []kittycad.Oauth2AppGrantType{}, Mode: "", Name: "some-string", RedirectUris: []kittycad.URL{}})
	if err != nil {
		panic(err)
	}

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

}

func (*Oauth2Service) VerifyOauthAccountLinking added in v0.2.43

func (s *Oauth2Service) VerifyOauthAccountLinking(token string, callbackUrl string) error

VerifyOauthAccountLinking: Verify OAuth account linking and complete the authentication. This endpoint is called when a user clicks the verification link sent to their email after attempting to log in with OAuth when an existing account with the same email was found. This endpoint validates the token, links the OAuth account to the user, and creates a session.

Parameters

  • `token`
  • `callbackUrl`
Example

VerifyOauthAccountLinking: Verify OAuth account linking and complete the authentication. This endpoint is called when a user clicks the verification link sent to their email after attempting to log in with OAuth when an existing account with the same email was found. This endpoint validates the token, links the OAuth account to the user, and creates a session.

Parameters

  • `token`
  • `callbackUrl`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

type Oauth2TokenGrantType added in v0.2.43

type Oauth2TokenGrantType string

Oauth2TokenGrantType: The OAuth 2.0 token endpoint grant types supported by the general token endpoint.

const (
	// Oauth2TokenGrantTypeAuthorizationCode: The authorization code grant.
	Oauth2TokenGrantTypeAuthorizationCode Oauth2TokenGrantType = "authorization_code"
	// Oauth2TokenGrantTypeRefreshToken: The refresh token grant.
	Oauth2TokenGrantTypeRefreshToken Oauth2TokenGrantType = "refresh_token"
)

type Oauth2TokenRequestForm added in v0.2.43

type Oauth2TokenRequestForm struct {
	// ClientID: The OAuth app client ID.
	ClientID UUID `json:"client_id" yaml:"client_id" schema:"client_id,required"`
	// Code: The authorization code, for `authorization_code`.
	Code string `json:"code" yaml:"code" schema:"code"`
	// CodeVerifier: The PKCE verifier, for `authorization_code`.
	CodeVerifier string `json:"code_verifier" yaml:"code_verifier" schema:"code_verifier"`
	// GrantType: The OAuth token grant type.
	GrantType Oauth2TokenGrantType `json:"grant_type" yaml:"grant_type" schema:"grant_type,required"`
	// RedirectUri: The redirect URI, for `authorization_code`.
	RedirectUri URL `json:"redirect_uri" yaml:"redirect_uri" schema:"redirect_uri"`
	// RefreshToken: The refresh token, for `refresh_token`.
	RefreshToken string `json:"refresh_token" yaml:"refresh_token" schema:"refresh_token"`
}

Oauth2TokenRequestForm: Form body for `/oauth2/token`.

type ObjectBringToFront added in v0.2.38

type ObjectBringToFront struct {
}

ObjectBringToFront: The response from the `ObjectBringToFront` endpoint.

type ObjectSetMaterialParamsPbr added in v0.2.38

type ObjectSetMaterialParamsPbr struct {
}

ObjectSetMaterialParamsPbr: The response from the `ObjectSetMaterialParamsPbr` endpoint.

type ObjectSetName added in v0.2.44

type ObjectSetName struct {
}

ObjectSetName: The response from the `ObjectSetName` endpoint.

type ObjectVisible added in v0.2.38

type ObjectVisible struct {
}

ObjectVisible: The response from the `ObjectVisible` endpoint.

type OffsetSurface added in v0.2.43

type OffsetSurface struct {
}

OffsetSurface: The response from the 'OffsetSurface'.

type OkModelingCmdResponse added in v0.2.42

type OkModelingCmdResponse any

OkModelingCmdResponse: OkModelingCmdResponse: A successful response from a modeling command. This can be one of several types of responses, depending on the command.

type OkModelingCmdResponseCameraDragEnd added in v0.2.33

type OkModelingCmdResponseCameraDragEnd struct {
	// Data: The response from the 'SelectRegionFromPoint'. If there are multiple ways to construct this region, this chooses arbitrarily.
	Data SelectRegionFromPoint `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseCameraDragEnd is the type definition for a OkModelingCmdResponseCameraDragEnd.

type OkModelingCmdResponseCameraDragMove added in v0.2.33

type OkModelingCmdResponseCameraDragMove struct {
	// Data: The response from the 'CreateRegionFromQueryPoint'. The region should have an ID taken from the ID of the 'CreateRegionFromQueryPoint' modeling command.
	Data CreateRegionFromQueryPoint `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseCameraDragMove is the type definition for a OkModelingCmdResponseCameraDragMove.

type OkModelingCmdResponseCameraDragStart added in v0.2.38

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

OkModelingCmdResponseCameraDragStart is the type definition for a OkModelingCmdResponseCameraDragStart.

type OkModelingCmdResponseClosePath added in v0.2.34

type OkModelingCmdResponseClosePath struct {
	// Data: The response from the 'CreatePlanarSurface'.
	Data CreatePlanarSurface `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseClosePath is the type definition for a OkModelingCmdResponseClosePath.

type OkModelingCmdResponseCurveSetConstraint added in v0.2.38

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

OkModelingCmdResponseCurveSetConstraint is the type definition for a OkModelingCmdResponseCurveSetConstraint.

type OkModelingCmdResponseData added in v0.2.27

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

OkModelingCmdResponseData is the type definition for a OkModelingCmdResponseData.

type OkModelingCmdResponseDefaultCameraCenterToScene added in v0.2.40

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

OkModelingCmdResponseDefaultCameraCenterToScene is the type definition for a OkModelingCmdResponseDefaultCameraCenterToScene.

type OkModelingCmdResponseDefaultCameraCenterToSelection added in v0.2.38

type OkModelingCmdResponseDefaultCameraCenterToSelection struct {
	// Data: The 3D position on the surface that was evaluated
	Data FaceGetPosition `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseDefaultCameraCenterToSelection is the type definition for a OkModelingCmdResponseDefaultCameraCenterToSelection.

type OkModelingCmdResponseDefaultCameraGetSettings added in v0.2.33

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

OkModelingCmdResponseDefaultCameraGetSettings is the type definition for a OkModelingCmdResponseDefaultCameraGetSettings.

type OkModelingCmdResponseDefaultCameraGetView added in v0.2.44

type OkModelingCmdResponseDefaultCameraGetView struct {
	// Data: The response from the 'EndExecution'.
	Data EndExecution `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseDefaultCameraGetView is the type definition for a OkModelingCmdResponseDefaultCameraGetView.

type OkModelingCmdResponseDefaultCameraLookAt added in v0.2.38

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

OkModelingCmdResponseDefaultCameraLookAt is the type definition for a OkModelingCmdResponseDefaultCameraLookAt.

type OkModelingCmdResponseDefaultCameraPerspectiveSettings added in v0.2.38

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

OkModelingCmdResponseDefaultCameraPerspectiveSettings is the type definition for a OkModelingCmdResponseDefaultCameraPerspectiveSettings.

type OkModelingCmdResponseDefaultCameraSetOrthographic added in v0.2.38

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

OkModelingCmdResponseDefaultCameraSetOrthographic is the type definition for a OkModelingCmdResponseDefaultCameraSetOrthographic.

type OkModelingCmdResponseDefaultCameraSetPerspective added in v0.2.38

type OkModelingCmdResponseDefaultCameraSetPerspective struct {
	// Data: Endpoints of a curve
	Data CurveGetEndPoints `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseDefaultCameraSetPerspective is the type definition for a OkModelingCmdResponseDefaultCameraSetPerspective.

type OkModelingCmdResponseDefaultCameraSetView added in v0.2.44

type OkModelingCmdResponseDefaultCameraSetView struct {
	// Data: The response from the 'SketchGetInfo'.
	Data SketchGetInfo `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseDefaultCameraSetView is the type definition for a OkModelingCmdResponseDefaultCameraSetView.

type OkModelingCmdResponseEdgeLinesVisible added in v0.2.38

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

OkModelingCmdResponseEdgeLinesVisible is the type definition for a OkModelingCmdResponseEdgeLinesVisible.

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 OkModelingCmdResponseEnableSketchMode added in v0.2.38

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

OkModelingCmdResponseEnableSketchMode is the type definition for a OkModelingCmdResponseEnableSketchMode.

type OkModelingCmdResponseEngineUtilEvaluatePath added in v0.2.38

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

OkModelingCmdResponseEngineUtilEvaluatePath is the type definition for a OkModelingCmdResponseEngineUtilEvaluatePath.

type OkModelingCmdResponseEntityDeleteChildren added in v0.2.43

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

OkModelingCmdResponseEntityDeleteChildren is the type definition for a OkModelingCmdResponseEntityDeleteChildren.

type OkModelingCmdResponseEntityFade added in v0.2.38

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

OkModelingCmdResponseEntityFade is the type definition for a OkModelingCmdResponseEntityFade.

type OkModelingCmdResponseEntityGetAllChildUuids added in v0.2.27

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

OkModelingCmdResponseEntityGetAllChildUuids is the type definition for a OkModelingCmdResponseEntityGetAllChildUuids.

type OkModelingCmdResponseEntityGetChildUuid added in v0.2.22

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

OkModelingCmdResponseEntityGetChildUuid is the type definition for a OkModelingCmdResponseEntityGetChildUuid.

type OkModelingCmdResponseEntityGetIndex added in v0.2.43

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

OkModelingCmdResponseEntityGetIndex is the type definition for a OkModelingCmdResponseEntityGetIndex.

type OkModelingCmdResponseEntityGetNumChildren added in v0.2.22

type OkModelingCmdResponseEntityGetNumChildren struct {
	// Data: Edge info struct (useful for maintaining mappings between edges and faces and adjacent/opposite edges).
	Data AdjacencyInfo `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEntityGetNumChildren is the type definition for a OkModelingCmdResponseEntityGetNumChildren.

type OkModelingCmdResponseEntityGetParentID added in v0.2.22

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

OkModelingCmdResponseEntityGetParentID is the type definition for a OkModelingCmdResponseEntityGetParentID.

type OkModelingCmdResponseEntityGetPrimitiveIndex added in v0.2.43

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

OkModelingCmdResponseEntityGetPrimitiveIndex is the type definition for a OkModelingCmdResponseEntityGetPrimitiveIndex.

type OkModelingCmdResponseEntityGetSketchPaths added in v0.2.34

type OkModelingCmdResponseEntityGetSketchPaths struct {
	// Data: The response from the 'SetGridScale'.
	Data SetGridScale `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseEntityGetSketchPaths is the type definition for a OkModelingCmdResponseEntityGetSketchPaths.

type OkModelingCmdResponseEntitySetOpacity added in v0.2.38

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

OkModelingCmdResponseEntitySetOpacity is the type definition for a OkModelingCmdResponseEntitySetOpacity.

type OkModelingCmdResponseExport added in v0.2.22

type OkModelingCmdResponseExport struct {
	// Data: The plane for sketch mode.
	Data GetSketchModePlane `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseExport is the type definition for a OkModelingCmdResponseExport.

type OkModelingCmdResponseExport2D added in v0.2.40

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

OkModelingCmdResponseExport2D is the type definition for a OkModelingCmdResponseExport2D.

type OkModelingCmdResponseExport3D added in v0.2.40

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

OkModelingCmdResponseExport3D is the type definition for a OkModelingCmdResponseExport3D.

type OkModelingCmdResponseExtendPath added in v0.2.38

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

OkModelingCmdResponseExtendPath is the type definition for a OkModelingCmdResponseExtendPath.

type OkModelingCmdResponseExtrude added in v0.2.38

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

OkModelingCmdResponseExtrude is the type definition for a OkModelingCmdResponseExtrude.

type OkModelingCmdResponseExtrudeToReference added in v0.2.42

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

OkModelingCmdResponseExtrudeToReference is the type definition for a OkModelingCmdResponseExtrudeToReference.

type OkModelingCmdResponseHandleMouseDragEnd added in v0.2.38

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

OkModelingCmdResponseHandleMouseDragEnd is the type definition for a OkModelingCmdResponseHandleMouseDragEnd.

type OkModelingCmdResponseHandleMouseDragMove added in v0.2.38

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

OkModelingCmdResponseHandleMouseDragMove is the type definition for a OkModelingCmdResponseHandleMouseDragMove.

type OkModelingCmdResponseHandleMouseDragStart added in v0.2.38

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

OkModelingCmdResponseHandleMouseDragStart is the type definition for a OkModelingCmdResponseHandleMouseDragStart.

type OkModelingCmdResponseHighlightSetEntities added in v0.2.38

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

OkModelingCmdResponseHighlightSetEntities is the type definition for a OkModelingCmdResponseHighlightSetEntities.

type OkModelingCmdResponseHighlightSetEntity added in v0.2.22

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

OkModelingCmdResponseHighlightSetEntity is the type definition for a OkModelingCmdResponseHighlightSetEntity.

type OkModelingCmdResponseLoft added in v0.2.41

type OkModelingCmdResponseLoft struct {
	// Data: The response from the 'SetOrderIndependentTransparency'.
	Data SetOrderIndependentTransparency `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseLoft is the type definition for a OkModelingCmdResponseLoft.

type OkModelingCmdResponseMakeAxesGizmo added in v0.2.38

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

OkModelingCmdResponseMakeAxesGizmo is the type definition for a OkModelingCmdResponseMakeAxesGizmo.

type OkModelingCmdResponseMakePlane added in v0.2.38

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

OkModelingCmdResponseMakePlane is the type definition for a OkModelingCmdResponseMakePlane.

type OkModelingCmdResponseMouseMove added in v0.2.38

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

OkModelingCmdResponseMouseMove is the type definition for a OkModelingCmdResponseMouseMove.

type OkModelingCmdResponseMovePathPen added in v0.2.38

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

OkModelingCmdResponseMovePathPen is the type definition for a OkModelingCmdResponseMovePathPen.

type OkModelingCmdResponseNewAnnotation added in v0.2.38

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

OkModelingCmdResponseNewAnnotation is the type definition for a OkModelingCmdResponseNewAnnotation.

type OkModelingCmdResponseObjectBringToFront added in v0.2.38

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

OkModelingCmdResponseObjectBringToFront is the type definition for a OkModelingCmdResponseObjectBringToFront.

type OkModelingCmdResponseObjectSetMaterialParamsPbr added in v0.2.38

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

OkModelingCmdResponseObjectSetMaterialParamsPbr is the type definition for a OkModelingCmdResponseObjectSetMaterialParamsPbr.

type OkModelingCmdResponseObjectSetName added in v0.2.44

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

OkModelingCmdResponseObjectSetName is the type definition for a OkModelingCmdResponseObjectSetName.

type OkModelingCmdResponseObjectVisible added in v0.2.38

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

OkModelingCmdResponseObjectVisible is the type definition for a OkModelingCmdResponseObjectVisible.

type OkModelingCmdResponseOkModelingCmdResponseData added in v0.2.27

type OkModelingCmdResponseOkModelingCmdResponseData struct {
	// Data: The response from the 'SetKclVersion'.
	Data SetKclVersion `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseOkModelingCmdResponseData is the type definition for a OkModelingCmdResponseOkModelingCmdResponseData.

type OkModelingCmdResponsePlaneSetColor added in v0.2.38

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

OkModelingCmdResponsePlaneSetColor is the type definition for a OkModelingCmdResponsePlaneSetColor.

type OkModelingCmdResponseQueryEntityType added in v0.2.44

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

OkModelingCmdResponseQueryEntityType is the type definition for a OkModelingCmdResponseQueryEntityType.

type OkModelingCmdResponseQueryEntityTypeWithPoint added in v0.2.44

type OkModelingCmdResponseQueryEntityTypeWithPoint struct {
	// Data: A list of faces for a specific edge.
	Data EdgeInfo `json:"data" yaml:"data" schema:"data,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OkModelingCmdResponseQueryEntityTypeWithPoint is the type definition for a OkModelingCmdResponseQueryEntityTypeWithPoint.

type OkModelingCmdResponseReconfigureStream added in v0.2.38

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

OkModelingCmdResponseReconfigureStream is the type definition for a OkModelingCmdResponseReconfigureStream.

type OkModelingCmdResponseRemoveSceneObjects added in v0.2.38

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

OkModelingCmdResponseRemoveSceneObjects is the type definition for a OkModelingCmdResponseRemoveSceneObjects.

type OkModelingCmdResponseRevolve added in v0.2.38

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

OkModelingCmdResponseRevolve is the type definition for a OkModelingCmdResponseRevolve.

type OkModelingCmdResponseRevolveAboutEdge added in v0.2.38

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

OkModelingCmdResponseRevolveAboutEdge is the type definition for a OkModelingCmdResponseRevolveAboutEdge.

type OkModelingCmdResponseSceneClearAll added in v0.2.38

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

OkModelingCmdResponseSceneClearAll is the type definition for a OkModelingCmdResponseSceneClearAll.

type OkModelingCmdResponseSelectAdd added in v0.2.38

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

OkModelingCmdResponseSelectAdd is the type definition for a OkModelingCmdResponseSelectAdd.

type OkModelingCmdResponseSelectClear added in v0.2.38

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

OkModelingCmdResponseSelectClear is the type definition for a OkModelingCmdResponseSelectClear.

type OkModelingCmdResponseSelectEntity added in v0.2.44

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

OkModelingCmdResponseSelectEntity is the type definition for a OkModelingCmdResponseSelectEntity.

type OkModelingCmdResponseSelectRemove added in v0.2.38

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

OkModelingCmdResponseSelectRemove is the type definition for a OkModelingCmdResponseSelectRemove.

type OkModelingCmdResponseSelectReplace added in v0.2.38

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

OkModelingCmdResponseSelectReplace is the type definition for a OkModelingCmdResponseSelectReplace.

type OkModelingCmdResponseSelectWithPoint added in v0.2.22

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

OkModelingCmdResponseSelectWithPoint is the type definition for a OkModelingCmdResponseSelectWithPoint.

type OkModelingCmdResponseSendObject added in v0.2.38

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

OkModelingCmdResponseSendObject is the type definition for a OkModelingCmdResponseSendObject.

type OkModelingCmdResponseSetBackgroundColor added in v0.2.38

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

OkModelingCmdResponseSetBackgroundColor is the type definition for a OkModelingCmdResponseSetBackgroundColor.

type OkModelingCmdResponseSetCurrentToolProperties added in v0.2.38

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

OkModelingCmdResponseSetCurrentToolProperties is the type definition for a OkModelingCmdResponseSetCurrentToolProperties.

type OkModelingCmdResponseSetDefaultSystemProperties added in v0.2.38

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

OkModelingCmdResponseSetDefaultSystemProperties is the type definition for a OkModelingCmdResponseSetDefaultSystemProperties.

type OkModelingCmdResponseSetSceneUnits added in v0.2.38

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

OkModelingCmdResponseSetSceneUnits is the type definition for a OkModelingCmdResponseSetSceneUnits.

type OkModelingCmdResponseSetSelectionFilter added in v0.2.38

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

OkModelingCmdResponseSetSelectionFilter is the type definition for a OkModelingCmdResponseSetSelectionFilter.

type OkModelingCmdResponseSetSelectionType added in v0.2.38

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

OkModelingCmdResponseSetSelectionType is the type definition for a OkModelingCmdResponseSetSelectionType.

type OkModelingCmdResponseSetTool added in v0.2.38

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

OkModelingCmdResponseSetTool is the type definition for a OkModelingCmdResponseSetTool.

type OkModelingCmdResponseSketchModeDisable added in v0.2.38

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

OkModelingCmdResponseSketchModeDisable is the type definition for a OkModelingCmdResponseSketchModeDisable.

type OkModelingCmdResponseSolid2DaddHole added in v0.2.38

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

OkModelingCmdResponseSolid2DaddHole is the type definition for a OkModelingCmdResponseSolid2DaddHole.

type OkModelingCmdResponseSolid3DcutEdgeReferences added in v0.2.44

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

OkModelingCmdResponseSolid3DcutEdgeReferences is the type definition for a OkModelingCmdResponseSolid3DcutEdgeReferences.

type OkModelingCmdResponseSolid3DcutEdges added in v0.2.42

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

OkModelingCmdResponseSolid3DcutEdges is the type definition for a OkModelingCmdResponseSolid3DcutEdges.

type OkModelingCmdResponseSolid3DfilletEdge added in v0.2.38

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

OkModelingCmdResponseSolid3DfilletEdge is the type definition for a OkModelingCmdResponseSolid3DfilletEdge.

type OkModelingCmdResponseSolid3DgetBodyType added in v0.2.43

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

OkModelingCmdResponseSolid3DgetBodyType is the type definition for a OkModelingCmdResponseSolid3DgetBodyType.

type OkModelingCmdResponseSolid3DgetEdgeUuid added in v0.2.43

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

OkModelingCmdResponseSolid3DgetEdgeUuid is the type definition for a OkModelingCmdResponseSolid3DgetEdgeUuid.

type OkModelingCmdResponseSolid3DgetFaceUuid added in v0.2.43

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

OkModelingCmdResponseSolid3DgetFaceUuid is the type definition for a OkModelingCmdResponseSolid3DgetFaceUuid.

type OkModelingCmdResponseSolid3Djoin added in v0.2.43

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

OkModelingCmdResponseSolid3Djoin is the type definition for a OkModelingCmdResponseSolid3Djoin.

type OkModelingCmdResponseSolid3DmultiJoin added in v0.2.43

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

OkModelingCmdResponseSolid3DmultiJoin is the type definition for a OkModelingCmdResponseSolid3DmultiJoin.

type OkModelingCmdResponseSolid3DshellFace added in v0.2.38

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

OkModelingCmdResponseSolid3DshellFace is the type definition for a OkModelingCmdResponseSolid3DshellFace.

type OkModelingCmdResponseStartPath added in v0.2.38

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

OkModelingCmdResponseStartPath is the type definition for a OkModelingCmdResponseStartPath.

type OkModelingCmdResponseSurfaceBlend added in v0.2.43

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

OkModelingCmdResponseSurfaceBlend is the type definition for a OkModelingCmdResponseSurfaceBlend.

type OkModelingCmdResponseSweep added in v0.2.40

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

OkModelingCmdResponseSweep is the type definition for a OkModelingCmdResponseSweep.

type OkModelingCmdResponseTwistExtrude added in v0.2.42

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

OkModelingCmdResponseTwistExtrude is the type definition for a OkModelingCmdResponseTwistExtrude.

type OkModelingCmdResponseUpdateAnnotation added in v0.2.38

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

OkModelingCmdResponseUpdateAnnotation is the type definition for a OkModelingCmdResponseUpdateAnnotation.

type OkWebSocketResponseData added in v0.2.42

type OkWebSocketResponseData any

OkWebSocketResponseData: OkWebSocketResponseData: The websocket messages this server sends.

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 OkWebSocketResponseDataModeling added in v0.2.34

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

OkWebSocketResponseDataModeling: Data about the Modeling Session (application-level).

type OkWebSocketResponseDataModelingBatch added in v0.2.41

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

OkWebSocketResponseDataModelingBatch: Information about the connected instance

type OkWebSocketResponseDataOkWebSocketResponseDataData added in v0.2.27

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

OkWebSocketResponseDataOkWebSocketResponseDataData: Request that the client end this connection and establish a new session using normal authentication and authorization. This does not guarantee that a new session will be accepted.

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: The exported files.

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 Operation added in v0.2.44

type Operation struct {
	// Deadline: Original deadline, including preparation and validation. Never extended.
	Deadline Time `json:"deadline" yaml:"deadline" schema:"deadline,required"`
	// ID: Same idempotency key supplied by the initiating client.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// ProjectSnapshot: Source revision, retained for conflict detection when applying the result.
	ProjectSnapshot MlCopilotProjectSnapshotMetadata `json:"project_snapshot" yaml:"project_snapshot" schema:"project_snapshot,required"`
	// Result: Terminal result, if available. The review itself has no execution deadline.
	Result KclMigrationResult `json:"result" yaml:"result" schema:"result"`
	// Status: Current state.
	Status KclMigrationStatus `json:"status" yaml:"status" schema:"status,required"`
	// Target: Target accepted for this attempt.
	Target KclMigrationTarget `json:"target" yaml:"target" schema:"target,required"`
}

Operation: Persisted operation state, safe to retrieve again without starting new work.

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 */
	// AwsExternalID: ExternalId our workers supply when assuming customer roles, following AWS guidance for avoiding the [confused deputy problem](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html). Required before an org can register external datasets.
	AwsExternalID UUID `json:"aws_external_id" yaml:"aws_external_id" schema:"aws_external_id"`
	// BillingEmail: The billing email address of the org.
	BillingEmail string `json:"billing_email" yaml:"billing_email" schema:"billing_email,required"`
	// 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 OrgDataset added in v0.2.42

type OrgDataset struct {
	// AccessRoleArn: Identity we assume when accessing the dataset (AWS role ARN today). Pair this with the org's `aws_external_id` to mitigate the AWS confused deputy risk. See <https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html>.
	AccessRoleArn string `json:"access_role_arn" yaml:"access_role_arn" schema:"access_role_arn,required"`
	// CreatedAt: The date and time the dataset was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Description: User-provided description for humans reviewing the dataset.
	Description string `json:"description" yaml:"description" schema:"description"`
	// ID: The unique identifier for the dataset.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// LastSyncError: Last recorded sync error message, if dataset access failed.
	LastSyncError string `json:"last_sync_error" yaml:"last_sync_error" schema:"last_sync_error"`
	// LastSyncErrorAt: Timestamp for the last sync error.
	LastSyncErrorAt Time `json:"last_sync_error_at" yaml:"last_sync_error_at" schema:"last_sync_error_at"`
	// LookupEnabled: Whether this dataset may be used for MCP and semantic-search lookups.
	LookupEnabled bool `json:"lookup_enabled" yaml:"lookup_enabled" schema:"lookup_enabled,required"`
	// Name: User-provided display name. This is mutable; lookup by ID instead.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// OrgID: The ID of the org owning the dataset.
	OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id,required"`
	// RequireRawKclSimilarityScoreForSuccess: Whether a low raw-KCL similarity score should block conversion success for this dataset.
	RequireRawKclSimilarityScoreForSuccess bool `` /* 166-byte string literal not displayed */
	// SourceUri: Fully-qualified URI to the dataset location (e.g. s3://bucket/prefix).
	SourceUri string `json:"source_uri" yaml:"source_uri" schema:"source_uri,required"`
	// Status: Lifecycle status for this dataset.
	Status OrgDatasetStatus `json:"status" yaml:"status" schema:"status,required"`
	// StorageProvider: Storage provider identifier.
	StorageProvider StorageProvider `json:"storage_provider" yaml:"storage_provider" schema:"storage_provider,required"`
	// UpdatedAt: The date and time the dataset was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

OrgDataset: Dataset owned by an organization, reusable across multiple features.

type OrgDatasetConversionStatsResponse added in v0.2.42

type OrgDatasetConversionStatsResponse struct {
	// ByStatus: Raw counts keyed by conversion status for diagnostics.
	ByStatus map[string]int `json:"by_status" yaml:"by_status" schema:"by_status,required"`
	// DatasetID: Dataset identifier.
	DatasetID UUID `json:"dataset_id" yaml:"dataset_id" schema:"dataset_id,required"`
	// Failures: Number of conversions currently in an error state.
	Failures int `json:"failures" yaml:"failures" schema:"failures,required"`
	// Successes: Number of conversions that completed successfully.
	Successes int `json:"successes" yaml:"successes" schema:"successes,required"`
	// Total: Total number of tracked conversions.
	Total int `json:"total" yaml:"total" schema:"total,required"`
}

OrgDatasetConversionStatsResponse: Summary statistics for an org dataset's conversions.

type OrgDatasetFileConversionDetails added in v0.2.42

type OrgDatasetFileConversionDetails struct {
	// CompletedAt: The date and time the conversion got its current `status`.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The date and time the conversion was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// DatasetID: The ID of the dataset this file is being converted from.
	DatasetID UUID `json:"dataset_id" yaml:"dataset_id" schema:"dataset_id,required"`
	// FileEtag: File's ETag from dataset bucket, for detecting whether a file needs to be reconverted.
	FileEtag string `json:"file_etag" yaml:"file_etag" schema:"file_etag,required"`
	// FilePath: Location within dataset `path`.
	FilePath string `json:"file_path" yaml:"file_path" schema:"file_path,required"`
	// FileSize: Number of bytes, for measuring throughput and debugging conversion errors.
	FileSize int `json:"file_size" yaml:"file_size" schema:"file_size,required"`
	// ID: The unique identifier for the conversion.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// ImporterVersion: Tracks which version processed this file when available.
	ImporterVersion string `json:"importer_version" yaml:"importer_version" schema:"importer_version"`
	// ManualKclOverride: Plain-text contents of the admin-provided manual KCL override, when available.
	ManualKclOverride string `json:"manual_kcl_override" yaml:"manual_kcl_override" schema:"manual_kcl_override"`
	// ManualKclOverrideActive: Indicates whether a persisted manual KCL override will be used instead of regenerating KCL automatically.
	ManualKclOverrideActive bool `json:"manual_kcl_override_active" yaml:"manual_kcl_override_active" schema:"manual_kcl_override_active,required"`
	// ManualKclOverrideUpdatedAt: Timestamp when the manual KCL override was last updated.
	ManualKclOverrideUpdatedAt Time `json:"manual_kcl_override_updated_at" yaml:"manual_kcl_override_updated_at" schema:"manual_kcl_override_updated_at"`
	// Metadata: Additional per-conversion metadata as string key-value pairs.
	Metadata any `json:"metadata" yaml:"metadata" schema:"metadata"`
	// OriginalSnapshotImages: Snapshot images for the original source model.
	OriginalSnapshotImages []OrgDatasetSnapshotImage `json:"original_snapshot_images" yaml:"original_snapshot_images" schema:"original_snapshot_images,required"`
	// Output: Plain-text contents of the converted artifact, when available.
	Output string `json:"output" yaml:"output" schema:"output"`
	// Phase: Current step in the conversion pipeline.
	Phase OrgDatasetFileConversionPhase `json:"phase" yaml:"phase" schema:"phase,required"`
	// RawKclOutput: Plain-text contents of the raw KCL artifact, when available.
	RawKclOutput string `json:"raw_kcl_output" yaml:"raw_kcl_output" schema:"raw_kcl_output"`
	// RawKclSimilarityScore: Score from `0.0` to `1.0` that quantifies how closely the raw KCL model matches the original model.
	RawKclSimilarityScore float64 `json:"raw_kcl_similarity_score" yaml:"raw_kcl_similarity_score" schema:"raw_kcl_similarity_score"`
	// RawKclSnapshotImages: Snapshot images for the raw KCL model.
	RawKclSnapshotImages []OrgDatasetSnapshotImage `json:"raw_kcl_snapshot_images" yaml:"raw_kcl_snapshot_images" schema:"raw_kcl_snapshot_images,required"`
	// SalonKclOutput: Plain-text contents of the salon/refactored KCL artifact, when available.
	SalonKclOutput string `json:"salon_kcl_output" yaml:"salon_kcl_output" schema:"salon_kcl_output"`
	// SalonKclSimilarityScore: Score from `0.0` to `1.0` that quantifies how closely the salon KCL model matches the raw KCL model.
	SalonKclSimilarityScore float64 `json:"salon_kcl_similarity_score" yaml:"salon_kcl_similarity_score" schema:"salon_kcl_similarity_score"`
	// SalonKclSnapshotImages: Snapshot images for the salon/refactored KCL model.
	SalonKclSnapshotImages []OrgDatasetSnapshotImage `json:"salon_kcl_snapshot_images" yaml:"salon_kcl_snapshot_images" schema:"salon_kcl_snapshot_images,required"`
	// StartedAt: The date and time the conversion started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: Conversion status.
	Status OrgDatasetFileConversionStatus `json:"status" yaml:"status" schema:"status,required"`
	// StatusMessage: Details associated with `status`.
	StatusMessage string `json:"status_message" yaml:"status_message" schema:"status_message"`
	// UpdatedAt: The date and time the conversion was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

OrgDatasetFileConversionDetails: Detailed response that bundles conversion metadata with converted file and snapshot contents.

type OrgDatasetFileConversionPhase added in v0.2.43

type OrgDatasetFileConversionPhase string

OrgDatasetFileConversionPhase: Fine-grained pipeline stage for org dataset file conversions.

const (
	// OrgDatasetFileConversionPhaseQueued: Phase index `0`: waiting for a worker to begin processing this conversion.
	OrgDatasetFileConversionPhaseQueued OrgDatasetFileConversionPhase = "queued"
	// OrgDatasetFileConversionPhaseZooGeneratedOriginalMetadata: Phase index `1`: generating original file metadata.
	OrgDatasetFileConversionPhaseZooGeneratedOriginalMetadata OrgDatasetFileConversionPhase = "zoo_generated_original_metadata"
	// OrgDatasetFileConversionPhaseSnapshotOriginal: Phase index `2`: creating a snapshot of the original source model.
	OrgDatasetFileConversionPhaseSnapshotOriginal OrgDatasetFileConversionPhase = "snapshot_original"
	// OrgDatasetFileConversionPhaseUserProvidedMetadata: Phase index `3`: discovering optional user-provided metadata files (`.json`, `.yaml`, `.yml`, `.toml`, `.txt`) stored next to the source CAD file.
	OrgDatasetFileConversionPhaseUserProvidedMetadata OrgDatasetFileConversionPhase = "user_provided_metadata"
	// OrgDatasetFileConversionPhaseManualKclOverride: Phase index `4`: loading a persisted manual KCL override instead of regenerating KCL automatically.
	OrgDatasetFileConversionPhaseManualKclOverride OrgDatasetFileConversionPhase = "manual_kcl_override"
	// OrgDatasetFileConversionPhaseConvertRawKcl: Phase index `5`: converting the source model into raw KCL.
	OrgDatasetFileConversionPhaseConvertRawKcl OrgDatasetFileConversionPhase = "convert_raw_kcl"
	// OrgDatasetFileConversionPhaseZooGeneratedRawKclMetadata: Phase index `6`: generating raw KCL metadata.
	OrgDatasetFileConversionPhaseZooGeneratedRawKclMetadata OrgDatasetFileConversionPhase = "zoo_generated_raw_kcl_metadata"
	// OrgDatasetFileConversionPhaseSnapshotRawKcl: Phase index `7`: creating a snapshot of the raw KCL result.
	OrgDatasetFileConversionPhaseSnapshotRawKcl OrgDatasetFileConversionPhase = "snapshot_raw_kcl"
	// OrgDatasetFileConversionPhaseSalon: Phase index `8`: running the salon/refactor step that produces polished KCL.
	OrgDatasetFileConversionPhaseSalon OrgDatasetFileConversionPhase = "salon"
	// OrgDatasetFileConversionPhaseZooGeneratedSalonKclMetadata: Phase index `9`: generating salon KCL metadata.
	OrgDatasetFileConversionPhaseZooGeneratedSalonKclMetadata OrgDatasetFileConversionPhase = "zoo_generated_salon_kcl_metadata"
	// OrgDatasetFileConversionPhaseSnapshotSalonKcl: Phase index `10`: creating a snapshot of the salon/refactored KCL.
	OrgDatasetFileConversionPhaseSnapshotSalonKcl OrgDatasetFileConversionPhase = "snapshot_salon_kcl"
	// OrgDatasetFileConversionPhaseCompleted: Phase index `11`: conversion finished successfully.
	OrgDatasetFileConversionPhaseCompleted OrgDatasetFileConversionPhase = "completed"
)

type OrgDatasetFileConversionStatus added in v0.2.42

type OrgDatasetFileConversionStatus string

OrgDatasetFileConversionStatus: `OrgDatasetFileConversion` status.

const (
	// OrgDatasetFileConversionStatusQueued: Pending conversion.
	OrgDatasetFileConversionStatusQueued OrgDatasetFileConversionStatus = "queued"
	// OrgDatasetFileConversionStatusCanceled: The file will not be converted.
	OrgDatasetFileConversionStatusCanceled OrgDatasetFileConversionStatus = "canceled"
	// OrgDatasetFileConversionStatusInProgress: The file is currently being converted. If `started_at` passes a certain threshold, we assume it got dropped and will retry.
	OrgDatasetFileConversionStatusInProgress OrgDatasetFileConversionStatus = "in_progress"
	// OrgDatasetFileConversionStatusSuccess: Conversion finished with the result available at `output_path`.
	OrgDatasetFileConversionStatusSuccess OrgDatasetFileConversionStatus = "success"
	// OrgDatasetFileConversionStatusErrorUser: Conversion failed due to user providing a broken file, such as it being empty.
	OrgDatasetFileConversionStatusErrorUser OrgDatasetFileConversionStatus = "error_user"
	// OrgDatasetFileConversionStatusErrorGeometryMismatch: Conversion produced a raw KCL result whose geometry diverged from the source model beyond the accepted threshold.
	OrgDatasetFileConversionStatusErrorGeometryMismatch OrgDatasetFileConversionStatus = "error_geometry_mismatch"
	// OrgDatasetFileConversionStatusErrorExecution: Conversion failed because generated KCL failed to execute.
	OrgDatasetFileConversionStatusErrorExecution OrgDatasetFileConversionStatus = "error_execution"
	// OrgDatasetFileConversionStatusErrorConnection: Conversion failed because a required conversion service connection or dependency was unavailable.
	OrgDatasetFileConversionStatusErrorConnection OrgDatasetFileConversionStatus = "error_connection"
	// OrgDatasetFileConversionStatusErrorUnsupported: Conversion failed because we didn't know how to handle the file. The conversion should be retried with a new converter version.
	OrgDatasetFileConversionStatusErrorUnsupported OrgDatasetFileConversionStatus = "error_unsupported"
	// OrgDatasetFileConversionStatusErrorInternal: Conversion failed with some other unrecoverable error. The conversion should be retried with a new converter version.
	OrgDatasetFileConversionStatusErrorInternal OrgDatasetFileConversionStatus = "error_internal"
)

type OrgDatasetFileConversionSummary added in v0.2.42

type OrgDatasetFileConversionSummary struct {
	// CompletedAt: The date and time the conversion got its current `status`.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// CreatedAt: The date and time the conversion was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// DatasetID: The ID of the dataset this file is being converted from.
	DatasetID UUID `json:"dataset_id" yaml:"dataset_id" schema:"dataset_id,required"`
	// FileEtag: File's ETag from dataset bucket, for detecting whether a file needs to be reconverted.
	FileEtag string `json:"file_etag" yaml:"file_etag" schema:"file_etag,required"`
	// FilePath: Location within dataset `path`.
	FilePath string `json:"file_path" yaml:"file_path" schema:"file_path,required"`
	// FileSize: Number of bytes, for measuring throughput and debugging conversion errors.
	FileSize int `json:"file_size" yaml:"file_size" schema:"file_size,required"`
	// ID: The unique identifier for the conversion.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// ImporterVersion: Tracks which version processed this file when available.
	ImporterVersion string `json:"importer_version" yaml:"importer_version" schema:"importer_version"`
	// ManualKclOverrideActive: Indicates whether a persisted manual KCL override will be used instead of regenerating KCL automatically.
	ManualKclOverrideActive bool `json:"manual_kcl_override_active" yaml:"manual_kcl_override_active" schema:"manual_kcl_override_active,required"`
	// ManualKclOverrideUpdatedAt: Timestamp when the manual KCL override was last updated.
	ManualKclOverrideUpdatedAt Time `json:"manual_kcl_override_updated_at" yaml:"manual_kcl_override_updated_at" schema:"manual_kcl_override_updated_at"`
	// Metadata: Additional per-conversion metadata as string key-value pairs.
	Metadata any `json:"metadata" yaml:"metadata" schema:"metadata"`
	// Phase: Current step in the conversion pipeline.
	Phase OrgDatasetFileConversionPhase `json:"phase" yaml:"phase" schema:"phase,required"`
	// RawKclSimilarityScore: Score from `0.0` to `1.0` that quantifies how closely the raw KCL model matches the original model.
	RawKclSimilarityScore float64 `json:"raw_kcl_similarity_score" yaml:"raw_kcl_similarity_score" schema:"raw_kcl_similarity_score"`
	// SalonKclSimilarityScore: Score from `0.0` to `1.0` that quantifies how closely the salon KCL model matches the raw KCL model.
	SalonKclSimilarityScore float64 `json:"salon_kcl_similarity_score" yaml:"salon_kcl_similarity_score" schema:"salon_kcl_similarity_score"`
	// StartedAt: The date and time the conversion started.
	StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
	// Status: Conversion status.
	Status OrgDatasetFileConversionStatus `json:"status" yaml:"status" schema:"status,required"`
	// StatusMessage: Details associated with `status`.
	StatusMessage string `json:"status_message" yaml:"status_message" schema:"status_message"`
	// UpdatedAt: The date and time the conversion was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

OrgDatasetFileConversionSummary: Publicly exposed view of a dataset file conversion that omits storage-specific fields.

type OrgDatasetFileConversionSummaryResultsPage added in v0.2.42

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

OrgDatasetFileConversionSummaryResultsPage: A single page of results

type OrgDatasetResultsPage added in v0.2.42

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

OrgDatasetResultsPage: A single page of results

type OrgDatasetSemanticSearchMatch added in v0.2.43

type OrgDatasetSemanticSearchMatch struct {
	// ChunkIndex: Zero-based chunk ordinal in the conversion output.
	ChunkIndex int `json:"chunk_index" yaml:"chunk_index" schema:"chunk_index,required"`
	// Content: Full converted output text for the matched conversion, when available.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// ConversionID: Matching conversion id.
	ConversionID UUID `json:"conversion_id" yaml:"conversion_id" schema:"conversion_id,required"`
	// Similarity: Cosine-similarity score in roughly [-1, 1].
	Similarity float64 `json:"similarity" yaml:"similarity" schema:"similarity,required"`
	// SourceFilePath: Source path for the conversion.
	SourceFilePath string `json:"source_file_path" yaml:"source_file_path" schema:"source_file_path,required"`
}

OrgDatasetSemanticSearchMatch: Semantic-search match returned for an org dataset chunk.

type OrgDatasetSnapshotImage added in v0.2.43

type OrgDatasetSnapshotImage struct {
	// DataBase64: Base64-encoded image bytes.
	DataBase64 Base64 `json:"data_base64" yaml:"data_base64" schema:"data_base64,required"`
	// MimeType: MIME type of the stored image.
	MimeType string `json:"mime_type" yaml:"mime_type" schema:"mime_type,required"`
}

OrgDatasetSnapshotImage: Detailed response that bundles conversion metadata with the converted file contents.

type OrgDatasetSource added in v0.2.42

type OrgDatasetSource struct {
	// AccessRoleArn: Identity we assume when accessing the dataset. Required when `provider` is `s3`; ignored for Zoo-managed datasets. Must be configured with the org's `aws_external_id` per AWS confused deputy guidance. See <https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html>.
	AccessRoleArn string `json:"access_role_arn" yaml:"access_role_arn" schema:"access_role_arn"`
	// Provider: Storage provider identifier.
	Provider StorageProvider `json:"provider" yaml:"provider" schema:"provider,required"`
	// Uri: Fully-qualified URI for the dataset contents. Required when `provider` is `s3`; ignored for Zoo-managed datasets.
	Uri string `json:"uri" yaml:"uri" schema:"uri"`
}

OrgDatasetSource: Details for accessing an org dataset.

type OrgDatasetStatus added in v0.2.42

type OrgDatasetStatus string

OrgDatasetStatus: Lifecycle status for org datasets.

const (
	// OrgDatasetStatusActive: Dataset is active and can be used.
	OrgDatasetStatusActive OrgDatasetStatus = "active"
	// OrgDatasetStatusPaused: Dataset conversion processing is paused by an administrator.
	OrgDatasetStatusPaused OrgDatasetStatus = "paused"
	// OrgDatasetStatusDeleting: Dataset is being deleted and should not be mutated or used.
	OrgDatasetStatusDeleting OrgDatasetStatus = "deleting"
	// OrgDatasetStatusErrored: Dataset encountered sync errors and needs attention.
	OrgDatasetStatusErrored OrgDatasetStatus = "errored"
)

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

import (
	"fmt"
	"net/url"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) CreateDataset added in v0.2.42

func (s *OrgService) CreateDataset(body CreateOrgDataset) (*OrgDataset, error)

CreateDataset: Register a new org dataset. If the dataset lives in S3, call `/org/dataset/s3/policies` first so you can generate the trust, permission, and bucket policies scoped to your dataset before invoking this endpoint.

Parameters

  • `body`: Payload for creating an org dataset.
Example

CreateDataset: Register a new org dataset. If the dataset lives in S3, call `/org/dataset/s3/policies` first so you can generate the trust, permission, and bucket policies scoped to your dataset before invoking this endpoint.

Parameters

  • `body`: Payload for creating an org dataset.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Org.CreateDataset(kittycad.CreateOrgDataset{Description: "some-string", Name: "some-string", RequireRawKclSimilarityScoreForSuccess: true, Source: kittycad.OrgDatasetSource{AccessRoleArn: "some-string", Provider: "", Uri: "some-string"}})
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) DatasetS3Policies added in v0.2.42

func (s *OrgService) DatasetS3Policies(uri string, roleArn string) (*DatasetS3Policies, error)

DatasetS3Policies: Return the IAM policies customers should apply when onboarding an S3 dataset. Parameters

  • `uri`
  • `roleArn`
Example

DatasetS3Policies: Return the IAM policies customers should apply when onboarding an S3 dataset. Parameters

  • `uri`
  • `roleArn`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*OrgService) DeleteDataset added in v0.2.42

func (s *OrgService) DeleteDataset(id UUID) error

DeleteDataset: Delete a dataset owned by the caller's organization. This is a destructive operation that: - requires org admin authentication and the dataset must belong to the caller's org. - fails with a 409 Conflict if the dataset is still attached to any custom model. - deletes Zoo-managed artifacts for this dataset (converted outputs and embeddings). - does **not** delete or modify the customer's source bucket/prefix.

All internal artifact deletions are strict; if any cleanup fails, the request fails.

Parameters

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

DeleteDataset: Delete a dataset owned by the caller's organization. This is a destructive operation that: - requires org admin authentication and the dataset must belong to the caller's org. - fails with a 409 Conflict if the dataset is still attached to any custom model. - deletes Zoo-managed artifacts for this dataset (converted outputs and embeddings). - does **not** delete or modify the customer's source bucket/prefix.

All internal artifact deletions are strict; if any cleanup fails, the request fails.

Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

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
package main

import (
	"github.com/kittycad/kittycad.go"
)

func main() {
	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)
	}

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*OrgService) DownloadDatasetConversionOriginal added in v0.2.43

func (s *OrgService) DownloadDatasetConversionOriginal(id UUID, conversionId UUID) error

DownloadDatasetConversionOriginal: Download the original source file for a specific dataset conversion. Parameters

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

DownloadDatasetConversionOriginal: Download the original source file for a specific dataset conversion. Parameters

  • `id`: A UUID usually v4 or v7
  • `conversionId`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*OrgService) DownloadDatasetSuccessfulKclBulk added in v0.2.43

func (s *OrgService) DownloadDatasetSuccessfulKclBulk(id UUID) error

DownloadDatasetSuccessfulKclBulk: Bulk-download KCL outputs for successful dataset conversions. Parameters

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

DownloadDatasetSuccessfulKclBulk: Bulk-download KCL outputs for successful dataset conversions. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) GetDataset added in v0.2.42

func (s *OrgService) GetDataset(id UUID) (*OrgDataset, error)

GetDataset: Fetch a single dataset by id so long as it belongs to the authenticated org. Parameters

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

GetDataset: Fetch a single dataset by id so long as it belongs to the authenticated org. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*OrgService) GetDatasetConversion added in v0.2.42

func (s *OrgService) GetDatasetConversion(id UUID, conversionId UUID) (*OrgDatasetFileConversionDetails, error)

GetDatasetConversion: Fetch the metadata and converted output for a single dataset conversion. Unlike list/search endpoints, this returns the full conversion payload: latest output text plus decoded snapshot image payloads for original, raw-KCL, and salon-KCL stages.

Parameters

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

GetDatasetConversion: Fetch the metadata and converted output for a single dataset conversion. Unlike list/search endpoints, this returns the full conversion payload: latest output text plus decoded snapshot image payloads for original, raw-KCL, and salon-KCL stages.

Parameters

  • `id`: A UUID usually v4 or v7
  • `conversionId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*OrgService) GetDatasetConversionStats added in v0.2.42

func (s *OrgService) GetDatasetConversionStats(id UUID) (*OrgDatasetConversionStatsResponse, error)

GetDatasetConversionStats: Return aggregate conversion stats for a dataset owned by the caller's org. Parameters

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

GetDatasetConversionStats: Return aggregate conversion stats for a dataset owned by the caller's org. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}
func (s *OrgService) GetShortlinks(limit int, pageToken string, sortBy CreatedAtSortMode) (*ShortlinkResultsPage, error)

GetShortlinks: Get the shortlinks for an org. This endpoint requires authentication by an org admin. It gets the shortlinks for 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.

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) ListDatasetConversions added in v0.2.42

func (s *OrgService) ListDatasetConversions(id UUID, limit int, pageToken string, sortBy ConversionSortMode, filter string, q string, phase string) (*OrgDatasetFileConversionSummaryResultsPage, error)

ListDatasetConversions: List the file conversions that have been processed for a given dataset owned by the caller's org. This endpoint returns lightweight conversion summaries only (including `phase`), and intentionally omits converted KCL output and snapshot image payloads for speed. Use the optional `filter` query parameter to filter results (example: `?filter=status:success`). Use `q` to search by conversion id or file path and `phase` to narrow the pipeline stage.

Parameters

  • `id`: A UUID usually v4 or v7
  • `limit`
  • `pageToken`
  • `sortBy`: Supported sort modes for org dataset conversions.
  • `filter`
  • `q`
  • `phase`
Example

ListDatasetConversions: List the file conversions that have been processed for a given dataset owned by the caller's org. This endpoint returns lightweight conversion summaries only (including `phase`), and intentionally omits converted KCL output and snapshot image payloads for speed. Use the optional `filter` query parameter to filter results (example: `?filter=status:success`). Use `q` to search by conversion id or file path and `phase` to narrow the pipeline stage.

Parameters

  • `id`: A UUID usually v4 or v7
  • `limit`
  • `pageToken`
  • `sortBy`: Supported sort modes for org dataset conversions.
  • `filter`
  • `q`
  • `phase`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*OrgService) ListDatasets added in v0.2.42

func (s *OrgService) ListDatasets(limit int, pageToken string, lookupEnabled bool, sortBy CreatedAtSortMode) (*OrgDatasetResultsPage, error)

ListDatasets: List every dataset that belongs to the caller's organization. Parameters

  • `limit`

  • `pageToken`

  • `lookupEnabled`

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

    Currently, we only support scanning in ascending order.

Example

ListDatasets: List every dataset that belongs to the caller's organization. Parameters

  • `limit`

  • `pageToken`

  • `lookupEnabled`

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

    Currently, we only support scanning in ascending order.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) ListSkills added in v0.2.44

func (s *OrgService) ListSkills(limit int, pageToken string) (*OrgSkillResponseResultsPage, error)

ListSkills: List every skill that belongs to the caller's organization, ordered by name. Parameters

  • `limit`
  • `pageToken`
Example

ListSkills: List every skill that belongs to the caller's organization, ordered by name. Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*OrgService) RetriggerDataset added in v0.2.43

func (s *OrgService) RetriggerDataset(id UUID, statuses string) error

RetriggerDataset: Request a retrigger of conversions for a dataset that belongs to the caller's org. Parameters

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

RetriggerDataset: Request a retrigger of conversions for a dataset that belongs to the caller's org. Parameters

  • `id`: A UUID usually v4 or v7
  • `statuses`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*OrgService) RetriggerDatasetConversion added in v0.2.43

func (s *OrgService) RetriggerDatasetConversion(id UUID, conversionId UUID) error

RetriggerDatasetConversion: Retrigger a specific dataset conversion for the caller's org. Parameters

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

RetriggerDatasetConversion: Retrigger a specific dataset conversion for the caller's org. Parameters

  • `id`: A UUID usually v4 or v7
  • `conversionId`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*OrgService) SearchDatasetConversions added in v0.2.43

func (s *OrgService) SearchDatasetConversions(id UUID, limit int, pageToken string, q string, sortBy ConversionSortMode, filter string, phase string) (*OrgDatasetFileConversionSummaryResultsPage, error)

SearchDatasetConversions: Search dataset conversions by conversion ID or file path. Supports exact conversion-ID matching and fuzzy file-path matching.

Parameters

  • `id`: A UUID usually v4 or v7
  • `limit`
  • `pageToken`
  • `q`
  • `sortBy`: Supported sort modes for org dataset conversions.
  • `filter`
  • `phase`
Example

SearchDatasetConversions: Search dataset conversions by conversion ID or file path. Supports exact conversion-ID matching and fuzzy file-path matching.

Parameters

  • `id`: A UUID usually v4 or v7
  • `limit`
  • `pageToken`
  • `q`
  • `sortBy`: Supported sort modes for org dataset conversions.
  • `filter`
  • `phase`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*OrgService) SearchDatasetSemantic added in v0.2.43

func (s *OrgService) SearchDatasetSemantic(id UUID, q string, limit int) (*[]OrgDatasetSemanticSearchMatch, error)

SearchDatasetSemantic: Run semantic search across chunked conversion outputs for a dataset. This embeds the query text with the org-dataset embedding model and returns top chunk matches ranked by cosine similarity.

Parameters

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

SearchDatasetSemantic: Run semantic search across chunked conversion outputs for a dataset. This embeds the query text with the org-dataset embedding model and returns top chunk matches ranked by cosine similarity.

Parameters

  • `id`: A UUID usually v4 or v7
  • `q`
  • `limit`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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

import (
	"fmt"
	"net/url"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) UpdateDataset added in v0.2.42

func (s *OrgService) UpdateDataset(id UUID, body UpdateOrgDataset) (*OrgDataset, error)

UpdateDataset: Update dataset metadata or storage credentials for the caller's organization. IMPORTANT: Use this endpoint to fix connectivity to the same underlying storage location (e.g. rotating credentials or correcting a typo). Do not repoint an existing dataset at a completely different bucket or provider—create a new dataset instead so conversions in flight keep their original source. This warning applies to every storage backend, not just S3.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: Payload for updating an org dataset.
Example

UpdateDataset: Update dataset metadata or storage credentials for the caller's organization. IMPORTANT: Use this endpoint to fix connectivity to the same underlying storage location (e.g. rotating credentials or correcting a typo). Do not repoint an existing dataset at a completely different bucket or provider—create a new dataset instead so conversions in flight keep their original source. This warning applies to every storage backend, not just S3.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: Payload for updating an org dataset.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Org.UpdateDataset(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.UpdateOrgDataset{Description: "some-string", Name: "some-string", RequireRawKclSimilarityScoreForSuccess: true, Source: kittycad.UpdateOrgDatasetSource{AccessRoleArn: "some-string", Provider: "", Uri: "some-string"}})
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*OrgService) UploadDatasetFiles added in v0.2.43

func (s *OrgService) UploadDatasetFiles(id UUID, body *MultipartForm) (*UploadOrgDatasetFilesResponse, error)

UploadDatasetFiles: Upload source files into a Zoo-managed dataset. This endpoint accepts `multipart/form-data` where each file part becomes a source object in the dataset. Exact `<proprietary CAD filename>.json` converter dumps are also accepted and associated with their original CAD file. Paths are normalized and must be relative.

Parameters

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

UploadDatasetFiles: Upload source files into a Zoo-managed dataset. This endpoint accepts `multipart/form-data` where each file part becomes a source object in the dataset. Exact `<proprietary CAD filename>.json` converter dumps are also accepted and associated with their original CAD file. Paths are normalized and must be relative.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

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

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

}

type OrgSkillResponse added in v0.2.44

type OrgSkillResponse struct {
	// Description: Short description injected into Zookeeper's initial prompt.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// ID: Stable skill identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Markdown: Full markdown context loaded when the skill is activated.
	Markdown string `json:"markdown" yaml:"markdown" schema:"markdown,required"`
	// Name: Human-readable activation name.
	Name string `json:"name" yaml:"name" schema:"name,required"`
}

OrgSkillResponse: Public skill context available to the caller's organization.

type OrgSkillResponseResultsPage added in v0.2.44

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

OrgSkillResponseResultsPage: A single page of results

type OrientToFace added in v0.2.40

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

OrientToFace: The response from the `OrientToFace` command.

type OriginType added in v0.2.42

type OriginType any

OriginType: OriginType: The type of origin

type OriginTypeGlobal added in v0.2.38

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

OriginTypeGlobal: Global Origin ([0, 0, 0] in world space).

type OriginTypeLocal added in v0.2.38

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

OriginTypeLocal: Local Origin ([0, 0, 0] in object space).

type OriginTypeOrigin added in v0.2.38

type OriginTypeOrigin struct {
	// Origin: Custom origin point.
	Origin Point3D `json:"origin" yaml:"origin" schema:"origin,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OriginTypeOrigin: Custom Origin (user specified point in world space).

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 OutputFormat2D added in v0.2.40

type OutputFormat2D struct {
	// Storage: Export storage.
	Storage DxfStorage `json:"storage" yaml:"storage" schema:"storage"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

OutputFormat2D: AutoCAD drawing interchange format.

type OutputFormat3D added in v0.2.42

type OutputFormat3D any

OutputFormat3D: OutputFormat3D: Output 3D format specifier.

type OutputFormat3Dcreated added in v0.2.41

type OutputFormat3Dcreated struct {
	// Created: Timestamp override.
	Created Time `json:"created" yaml:"created" schema:"created"`
	// 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"`
}

OutputFormat3Dcreated: Autodesk Filmbox (FBX) format.

type OutputFormat3Dfbx added in v0.2.40

type OutputFormat3Dfbx 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 millimeters.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

OutputFormat3Dfbx: Wavefront OBJ format.

type OutputFormat3DincludeUuids added in v0.2.44

type OutputFormat3DincludeUuids 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 millimeters.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

OutputFormat3DincludeUuids: The PLY Polygon File Format.

type OutputFormat3Dpresentation added in v0.2.40

type OutputFormat3Dpresentation 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"`
	// Created: Timestamp override.
	Created Time `json:"created" yaml:"created" schema:"created"`
	// Presentation: Presentation style.
	Presentation StepPresentation `json:"presentation" yaml:"presentation" schema:"presentation"`
	// 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"`
}

OutputFormat3Dpresentation: ISO 10303-21 (STEP) format.

type OutputFormat3Dstorage added in v0.2.40

type OutputFormat3Dstorage 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 millimeters.
	Units UnitLength `json:"units" yaml:"units" schema:"units,required"`
}

OutputFormat3Dstorage: *ST**ereo**L**ithography 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 PathGetCurveUuid added in v0.2.34

type PathGetCurveUuid struct {
	// CurveID: The UUID of the curve entity.
	CurveID UUID `json:"curve_id" yaml:"curve_id" schema:"curve_id,required"`
}

PathGetCurveUuid: The response from the `PathGetCurveUuid` command.

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 PathGetSketchTargetUuid added in v0.2.34

type PathGetSketchTargetUuid struct {
	// TargetID: The UUID of the sketch target.
	TargetID UUID `json:"target_id" yaml:"target_id" schema:"target_id"`
}

PathGetSketchTargetUuid: The response from the `PathGetSketchTargetUuid` 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 PathSegment added in v0.2.42

type PathSegment any

PathSegment: PathSegment: A segment of a path. Paths are composed of many segments.

type PathSegmentArc added in v0.2.18

type PathSegmentArc struct {
	// End: End point of the conic.
	End Point2D `json:"end" yaml:"end" schema:"end,required"`
	// EndTangent: Tangent at the end of the conic.
	EndTangent Point2D `json:"end_tangent" yaml:"end_tangent" schema:"end_tangent,required"`
	// Interior: Interior point that lies on the conic.
	Interior Point2D `json:"interior" yaml:"interior" schema:"interior,required"`
	// Relative: Whether or not the interior and end points are relative to the previous path position.
	Relative bool `json:"relative" yaml:"relative" schema:"relative,required"`
	// StartTangent: Tangent at the start of the conic.
	StartTangent Point2D `json:"start_tangent" yaml:"start_tangent" schema:"start_tangent,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentArc: Adds a generic conic section specified by the end point, interior point and tangents at the start and end of the section.

type PathSegmentCenter added in v0.2.29

type PathSegmentCenter struct {
	// Offset: Offset of the arc. Negative values will arc clockwise.
	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. Arcs will choose a clockwise or counter-clockwise direction based on the arc end position.

type PathSegmentPathSegmentRelative added in v0.2.41

type PathSegmentPathSegmentRelative struct {
	// Angle: The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve.
	Angle Angle `json:"angle" yaml:"angle" schema:"angle,required"`
	// EndRadius: The involute is described between two circles, end_radius is the radius of the outer circle.
	EndRadius float64 `json:"end_radius" yaml:"end_radius" schema:"end_radius,required"`
	// Reverse: If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start.
	Reverse bool `json:"reverse" yaml:"reverse" schema:"reverse,required"`
	// StartRadius: The involute is described between two circles, start_radius is the radius of the inner circle.
	StartRadius float64 `json:"start_radius" yaml:"start_radius" schema:"start_radius,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentPathSegmentRelative: Adds a circular involute from the current position that goes through the given end_radius and is rotated around the current point by angle.

type PathSegmentRadius added in v0.2.40

type PathSegmentRadius struct {
	// End: End point of the arc.
	End Point3D `json:"end" yaml:"end" schema:"end,required"`
	// Interior: Interior point of the arc.
	Interior Point3D `json:"interior" yaml:"interior" schema:"interior,required"`
	// Relative: Whether or not interior and end are relative to the previous path position
	Relative bool `json:"relative" yaml:"relative" schema:"relative,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentRadius: Adds an arc from the current position that goes through the given interior point and ends at the given end 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. Arcs can be drawn clockwise when start > end.

type PathSegmentStart added in v0.2.42

type PathSegmentStart struct {
	// Center: The center point of the ellipse.
	Center Point2D `json:"center" yaml:"center" schema:"center,required"`
	// EndAngle: End of the path along the perimeter of the ellipse.
	EndAngle Angle `json:"end_angle" yaml:"end_angle" schema:"end_angle,required"`
	// MajorAxis: Major axis of the ellipse.
	MajorAxis Point2D `json:"major_axis" yaml:"major_axis" schema:"major_axis,required"`
	// MinorRadius: Minor radius of the ellipse.
	MinorRadius float64 `json:"minor_radius" yaml:"minor_radius" schema:"minor_radius,required"`
	// StartAngle: Start of the path along the perimeter of the ellipse.
	StartAngle Angle `json:"start_angle" yaml:"start_angle" schema:"start_angle,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

PathSegmentStart: Adds an elliptical 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 PaymentMethodResultsPage added in v0.2.44

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

PaymentMethodResultsPage: A single page of results

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.CreateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: "some-string", PayAnnually: true})
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.CreateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{DowngradeReason: "", DowngradeReasonText: "some-string", ModelingApp: "some-string", PayAnnually: true})
	if err != nil {
		panic(err)
	}

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

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.DeleteInformationForOrg(); err != nil {
		panic(err)
	}

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.DeleteInformationForUser(); err != nil {
		panic(err)
	}

}

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`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.DeleteMethodForOrg("some-string"); err != nil {
		panic(err)
	}

}

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`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.DeleteMethodForUser("some-string"); err != nil {
		panic(err)
	}

}

func (*PaymentService) GetBalanceForOrg added in v0.2.32

func (s *PaymentService) GetBalanceForOrg(includeTotalDue bool) (*CustomerBalance, error)

GetBalanceForOrg: Get balance for your org. This endpoint requires authentication by any member of an org. It gets the balance information for the authenticated user's org.

Parameters

  • `includeTotalDue`
Example

GetBalanceForOrg: Get balance for your org. This endpoint requires authentication by any member of an org. It gets the balance information for the authenticated user's org.

Parameters

  • `includeTotalDue`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.GetBalanceForOrg(true)
	if err != nil {
		panic(err)
	}

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

}

func (*PaymentService) GetBalanceForUser added in v0.2.3

func (s *PaymentService) GetBalanceForUser(includeTotalDue bool) (*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.

Parameters

  • `includeTotalDue`
Example

GetBalanceForUser: Get balance for your user. This endpoint requires authentication by any Zoo user. It gets the balance information for the authenticated user.

Parameters

  • `includeTotalDue`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.GetBalanceForUser(true)
	if err != nil {
		panic(err)
	}

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

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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 any member of an org. It gets the subscription for the authenticated user's org.

Example

GetOrgSubscription: Get the subscription for an org. This endpoint requires authentication by any member of an org. It gets the subscription for the authenticated user's org.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*PaymentService) GetOrgUsageCollectionThreshold added in v0.2.44

func (s *PaymentService) GetOrgUsageCollectionThreshold() (*AggregateUsageCollectionThresholdView, error)

GetOrgUsageCollectionThreshold: Get the authenticated organization's aggregate-usage collection threshold.

Example

GetOrgUsageCollectionThreshold: Get the authenticated organization's aggregate-usage collection threshold.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.GetOrgUsageCollectionThreshold()
	if err != nil {
		panic(err)
	}

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

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*PaymentService) GetUserUsageCollectionThreshold added in v0.2.44

func (s *PaymentService) GetUserUsageCollectionThreshold() (*AggregateUsageCollectionThresholdView, error)

GetUserUsageCollectionThreshold: Get your personal aggregate-usage collection threshold. The effective threshold is the amount of accrued, unfunded usage that causes an early invoice before the normal billing-period close.

Example

GetUserUsageCollectionThreshold: Get your personal aggregate-usage collection threshold. The effective threshold is the amount of accrued, unfunded usage that causes an early invoice before the normal billing-period close.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.GetUserUsageCollectionThreshold()
	if err != nil {
		panic(err)
	}

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

}

func (*PaymentService) ListInvoicesForOrg added in v0.2.32

func (s *PaymentService) ListInvoicesForOrg(limit int, pageToken string) (*InvoiceResultsPage, error)

ListInvoicesForOrg: List invoices for your org. This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.

Parameters

  • `limit`
  • `pageToken`
Example

ListInvoicesForOrg: List invoices for your org. This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*PaymentService) ListInvoicesForUser added in v0.1.4

func (s *PaymentService) ListInvoicesForUser(limit int, pageToken string) (*InvoiceResultsPage, error)

ListInvoicesForUser: List invoices for your user. This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.

Parameters

  • `limit`
  • `pageToken`
Example

ListInvoicesForUser: List invoices for your user. This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*PaymentService) ListMethodsForOrg added in v0.2.32

func (s *PaymentService) ListMethodsForOrg(limit int, pageToken string) (*PaymentMethodResultsPage, 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, with the valid default card first.

Parameters

  • `limit`
  • `pageToken`
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, with the valid default card first.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*PaymentService) ListMethodsForUser added in v0.1.4

func (s *PaymentService) ListMethodsForUser(limit int, pageToken string) (*PaymentMethodResultsPage, error)

ListMethodsForUser: List payment methods for your user. This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user, with the valid default card first.

Parameters

  • `limit`
  • `pageToken`
Example

ListMethodsForUser: List payment methods for your user. This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user, with the valid default card first.

Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*PaymentService) RedirectMethodPortalLinkForOrg added in v0.2.43

func (s *PaymentService) RedirectMethodPortalLinkForOrg(returnUrl URL) error

RedirectMethodPortalLinkForOrg: Redirect to a fresh Stripe-hosted payment-method update link for your org. If the request is not authenticated, this redirects to website login with a callback back to this endpoint. If authenticated as an org admin, it creates a fresh hosted Stripe portal session and redirects the browser to it.

Parameters

  • `returnUrl`
Example

RedirectMethodPortalLinkForOrg: Redirect to a fresh Stripe-hosted payment-method update link for your org. If the request is not authenticated, this redirects to website login with a callback back to this endpoint. If authenticated as an org admin, it creates a fresh hosted Stripe portal session and redirects the browser to it.

Parameters

  • `returnUrl`
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.RedirectMethodPortalLinkForOrg(kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}); err != nil {
		panic(err)
	}

}

func (*PaymentService) RedirectMethodPortalLinkForUser added in v0.2.43

func (s *PaymentService) RedirectMethodPortalLinkForUser(returnUrl URL) error

RedirectMethodPortalLinkForUser: Redirect to a fresh Stripe-hosted payment-method update link for your user. If the request is not authenticated, this redirects to website login with a callback back to this endpoint. If authenticated, it creates a fresh hosted Stripe portal session and redirects the browser to it.

Parameters

  • `returnUrl`
Example

RedirectMethodPortalLinkForUser: Redirect to a fresh Stripe-hosted payment-method update link for your user. If the request is not authenticated, this redirects to website login with a callback back to this endpoint. If authenticated, it creates a fresh hosted Stripe portal session and redirects the browser to it.

Parameters

  • `returnUrl`
package main

import (
	"net/url"

	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.RedirectMethodPortalLinkForUser(kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}); err != nil {
		panic(err)
	}

}

func (*PaymentService) ResetOrgUsageCollectionThreshold added in v0.2.44

func (s *PaymentService) ResetOrgUsageCollectionThreshold(expectedVersion int) (*AggregateUsageCollectionThresholdView, error)

ResetOrgUsageCollectionThreshold: Restore the default for the authenticated organization's aggregate-usage collection threshold. Parameters

  • `expectedVersion`
Example

ResetOrgUsageCollectionThreshold: Restore the default for the authenticated organization's aggregate-usage collection threshold. Parameters

  • `expectedVersion`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.ResetOrgUsageCollectionThreshold(123)
	if err != nil {
		panic(err)
	}

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

}

func (*PaymentService) ResetUserUsageCollectionThreshold added in v0.2.44

func (s *PaymentService) ResetUserUsageCollectionThreshold(expectedVersion int) (*AggregateUsageCollectionThresholdView, error)

ResetUserUsageCollectionThreshold: Restore the default for your personal aggregate-usage collection threshold. Parameters

  • `expectedVersion`
Example

ResetUserUsageCollectionThreshold: Restore the default for your personal aggregate-usage collection threshold. Parameters

  • `expectedVersion`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.ResetUserUsageCollectionThreshold(123)
	if err != nil {
		panic(err)
	}

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

}

func (*PaymentService) SetDefaultMethodForUser added in v0.2.42

func (s *PaymentService) SetDefaultMethodForUser(id string) error

SetDefaultMethodForUser: Set the default payment method for your user. This endpoint requires authentication by any Zoo user. It sets the default payment method for the authenticated user.

Parameters

  • `id`
Example

SetDefaultMethodForUser: Set the default payment method for your user. This endpoint requires authentication by any Zoo user. It sets the default payment method for the authenticated user.

Parameters

  • `id`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.SetDefaultMethodForUser("some-string"); err != nil {
		panic(err)
	}

}

func (*PaymentService) SetOrgUsageCollectionThreshold added in v0.2.44

SetOrgUsageCollectionThreshold: Set the authenticated organization's aggregate-usage collection threshold. Parameters

  • `body`: An explicit collection-threshold value to configure for an account.
Example

SetOrgUsageCollectionThreshold: Set the authenticated organization's aggregate-usage collection threshold. Parameters

  • `body`: An explicit collection-threshold value to configure for an account.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.SetOrgUsageCollectionThreshold(kittycad.AggregateUsageCollectionThresholdSet{Amount: 123.45, ExpectedVersion: 123})
	if err != nil {
		panic(err)
	}

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

}

func (*PaymentService) SetUserUsageCollectionThreshold added in v0.2.44

SetUserUsageCollectionThreshold: Set your personal aggregate-usage collection threshold. Parameters

  • `body`: An explicit collection-threshold value to configure for an account.
Example

SetUserUsageCollectionThreshold: Set your personal aggregate-usage collection threshold. Parameters

  • `body`: An explicit collection-threshold value to configure for an account.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.SetUserUsageCollectionThreshold(kittycad.AggregateUsageCollectionThresholdSet{Amount: 123.45, ExpectedVersion: 123})
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.UpdateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: "some-string", PayAnnually: true})
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.Payment.UpdateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{DowngradeReason: "", DowngradeReasonText: "some-string", ModelingApp: "some-string", PayAnnually: true})
	if err != nil {
		panic(err)
	}

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

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.ValidateCustomerTaxInformationForOrg(); err != nil {
		panic(err)
	}

}

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.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.Payment.ValidateCustomerTaxInformationForUser(); err != nil {
		panic(err)
	}

}

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"`
	// ZFar: Camera frustum far plane.
	ZFar float64 `json:"z_far" yaml:"z_far" schema:"z_far"`
	// ZNear: Camera frustum near plane.
	ZNear float64 `json:"z_near" yaml:"z_near" schema:"z_near"`
}

PerspectiveCameraParameters: Defines a perspective view.

type PhysicalProperties added in v0.2.44

type PhysicalProperties struct {
	// BoundingBox: The bounding box's center and dimensions, in the requested bounding box output unit.
	BoundingBox BoundingBox `json:"bounding_box" yaml:"bounding_box" schema:"bounding_box,required"`
	// CenterOfMass: The center of mass and its output unit.
	CenterOfMass CenterOfMass `json:"center_of_mass" yaml:"center_of_mass" schema:"center_of_mass,required"`
	// Density: The density and its output unit.
	Density Density `json:"density" yaml:"density" schema:"density,required"`
	// Mass: The mass and its output unit.
	Mass Mass `json:"mass" yaml:"mass" schema:"mass,required"`
	// SurfaceArea: The surface area and its output unit.
	SurfaceArea SurfaceArea `json:"surface_area" yaml:"surface_area" schema:"surface_area,required"`
	// Volume: The volume and its output unit.
	Volume Volume `json:"volume" yaml:"volume" schema:"volume,required"`
}

PhysicalProperties: The physical properties response, containing the same data as the individual property responses.

type PivotPosition added in v0.2.41

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

PivotPosition: A point in 3D space

type PivotRotation added in v0.2.41

type PivotRotation struct {
	// W:
	W float64 `json:"w" yaml:"w" schema:"w,required"`
	// 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"`
}

PivotRotation: A point in homogeneous (4D) space

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"
	// PlanIntervalUnknown: Don't use.
	PlanIntervalUnknown PlanInterval = "unknown"
)

type PlanStep added in v0.2.42

type PlanStep struct {
	// EditInstructions: The edit instructions for the step.
	EditInstructions string `json:"edit_instructions" yaml:"edit_instructions" schema:"edit_instructions,required"`
	// FilepathToEdit: The file path it's editing.
	FilepathToEdit string `json:"filepath_to_edit" yaml:"filepath_to_edit" schema:"filepath_to_edit,required"`
}

PlanStep: A step in the design plan.

type Plane added in v0.2.44

type Plane struct {
	// ID: Plane ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
}

Plane is the type definition for a Plane.

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 PlaneSetColor added in v0.2.38

type PlaneSetColor struct {
}

PlaneSetColor: The response from the `PlaneSetColor` endpoint.

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 Point added in v0.2.42

type Point struct {
	// Point: The point to extrude to.
	Point Point3D `json:"point" yaml:"point" schema:"point,required"`
}

Point is the type definition for a Point.

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 Point4D added in v0.2.34

type Point4D struct {
	// W:
	W float64 `json:"w" yaml:"w" schema:"w,required"`
	// 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"`
}

Point4D: A point in homogeneous (4D) 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 PrimitiveTopologyFallback added in v0.2.44

type PrimitiveTopologyFallback struct {
	// ParentID: UUID of the parent entity that owns the primitive (solid3d, solid2d, or path).
	ParentID UUID `json:"parent_id" yaml:"parent_id" schema:"parent_id,required"`
	// PrimitiveIndex: Index of the face, edge, vertex, profile curve, or path segment on `parent_id`.
	PrimitiveIndex int `json:"primitive_index" yaml:"primitive_index" schema:"primitive_index,required"`
}

PrimitiveTopologyFallback: Optional fallback when primary UUIDs are missing from the client artifact graph (e.g. stale or engine-only ids). Identifies the same topology via a **parent** entity UUID and a **primitive index** on that parent. Semantics by selection kind (aligned with engine BREP topology):

- **Face / Edge (3D)**: `parent_id` is the owning [`EntityType::Solid3D`] body UUID; `primitive_index` matches the index returned by **EntityGetPrimitiveIndex** for that face or edge (and matches **EntityGetParentId** → parent + **EntityGetPrimitiveIndex** → index). - **Vertex (3D)**: same `parent_id` (solid); `primitive_index` is the BREP vertex index on that solid. - **Solid2dEdge**: `parent_id` is the **Solid2D** profile UUID; `primitive_index` is the curve index within that profile. - **Segment**: `parent_id` is the **Path** UUID; `primitive_index` is the curve index within that path.

Other [`EntityReference`] variants may omit this field or leave it unset when not applicable.

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 ProjectAccessResponse added in v0.2.44

type ProjectAccessResponse struct {
	// CanDelete: Whether the caller may delete the project.
	CanDelete bool `json:"can_delete" yaml:"can_delete" schema:"can_delete,required"`
	// CanEdit: Whether the caller may replace project content or metadata.
	CanEdit bool `json:"can_edit" yaml:"can_edit" schema:"can_edit,required"`
	// CanManageOrganization: Whether the caller may move the project into or out of an organization library.
	CanManageOrganization bool `json:"can_manage_organization" yaml:"can_manage_organization" schema:"can_manage_organization,required"`
	// OrganizationID: Owning organization when this is an organization project.
	OrganizationID UUID `json:"organization_id" yaml:"organization_id" schema:"organization_id"`
	// Scope: Ownership scope controlling project visibility.
	Scope ProjectAccessScope `json:"scope" yaml:"scope" schema:"scope,required"`
}

ProjectAccessResponse: Effective capabilities for an authenticated project response.

type ProjectAccessScope added in v0.2.44

type ProjectAccessScope string

ProjectAccessScope: Ownership scope for an authenticated project response.

const (
	// ProjectAccessScopePersonal: The project is owned personally by its creator.
	ProjectAccessScopePersonal ProjectAccessScope = "personal"
	// ProjectAccessScopeOrganization: The project is owned by an organization.
	ProjectAccessScopeOrganization ProjectAccessScope = "organization"
)

type ProjectArchiveFormat added in v0.2.43

type ProjectArchiveFormat string

ProjectArchiveFormat: Archive formats supported by project download endpoints.

const (
	// ProjectArchiveFormatTar: Return a tar archive.
	ProjectArchiveFormatTar ProjectArchiveFormat = "tar"
	// ProjectArchiveFormatZip: Return a zip archive.
	ProjectArchiveFormatZip ProjectArchiveFormat = "zip"
)

type ProjectCategoryResponse added in v0.2.43

type ProjectCategoryResponse struct {
	// Description: Optional helper text shown to users choosing a category.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// DisplayName: Human-readable category name.
	DisplayName string `json:"display_name" yaml:"display_name" schema:"display_name,required"`
	// ID: Unique category identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Slug: Stable URL-safe category slug.
	Slug string `json:"slug" yaml:"slug" schema:"slug,required"`
	// SortOrder: Sort order used when presenting categories in clients.
	SortOrder int `json:"sort_order" yaml:"sort_order" schema:"sort_order,required"`
}

ProjectCategoryResponse: Active category metadata available for project submission flows.

type ProjectCategoryResponseResultsPage added in v0.2.45

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

ProjectCategoryResponseResultsPage: A single page of results

type ProjectEntityToPlane added in v0.2.40

type ProjectEntityToPlane struct {
	// ProjectedPoints: Projected points.
	ProjectedPoints []Point3D `json:"projected_points" yaml:"projected_points" schema:"projected_points,required"`
}

ProjectEntityToPlane: The response from the `ProjectEntityToPlane` command.

type ProjectFileResponse added in v0.2.43

type ProjectFileResponse struct {
	// ByteSize: File size in bytes.
	ByteSize int `json:"byte_size" yaml:"byte_size" schema:"byte_size,required"`
	// ContentType: Stored MIME type.
	ContentType string `json:"content_type" yaml:"content_type" schema:"content_type,required"`
	// CreatedAt: File creation timestamp.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// FileRole: Logical role within the project.
	FileRole KclProjectFileRole `json:"file_role" yaml:"file_role" schema:"file_role,required"`
	// ID: Unique file identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// RelativePath: Relative path as seen inside the project.
	RelativePath string `json:"relative_path" yaml:"relative_path" schema:"relative_path,required"`
	// Sha256: Hex-encoded SHA-256 of the stored contents, when known.
	Sha256 string `json:"sha256" yaml:"sha256" schema:"sha256"`
	// SortOrder: Stable ordering hint.
	SortOrder int `json:"sort_order" yaml:"sort_order" schema:"sort_order,required"`
	// UpdatedAt: File last update timestamp.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

ProjectFileResponse: Owner-visible metadata for one stored project file.

type ProjectPointsToPlane added in v0.2.40

type ProjectPointsToPlane struct {
	// ProjectedPoints: Projected points.
	ProjectedPoints []Point3D `json:"projected_points" yaml:"projected_points" schema:"projected_points,required"`
}

ProjectPointsToPlane: The response from the `ProjectPointsToPlane` command.

type ProjectPublicationInfoResponse added in v0.2.43

type ProjectPublicationInfoResponse struct {
	// Feedback: Moderator feedback when changes have been requested, if any.
	Feedback string `json:"feedback" yaml:"feedback" schema:"feedback"`
	// HasUnpublishedChanges: Whether the current editable draft differs from the last live version.
	HasUnpublishedChanges bool `json:"has_unpublished_changes" yaml:"has_unpublished_changes" schema:"has_unpublished_changes,required"`
	// LastPublishedAt: When a version of this project most recently became public.
	LastPublishedAt Time `json:"last_published_at" yaml:"last_published_at" schema:"last_published_at"`
	// LastPublishedVersionID: Last version that successfully went live for this project.
	LastPublishedVersionID UUID `json:"last_published_version_id" yaml:"last_published_version_id" schema:"last_published_version_id"`
	// SubmittedAt: When the current version was most recently submitted for review.
	SubmittedAt Time `json:"submitted_at" yaml:"submitted_at" schema:"submitted_at"`
}

ProjectPublicationInfoResponse: Owner-facing publication metadata for a project.

type ProjectResponse added in v0.2.43

type ProjectResponse struct {
	// Access: Effective project capabilities for the authenticated caller.
	Access ProjectAccessResponse `json:"access" yaml:"access" schema:"access,required"`
	// CategoryIds: Selected category identifiers associated with the project.
	CategoryIds []UUID `json:"category_ids" yaml:"category_ids" schema:"category_ids,required"`
	// CreatedAt: When the project row was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Description: User-facing project description.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// EntrypointPath: Relative path to the entrypoint KCL file.
	EntrypointPath string `json:"entrypoint_path" yaml:"entrypoint_path" schema:"entrypoint_path,required"`
	// Files: Project files currently stored for the owner-visible draft.
	Files []ProjectFileResponse `json:"files" yaml:"files" schema:"files,required"`
	// ID: Unique project identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// PreviewStatus: Current preview generation state.
	PreviewStatus KclProjectPreviewStatus `json:"preview_status" yaml:"preview_status" schema:"preview_status,required"`
	// PreviewUrl: Stable authenticated thumbnail URL, when one exists.
	PreviewUrl string `json:"preview_url" yaml:"preview_url" schema:"preview_url"`
	// ProjectTomlPath: Relative path to the project's manifest file.
	ProjectTomlPath string `json:"project_toml_path" yaml:"project_toml_path" schema:"project_toml_path,required"`
	// Publication: Owner-facing publication metadata for the current and last live version.
	Publication ProjectPublicationInfoResponse `json:"publication" yaml:"publication" schema:"publication,required"`
	// PublicationStatus: Current publication workflow state.
	PublicationStatus KclProjectPublicationStatus `json:"publication_status" yaml:"publication_status" schema:"publication_status,required"`
	// Revision: Opaque revision token for optimistic project mutations.
	Revision string `json:"revision" yaml:"revision" schema:"revision,required"`
	// Title: User-facing project title.
	Title string `json:"title" yaml:"title" schema:"title,required"`
	// UpdatedAt: When the project row was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

ProjectResponse: Owner-visible project detail payload.

type ProjectRevisionUpdated added in v0.2.44

type ProjectRevisionUpdated struct {
	// Files: Complete canonical project contents.
	Files map[string][]int `json:"files" yaml:"files" schema:"files,required"`
	// ProjectRevision: Canonical revision represented by `files`.
	ProjectRevision MlCopilotProjectRevision `json:"project_revision" yaml:"project_revision" schema:"project_revision,required"`
}

ProjectRevisionUpdated is the type definition for a ProjectRevisionUpdated.

type ProjectService added in v0.2.43

type ProjectService service

ProjectService: Operations for user-owned projects, public project discovery, publishing, voting, and share links.

func (*ProjectService) Create added in v0.2.43

func (s *ProjectService) Create(body *MultipartForm) (*ProjectResponse, error)

Create: Create a draft project for the authenticated user. Parameters

  • `body`
Example

Create: Create a draft project for the authenticated user. Parameters

  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

	result, err := client.Project.Create(form)
	if err != nil {
		panic(err)
	}

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

}

func (*ProjectService) CreatePublicVote added in v0.2.43

func (s *ProjectService) CreatePublicVote(id UUID) (*PublicProjectVoteResponse, error)

CreatePublicVote: Add the authenticated user's upvote to a published community project. Parameters

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

CreatePublicVote: Add the authenticated user's upvote to a published community project. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

CreateShareLink: Create a share link for one of the authenticated user's projects. Parameters

  • `id`: A UUID usually v4 or v7
  • `body`: Request payload for creating a new project share link.

func (*ProjectService) CreateVersion added in v0.2.45

func (s *ProjectService) CreateVersion(id UUID, body *MultipartForm) (*CreateProjectVersionResponse, error)

CreateVersion: Save an alternate project version without changing the current version. For a history A -> B -> C with C current, saving D with B as its parent creates a second child of B. C stays current. Publications and share links keep pointing to their existing versions.

Send a multipart request with a JSON `body` part and file parts. Upload the complete replacement snapshot, including unchanged files. Each uploaded filename must be its relative project path.

Example JSON for the `body` part (replace the parent placeholder with B's UUID):

```json { "parent_version_id": "<B_VERSION_ID>", "title": "Alternative design", "description": "Trying another shape", "entrypoint_path": "main.kcl", "deleted_paths": ["obsolete.kcl"] } ```

`parent_version_id` and `title` are required. Description defaults to an empty string, and the entrypoint defaults to `main.kcl`. When supplying `deleted_paths`, list all files removed from the chosen parent B, regardless of the files in current C. An empty list declares that no files were removed; omitting the field skips this deletion-intent check.

Save the JSON as `save-metadata.json`. With D's files in the working directory, set `API_BASE_URL`, `API_TOKEN`, and `PROJECT_ID`, then generate `SAVE_KEY` once for this save (for example, using `uuidgen`):

```sh curl --fail-with-body \ --request POST "${API_BASE_URL}/user/projects/${PROJECT_ID}/versions" \ --header "Authorization: Bearer ${API_TOKEN}" \ --header "Idempotency-Key: ${SAVE_KEY}" \ --form 'body=<save-metadata.json;type=application/json' \ --form 'file-0=@project.toml;filename=project.toml' \ --form 'file-1=@main.kcl;filename=main.kcl' \ --form 'file-2=@part.kcl;filename=part.kcl' ```

The HTTP 200 response contains `version_id` (D) and `current_version_id` (C, or the current version when the response is prepared). Read D through `GET /user/projects/{id}/versions/{version_id}` and download it through `GET /user/projects/{id}/versions/{version_id}/download`. Downloads default to TAR; use `?format=zip` for ZIP.

`Idempotency-Key` is optional for all clients. Use a unique key for each save to avoid duplicate versions when retrying. Retain the key, metadata, and submitted file contents across app restarts until the save's outcome is known. Within 24 hours of a successful save, retrying with the same key and contents returns the same version. Changed contents require a new key; reusing an unexpired key with different contents returns HTTP 409 with `IdempotencyConflict`. Without a key, or after its window expires, resending the request can create another version.

Write access to the project is required, including for retries. A public listing or share link does not grant access to private version history. There is no endpoint to promote an existing alternate version directly to current.

Parameters

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

CreateVersion: Save an alternate project version without changing the current version. For a history A -> B -> C with C current, saving D with B as its parent creates a second child of B. C stays current. Publications and share links keep pointing to their existing versions.

Send a multipart request with a JSON `body` part and file parts. Upload the complete replacement snapshot, including unchanged files. Each uploaded filename must be its relative project path.

Example JSON for the `body` part (replace the parent placeholder with B's UUID):

```json { "parent_version_id": "<B_VERSION_ID>", "title": "Alternative design", "description": "Trying another shape", "entrypoint_path": "main.kcl", "deleted_paths": ["obsolete.kcl"] } ```

`parent_version_id` and `title` are required. Description defaults to an empty string, and the entrypoint defaults to `main.kcl`. When supplying `deleted_paths`, list all files removed from the chosen parent B, regardless of the files in current C. An empty list declares that no files were removed; omitting the field skips this deletion-intent check.

Save the JSON as `save-metadata.json`. With D's files in the working directory, set `API_BASE_URL`, `API_TOKEN`, and `PROJECT_ID`, then generate `SAVE_KEY` once for this save (for example, using `uuidgen`):

```sh curl --fail-with-body \ --request POST "${API_BASE_URL}/user/projects/${PROJECT_ID}/versions" \ --header "Authorization: Bearer ${API_TOKEN}" \ --header "Idempotency-Key: ${SAVE_KEY}" \ --form 'body=<save-metadata.json;type=application/json' \ --form 'file-0=@project.toml;filename=project.toml' \ --form 'file-1=@main.kcl;filename=main.kcl' \ --form 'file-2=@part.kcl;filename=part.kcl' ```

The HTTP 200 response contains `version_id` (D) and `current_version_id` (C, or the current version when the response is prepared). Read D through `GET /user/projects/{id}/versions/{version_id}` and download it through `GET /user/projects/{id}/versions/{version_id}/download`. Downloads default to TAR; use `?format=zip` for ZIP.

`Idempotency-Key` is optional for all clients. Use a unique key for each save to avoid duplicate versions when retrying. Retain the key, metadata, and submitted file contents across app restarts until the save's outcome is known. Within 24 hours of a successful save, retrying with the same key and contents returns the same version. Changed contents require a new key; reusing an unexpired key with different contents returns HTTP 409 with `IdempotencyConflict`. Without a key, or after its window expires, resending the request can create another version.

Write access to the project is required, including for retries. A public listing or share link does not grant access to private version history. There is no endpoint to promote an existing alternate version directly to current.

Parameters

  • `id`: A UUID usually v4 or v7
  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

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

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

}

func (*ProjectService) Delete added in v0.2.43

func (s *ProjectService) Delete(id UUID) error

Delete: Delete one of the authenticated user's projects. Parameters

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

Delete: Delete one of the authenticated user's projects. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) DeleteOrganization added in v0.2.44

func (s *ProjectService) DeleteOrganization(id UUID) error

DeleteOrganization: Move an organization project back to its creator's personal library. Organization administrators may perform this move to revoke organization access. The project ID, current revision, files, and version history remain unchanged.

Parameters

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

DeleteOrganization: Move an organization project back to its creator's personal library. Organization administrators may perform this move to revoke organization access. The project ID, current revision, files, and version history remain unchanged.

Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) DeletePublicVote added in v0.2.43

func (s *ProjectService) DeletePublicVote(id UUID) (*PublicProjectVoteResponse, error)

DeletePublicVote: Remove the authenticated user's upvote from a published community project. Parameters

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

DeletePublicVote: Remove the authenticated user's upvote from a published community project. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}
func (s *ProjectService) DeleteShareLink(id UUID, key string) error

DeleteShareLink: Delete one share link for one of the authenticated user's projects. Parameters

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

func (*ProjectService) Download added in v0.2.43

func (s *ProjectService) Download(id UUID, format ProjectArchiveFormat) error

Download: Download one of the authenticated user's projects as a tar archive. Parameters

  • `id`: A UUID usually v4 or v7
  • `format`: Archive formats supported by project download endpoints.
Example

Download: Download one of the authenticated user's projects as a tar archive. Parameters

  • `id`: A UUID usually v4 or v7
  • `format`: Archive formats supported by project download endpoints.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) DownloadPublic added in v0.2.43

func (s *ProjectService) DownloadPublic(id UUID, format ProjectArchiveFormat) error

DownloadPublic: Download a published public project as a tar archive. Parameters

  • `id`: A UUID usually v4 or v7
  • `format`: Archive formats supported by project download endpoints.
Example

DownloadPublic: Download a published public project as a tar archive. Parameters

  • `id`: A UUID usually v4 or v7
  • `format`: Archive formats supported by project download endpoints.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) DownloadVersion added in v0.2.44

func (s *ProjectService) DownloadVersion(id UUID, versionId UUID, format ProjectArchiveFormat) error

DownloadVersion: Download the files saved in one project version. Parameters

  • `id`: A UUID usually v4 or v7
  • `versionId`: A UUID usually v4 or v7
  • `format`: Archive formats supported by project download endpoints.
Example

DownloadVersion: Download the files saved in one project version. Parameters

  • `id`: A UUID usually v4 or v7
  • `versionId`: A UUID usually v4 or v7
  • `format`: Archive formats supported by project download endpoints.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) Get added in v0.2.43

func (s *ProjectService) Get(id UUID) (*ProjectResponse, error)

Get: Get one of the authenticated user's projects. Parameters

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

Get: Get one of the authenticated user's projects. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) GetPublic added in v0.2.43

func (s *ProjectService) GetPublic(id UUID) (*PublicProjectResponse, error)

GetPublic: Get one publicly visible community project. Parameters

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

GetPublic: Get one publicly visible community project. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) GetPublicThumbnail added in v0.2.43

func (s *ProjectService) GetPublicThumbnail(id UUID) error

GetPublicThumbnail: Fetch the public thumbnail for a published project. Parameters

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

GetPublicThumbnail: Fetch the public thumbnail for a published project. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) GetThumbnail added in v0.2.43

func (s *ProjectService) GetThumbnail(id UUID) error

GetThumbnail: Fetch the authenticated owner's current project thumbnail. Parameters

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

GetThumbnail: Fetch the authenticated owner's current project thumbnail. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) GetVersion added in v0.2.44

func (s *ProjectService) GetVersion(id UUID, versionId UUID) (*ProjectVersionDetailResponse, error)

GetVersion: Get metadata and files for a single saved project version. Parameters

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

GetVersion: Get metadata and files for a single saved project version. Parameters

  • `id`: A UUID usually v4 or v7
  • `versionId`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) GetVersionThumbnail added in v0.2.44

func (s *ProjectService) GetVersionThumbnail(id UUID, versionId UUID) error

GetVersionThumbnail: Fetch the thumbnail for a single saved project version. Parameters

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

GetVersionThumbnail: Fetch the thumbnail for a single saved project version. Parameters

  • `id`: A UUID usually v4 or v7
  • `versionId`: A UUID usually v4 or v7
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

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

}

func (*ProjectService) List added in v0.2.43

func (s *ProjectService) List(limit int, pageToken string) (*ProjectSummaryResponseResultsPage, error)

List: List the authenticated user's projects. Parameters

  • `limit`
  • `pageToken`
Example

List: List the authenticated user's projects. Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) ListCategories added in v0.2.43

func (s *ProjectService) ListCategories(limit int, pageToken string) (*ProjectCategoryResponseResultsPage, error)

ListCategories: List the active categories available for project submissions. Parameters

  • `limit`
  • `pageToken`
Example

ListCategories: List the active categories available for project submissions. Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) ListPublic added in v0.2.43

func (s *ProjectService) ListPublic(limit int, pageToken string) (*PublicProjectResponseResultsPage, error)

ListPublic: List publicly visible community projects for the website/gallery. Parameters

  • `limit`
  • `pageToken`
Example

ListPublic: List publicly visible community projects for the website/gallery. Parameters

  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}
func (s *ProjectService) ListShareLinks(id UUID, limit int, pageToken string) (*ProjectShareLinkResponseResultsPage, error)

ListShareLinks: List share links for one of the authenticated user's projects. Parameters

  • `id`: A UUID usually v4 or v7
  • `limit`
  • `pageToken`

func (*ProjectService) ListVersions added in v0.2.44

func (s *ProjectService) ListVersions(id UUID, limit int, pageToken string) (*ProjectVersionSummaryResponseResultsPage, error)

ListVersions: List a project's saved versions, newest first. Requires access to the project. Public visibility or link sharing will not grant access to history.

Parameters

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

ListVersions: List a project's saved versions, newest first. Requires access to the project. Public visibility or link sharing will not grant access to history.

Parameters

  • `id`: A UUID usually v4 or v7
  • `limit`
  • `pageToken`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) Publish added in v0.2.43

func (s *ProjectService) Publish(id UUID) (*ProjectResponse, error)

Publish: Submit one of the authenticated user's projects for public review. Parameters

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

Publish: Submit one of the authenticated user's projects for public review. Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

func (*ProjectService) Update added in v0.2.43

func (s *ProjectService) Update(id UUID, body *MultipartForm) (*ProjectResponse, error)

Update: Replace one of the authenticated user's projects. Parameters

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

Update: Replace one of the authenticated user's projects. Parameters

  • `id`: A UUID usually v4 or v7
  • `body`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	form := kittycad.NewMultipartForm()

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

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

}

func (*ProjectService) UpdateOrganization added in v0.2.44

func (s *ProjectService) UpdateOrganization(id UUID) (*ProjectResponse, error)

UpdateOrganization: Move one of the authenticated user's projects into their active organization library. This changes only the project's ownership scope. The project ID, current revision, files, and version history remain unchanged so cloud bindings stay valid across the move.

Parameters

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

UpdateOrganization: Move one of the authenticated user's projects into their active organization library. This changes only the project's ownership scope. The project ID, current revision, files, and version history remain unchanged so cloud bindings stay valid across the move.

Parameters

  • `id`: A UUID usually v4 or v7
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

type ProjectShareLinkResponse added in v0.2.43

type ProjectShareLinkResponse struct {
	// AccessMode: Access policy for the share link.
	AccessMode KclProjectShareLinkAccessMode `json:"access_mode" yaml:"access_mode" schema:"access_mode,required"`
	// CreatedAt: Share-link creation timestamp.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Key: Opaque identifier used in the public shared URL.
	Key string `json:"key" yaml:"key" schema:"key,required"`
	// UpdatedAt: Share-link last update timestamp.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
	// Url: Fully-qualified URL that can be shared.
	Url URL `json:"url" yaml:"url" schema:"url,required"`
}

ProjectShareLinkResponse: Owner-visible share-link metadata for project downloads.

type ProjectShareLinkResponseResultsPage added in v0.2.44

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

ProjectShareLinkResponseResultsPage: A single page of results

type ProjectSnapshotResult added in v0.2.44

type ProjectSnapshotResult struct {
	// CanonicalFiles: Complete canonical contents after processing the snapshot. Present when the client must apply or reconcile a different state. `Some({})` explicitly represents an empty canonical project.
	CanonicalFiles map[string][]int `json:"canonical_files" yaml:"canonical_files" schema:"canonical_files"`
	// ConflictingPaths: Paths that could not be merged automatically.
	ConflictingPaths []string `json:"conflicting_paths" yaml:"conflicting_paths" schema:"conflicting_paths"`
	// ProjectRevision: Canonical revision after processing the snapshot.
	ProjectRevision MlCopilotProjectRevision `json:"project_revision" yaml:"project_revision" schema:"project_revision,required"`
	// SnapshotID: Idempotency key from the submitted snapshot.
	SnapshotID string `json:"snapshot_id" yaml:"snapshot_id" schema:"snapshot_id,required"`
	// Status: How the submitted snapshot affected canonical state.
	Status MlCopilotProjectSnapshotStatus `json:"status" yaml:"status" schema:"status,required"`
}

ProjectSnapshotResult is the type definition for a ProjectSnapshotResult.

type ProjectSummaryResponse added in v0.2.43

type ProjectSummaryResponse struct {
	// Access: Effective project capabilities for the authenticated caller.
	Access ProjectAccessResponse `json:"access" yaml:"access" schema:"access,required"`
	// CategoryIds: Selected category identifiers associated with the project.
	CategoryIds []UUID `json:"category_ids" yaml:"category_ids" schema:"category_ids,required"`
	// CreatedAt: When the project row was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Description: User-facing project description.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// EntrypointPath: Relative path to the entrypoint KCL file.
	EntrypointPath string `json:"entrypoint_path" yaml:"entrypoint_path" schema:"entrypoint_path,required"`
	// ID: Unique project identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// PreviewStatus: Current preview generation state.
	PreviewStatus KclProjectPreviewStatus `json:"preview_status" yaml:"preview_status" schema:"preview_status,required"`
	// PreviewUrl: Stable authenticated thumbnail URL, when one exists.
	PreviewUrl string `json:"preview_url" yaml:"preview_url" schema:"preview_url"`
	// ProjectTomlPath: Relative path to the project's manifest file.
	ProjectTomlPath string `json:"project_toml_path" yaml:"project_toml_path" schema:"project_toml_path,required"`
	// Publication: Owner-facing publication metadata for the current and last live version.
	Publication ProjectPublicationInfoResponse `json:"publication" yaml:"publication" schema:"publication,required"`
	// PublicationStatus: Current publication workflow state.
	PublicationStatus KclProjectPublicationStatus `json:"publication_status" yaml:"publication_status" schema:"publication_status,required"`
	// Revision: Opaque revision token for optimistic project mutations.
	Revision string `json:"revision" yaml:"revision" schema:"revision,required"`
	// Title: User-facing project title.
	Title string `json:"title" yaml:"title" schema:"title,required"`
	// UpdatedAt: When the project row was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}

ProjectSummaryResponse: Owner-visible project summary payload.

type ProjectSummaryResponseResultsPage added in v0.2.45

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

ProjectSummaryResponseResultsPage: A single page of results

type ProjectUpdated added in v0.2.42

type ProjectUpdated struct {
	// Files: Map of file paths to their latest contents. The file contents are not encoded since kcl files are not binary.
	Files map[string]string `json:"files" yaml:"files" schema:"files,required"`
}

ProjectUpdated is the type definition for a ProjectUpdated.

type ProjectVersionDetailResponse added in v0.2.44

type ProjectVersionDetailResponse struct {
	// AncestryStatus: Whether this is a root, has a recorded parent, or has unknown ancestry.
	AncestryStatus KclProjectVersionAncestryStatus `json:"ancestry_status" yaml:"ancestry_status" schema:"ancestry_status,required"`
	// CreatedAt: When this version was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// Description: Description saved with this version.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// EntrypointPath: Relative path to this version's KCL entrypoint.
	EntrypointPath string `json:"entrypoint_path" yaml:"entrypoint_path" schema:"entrypoint_path,required"`
	// Files: Files stored for this version.
	Files []ProjectFileResponse `json:"files" yaml:"files" schema:"files,required"`
	// ID: Unique identifier of this version.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// IsCurrent: Whether this is the project's current version.
	IsCurrent bool `json:"is_current" yaml:"is_current" schema:"is_current,required"`
	// ParentVersionID: Version this save was based on, when known.
	ParentVersionID UUID `json:"parent_version_id" yaml:"parent_version_id" schema:"parent_version_id"`
	// PreviewStatus: Preview generation state for this version.
	PreviewStatus KclProjectPreviewStatus `json:"preview_status" yaml:"preview_status" schema:"preview_status,required"`
	// PreviewUrl: URL for this version's preview, when a preview file is available.
	PreviewUrl string `json:"preview_url" yaml:"preview_url" schema:"preview_url"`
	// ProjectTomlPath: Relative path to this version's project manifest.
	ProjectTomlPath string `json:"project_toml_path" yaml:"project_toml_path" schema:"project_toml_path,required"`
	// Title: Title saved with this version.
	Title string `json:"title" yaml:"title" schema:"title,required"`
}

ProjectVersionDetailResponse: Metadata and files for one saved project version.

type ProjectVersionSummaryResponse added in v0.2.44

type ProjectVersionSummaryResponse struct {
	// AncestryStatus: Whether this is a root, has a recorded parent, or has unknown ancestry.
	AncestryStatus KclProjectVersionAncestryStatus `json:"ancestry_status" yaml:"ancestry_status" schema:"ancestry_status,required"`
	// CreatedAt: When this version was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: Unique identifier of this version.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// IsCurrent: Whether this is the project's current version.
	IsCurrent bool `json:"is_current" yaml:"is_current" schema:"is_current,required"`
	// ParentVersionID: Version this save was based on, when known.
	ParentVersionID UUID `json:"parent_version_id" yaml:"parent_version_id" schema:"parent_version_id"`
	// PreviewStatus: Preview generation state for this version.
	PreviewStatus KclProjectPreviewStatus `json:"preview_status" yaml:"preview_status" schema:"preview_status,required"`
	// Title: Title saved with this version.
	Title string `json:"title" yaml:"title" schema:"title,required"`
}

ProjectVersionSummaryResponse: A saved version in a project's history.

type ProjectVersionSummaryResponseResultsPage added in v0.2.44

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

ProjectVersionSummaryResponseResultsPage: A single page of results

type PublicEmailMarketingConsentRequest added in v0.2.43

type PublicEmailMarketingConsentRequest struct {
	// Email: The email
	Email string `json:"email" yaml:"email" schema:"email,required"`
}

PublicEmailMarketingConsentRequest: The data for subscribing a user to the newsletter.

type PublicMailingListMembershipRequest added in v0.2.43

type PublicMailingListMembershipRequest struct {
	// Email: Email address to add or remove.
	Email string `json:"email" yaml:"email" schema:"email,required"`
}

PublicMailingListMembershipRequest: Request body for public mailing-list membership changes.

type PublicProjectOwnerResponse added in v0.2.43

type PublicProjectOwnerResponse struct {
	// Username: Community-facing username/handle.
	Username string `json:"username" yaml:"username" schema:"username,required"`
}

PublicProjectOwnerResponse: Public creator metadata for community project listings.

type PublicProjectResponse added in v0.2.43

type PublicProjectResponse struct {
	// Categories: Selected public categories.
	Categories []ProjectCategoryResponse `json:"categories" yaml:"categories" schema:"categories,required"`
	// Description: Public project description.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// ID: Unique project identifier.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// LikeCount: Current total public like count for the project.
	LikeCount int `json:"like_count" yaml:"like_count" schema:"like_count,required"`
	// Liked: Whether the authenticated viewer currently likes the project.
	Liked bool `json:"liked" yaml:"liked" schema:"liked"`
	// Owner: Public creator metadata.
	Owner PublicProjectOwnerResponse `json:"owner" yaml:"owner" schema:"owner,required"`
	// PreviewUrl: Stable public thumbnail URL, when one exists.
	PreviewUrl string `json:"preview_url" yaml:"preview_url" schema:"preview_url"`
	// PublishedAt: When the project was published publicly.
	PublishedAt Time `json:"published_at" yaml:"published_at" schema:"published_at,required"`
	// Title: Public project title.
	Title string `json:"title" yaml:"title" schema:"title,required"`
}

PublicProjectResponse: Public community project metadata for gallery listings.

type PublicProjectResponseResultsPage added in v0.2.44

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

PublicProjectResponseResultsPage: A single page of results

type PublicProjectVoteResponse added in v0.2.43

type PublicProjectVoteResponse struct {
	// LikeCount: Current total public like count for the project.
	LikeCount int `json:"like_count" yaml:"like_count" schema:"like_count,required"`
	// Liked: Whether the authenticated viewer currently likes the project.
	Liked bool `json:"liked" yaml:"liked" schema:"liked,required"`
}

PublicProjectVoteResponse: Signed-in viewer vote state for a public project.

type QueryEntityType added in v0.2.44

type QueryEntityType struct {
	// Reference: How to reference the provided entity using face ids.
	Reference any `json:"reference" yaml:"reference" schema:"reference,required"`
}

QueryEntityType: The response from the `QueryEntityType` command.

type QueryEntityTypeWithPoint added in v0.2.44

type QueryEntityTypeWithPoint struct {
	// Reference: How to reference the selected entity using face ids. None if no entity was found at the given point (e.g. clicked in empty space).
	Reference any `json:"reference" yaml:"reference" schema:"reference"`
}

QueryEntityTypeWithPoint: The response from the `QueryEntityTypeWithPoint` command.

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. See the command that emits this type for its response encoding.

type ReasoningMessage added in v0.2.42

type ReasoningMessage any

ReasoningMessage: ReasoningMessage: A message containing reasoning information.

type ReasoningMessageCode added in v0.2.44

type ReasoningMessageCode struct {
	// Content: The content of the file.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// FileName: The file name.
	FileName string `json:"file_name" yaml:"file_name" schema:"file_name,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageCode: A project file that is being updated by the AI. This does not contain KCL code.

type ReasoningMessageContent added in v0.2.42

type ReasoningMessageContent struct {
	// Content: The content of the reasoning.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageContent: Plain text reasoning.

type ReasoningMessageDesignPlan added in v0.2.44

type ReasoningMessageDesignPlan struct {
	// Content: The content of the file.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// FileName: The file name.
	FileName string `json:"file_name" yaml:"file_name" schema:"file_name,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageDesignPlan: A project file that is being created by the AI. This does not contain KCL code.

type ReasoningMessageFeatureTreeOutline added in v0.2.42

type ReasoningMessageFeatureTreeOutline struct {
	// Content: The content of the file.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// FileName: The file name.
	FileName string `json:"file_name" yaml:"file_name" schema:"file_name,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageFeatureTreeOutline: A KCL file that is being updated by the AI. This might contain invalid KCL code.

type ReasoningMessageGeneratedKclCode added in v0.2.44

type ReasoningMessageGeneratedKclCode struct {
	// FileName: The file name.
	FileName string `json:"file_name" yaml:"file_name" schema:"file_name,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageGeneratedKclCode: A project file that is being deleted by the AI.

type ReasoningMessageKclCodeExamples added in v0.2.42

type ReasoningMessageKclCodeExamples struct {
	// Error: The error message.
	Error string `json:"error" yaml:"error" schema:"error,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageKclCodeExamples: Reasoning containing an error message from executing the KCL code.

type ReasoningMessageKclDocs added in v0.2.42

type ReasoningMessageKclDocs struct {
	// Steps: The steps in the design plan.
	Steps []PlanStep `json:"steps" yaml:"steps" schema:"steps,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageKclDocs: Reasoning that contains a design plan with steps.

type ReasoningMessageMarkdown added in v0.2.42

type ReasoningMessageMarkdown struct {
	// Content: The content of the reasoning.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageMarkdown: Reasoning that contains the KCL code examples relevant to the reasoning.

type ReasoningMessageReasoningMessageContent added in v0.2.42

type ReasoningMessageReasoningMessageContent struct {
	// Content: The content of the file.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// FileName: The file name.
	FileName string `json:"file_name" yaml:"file_name" schema:"file_name,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageReasoningMessageContent: A KCL file that is being created by the AI. This might contain invalid KCL code.

type ReasoningMessageSteps added in v0.2.42

type ReasoningMessageSteps struct {
	// FileName: The file name.
	FileName string `json:"file_name" yaml:"file_name" schema:"file_name,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageSteps: A KCL file that is being deleted by the AI.

type ReasoningMessageText added in v0.2.42

type ReasoningMessageText struct {
	// Content: The content of the reasoning.
	Content string `json:"content" yaml:"content" schema:"content,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

ReasoningMessageText: Markdown formatted reasoning.

type ReconfigureStream added in v0.2.38

type ReconfigureStream struct {
}

ReconfigureStream: The response from the `ReconfigureStream` endpoint.

type RegionGetQueryPoint added in v0.2.43

type RegionGetQueryPoint struct {
	// QueryPoint: A point that is inside of the queried region, in the same coordinate frame as the sketch itself
	QueryPoint Point2D `json:"query_point" yaml:"query_point" schema:"query_point,required"`
}

RegionGetQueryPoint: The response from 'RegionGetQueryPoint' modeling command.

type RegionGetResolvableIntersectionInfo added in v0.2.44

type RegionGetResolvableIntersectionInfo struct {
	// CurveClockwise: True if the region lies within the clockwise interior of the two intersections (inside a "right" turn from the segment to the intersection segment)
	CurveClockwise bool `json:"curve_clockwise" yaml:"curve_clockwise" schema:"curve_clockwise,required"`
	// IntersectionCount: The total number of intersections between the two curves.
	IntersectionCount int `json:"intersection_count" yaml:"intersection_count" schema:"intersection_count,required"`
	// IntersectionIndex: Disambiguator providing the index of the intersection.  Can be non-zero if the two curves intersect multiple times
	IntersectionIndex int `json:"intersection_index" yaml:"intersection_index" schema:"intersection_index,required"`
	// IntersectionSegment: The UUID of the curve that intersects the walking curve that also borders the queried region
	IntersectionSegment UUID `json:"intersection_segment" yaml:"intersection_segment" schema:"intersection_segment,required"`
	// Segment: The UUID of the walking curve that borders the queried region
	Segment UUID `json:"segment" yaml:"segment" schema:"segment,required"`
}

RegionGetResolvableIntersectionInfo: The response from the 'RegionGetResolvableIntersectionInfo'.

type RegionVersion added in v0.2.44

type RegionVersion string

RegionVersion: Region-creation algorithm version.

const (
	// RegionVersionV0: The original region creation method. This should NOT be used anymore, but is maintained to avoid breaking old models.
	RegionVersionV0 RegionVersion = "V0"
	// RegionVersionV1: Fixes the bug in V0 where creating a region would shuffle the mapping from segment names/IDs to actual segment geometry.
	RegionVersionV1 RegionVersion = "V1"
)

type RelativeTo added in v0.2.41

type RelativeTo string

RelativeTo: What is the given geometry relative to?

const (
	// RelativeToSketchPlane: Local/relative to a position centered within the plane being sketched on
	RelativeToSketchPlane RelativeTo = "sketch_plane"
	// RelativeToTrajectoryCurve: Local/relative to the trajectory curve
	RelativeToTrajectoryCurve RelativeTo = "trajectory_curve"
)

type RemoveSceneObjects added in v0.2.38

type RemoveSceneObjects struct {
}

RemoveSceneObjects: The response from the `RemoveSceneObjects` endpoint.

type Replay added in v0.2.42

type Replay struct {
	// Messages: Canonical bytes (usually JSON) for each message, ordered by prompt creation time, then message sequence number.
	Messages [][]int `json:"messages" yaml:"messages" schema:"messages,required"`
}

Replay is the type definition for a Replay.

type Request added in v0.2.44

type Request struct {
	// AllowPreview: Explicit consent to unstable preview semantics.
	AllowPreview bool `json:"allow_preview" yaml:"allow_preview" schema:"allow_preview"`
	// CurrentFiles: Complete project, including unsaved edits, imports, and settings.
	CurrentFiles map[string][]int `json:"current_files" yaml:"current_files" schema:"current_files,required"`
	// Entrypoint: Project-relative KCL file to execute.
	Entrypoint string `json:"entrypoint" yaml:"entrypoint" schema:"entrypoint,required"`
	// ProjectSnapshot: Revision against which the user will review and apply the candidate.
	ProjectSnapshot MlCopilotProjectSnapshotMetadata `json:"project_snapshot" yaml:"project_snapshot" schema:"project_snapshot,required"`
	// RequestID: Client-generated idempotency key. Reuse it when retrying delivery.
	RequestID UUID `json:"request_id" yaml:"request_id" schema:"request_id,required"`
	// Target: Requested target. The worker inspects the actual source version.
	Target KclMigrationTarget `json:"target" yaml:"target" schema:"target,required"`
}

Request: A complete, immutable input snapshot. It does not grant sponsorship itself.

type RequestAttachments added in v0.2.44

type RequestAttachments struct {
	// ConversationID: Conversation to search for attachments. Used when prompt_id is not known.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id"`
	// Names: Attachment names to load. Empty means load all attachments from the selected message(s).
	Names []string `json:"names" yaml:"names" schema:"names"`
	// OnlyMetadata: If true, return attachment metadata without loading file contents.
	OnlyMetadata bool `json:"only_metadata" yaml:"only_metadata" schema:"only_metadata"`
	// PromptID: Prompt to load attachments from. Defaults to the active/resumed prompt.
	PromptID UUID `json:"prompt_id" yaml:"prompt_id" schema:"prompt_id"`
	// RequestID: Optional backend-provided identifier to correlate request/response pairs.
	RequestID string `json:"request_id" yaml:"request_id" schema:"request_id"`
	// Seq: Specific client message sequence to inspect. Defaults to recent client messages.
	Seq int `json:"seq" yaml:"seq" schema:"seq"`
}

RequestAttachments is the type definition for a RequestAttachments.

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 Revolve added in v0.2.38

type Revolve struct {
	// BodiesCreated: Any new bodies created by the request.
	BodiesCreated BodiesCreated `json:"bodies_created" yaml:"bodies_created" schema:"bodies_created"`
	// BodiesUpdated: Any existing bodies updated by the request.
	BodiesUpdated BodiesUpdated `json:"bodies_updated" yaml:"bodies_updated" schema:"bodies_updated"`
}

Revolve: The response from the `Revolve` endpoint.

type RevolveAboutEdge added in v0.2.38

type RevolveAboutEdge struct {
	// BodiesCreated: Any new bodies created by the request.
	BodiesCreated BodiesCreated `json:"bodies_created" yaml:"bodies_created" schema:"bodies_created"`
	// BodiesUpdated: Any existing bodies updated by the request.
	BodiesUpdated BodiesUpdated `json:"bodies_updated" yaml:"bodies_updated" schema:"bodies_updated"`
}

RevolveAboutEdge: The response from the `RevolveAboutEdge` endpoint.

type Rotation added in v0.2.38

type Rotation struct {
	// Angle: Rotate this far about the rotation axis. Defaults to zero (i.e. no rotation).
	Angle Angle `json:"angle" yaml:"angle" schema:"angle,required"`
	// Axis: Rotation axis. Defaults to (0, 0, 1) (i.e. the Z axis).
	Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
	// Origin: Origin of the rotation. If one isn't provided, the object will rotate about its own bounding box center.
	Origin any `json:"origin" yaml:"origin" schema:"origin,required"`
}

Rotation: A rotation defined by an axis, origin of rotation, and an angle.

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 SalesInquiryType added in v0.2.43

type SalesInquiryType string

SalesInquiryType: The type of sales inquiry for website sales forms.

const (
	// SalesInquiryTypePilotInquiry: Inquiries related to pilots (on the enterprise page).
	SalesInquiryTypePilotInquiry SalesInquiryType = "pilot_inquiry"
	// SalesInquiryTypeGeneralInquiry: General inquiry about the service or product.
	SalesInquiryTypeGeneralInquiry SalesInquiryType = "general_inquiry"
	// SalesInquiryTypeSalesQuestion: Questions related to sales or purchasing.
	SalesInquiryTypeSalesQuestion SalesInquiryType = "sales_question"
	// SalesInquiryTypeDeveloperInquiry: Inquiry from a developer, typically technical in nature.
	SalesInquiryTypeDeveloperInquiry SalesInquiryType = "developer_inquiry"
	// SalesInquiryTypePartnershipOpportunity: Opportunity for partnership or collaboration.
	SalesInquiryTypePartnershipOpportunity SalesInquiryType = "partnership_opportunity"
	// SalesInquiryTypeOtherSalesInquiry: Other inquiries related to sales that do not fit predefined categories.
	SalesInquiryTypeOtherSalesInquiry SalesInquiryType = "other_sales_inquiry"
)

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.
	//
	// Never serialized in API responses: the SP signing key is a secret used internally to sign AuthnRequests, and would otherwise leak to admin GETs, audit logs, support tooling, and browser history. Input is accepted via the dedicated `SamlIdentityProviderCreate` body type, not by deserializing this struct.
	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 SceneClearAll added in v0.2.38

type SceneClearAll struct {
}

SceneClearAll: The response from the `SceneClearAll` endpoint.

type SceneGetEntityIds added in v0.2.42

type SceneGetEntityIds struct {
	// EntityIds: The ids of the requested entities.
	EntityIds [][]UUID `json:"entity_ids" yaml:"entity_ids" schema:"entity_ids,required"`
}

SceneGetEntityIds: The response from the `SceneGetEntityIds` command.

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 SelectAdd added in v0.2.38

type SelectAdd struct {
}

SelectAdd: The response from the `SelectAdd` endpoint.

type SelectClear added in v0.2.38

type SelectClear struct {
}

SelectClear: The response from the `SelectClear` endpoint.

type SelectEntity added in v0.2.44

type SelectEntity struct {
}

SelectEntity: The response from the `SelectEntity` endpoint.

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 SelectRegionFromPoint added in v0.2.43

type SelectRegionFromPoint struct {
	// Region: The region the user clicked on. If they clicked an open space which isn't a region, this returns None.
	Region SelectedRegion `json:"region" yaml:"region" schema:"region"`
}

SelectRegionFromPoint: The response from the 'SelectRegionFromPoint'. If there are multiple ways to construct this region, this chooses arbitrarily.

type SelectRemove added in v0.2.38

type SelectRemove struct {
}

SelectRemove: The response from the `SelectRemove` endpoint.

type SelectReplace added in v0.2.38

type SelectReplace struct {
}

SelectReplace: The response from the `SelectReplace` endpoint.

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 SelectedRegion added in v0.2.43

type SelectedRegion struct {
	// CurveClockwise: By default (when this is false), curve counterclockwise at intersections. If this is true, instead curve clockwise.
	CurveClockwise bool `json:"curve_clockwise" yaml:"curve_clockwise" schema:"curve_clockwise"`
	// IntersectionIndex: At which intersection between `segment` and `intersection_segment` should we stop following the `segment` and start following `intersection_segment`? Defaults to -1, which means the last intersection.
	IntersectionIndex int `json:"intersection_index" yaml:"intersection_index" schema:"intersection_index"`
	// IntersectionSegment: Second segment to follow to find the region. Intersects the first segment.
	IntersectionSegment UUID `json:"intersection_segment" yaml:"intersection_segment" schema:"intersection_segment,required"`
	// Segment: First segment to follow to find the region.
	Segment UUID `json:"segment" yaml:"segment" schema:"segment,required"`
}

SelectedRegion: The region a user clicked on.

type Selection added in v0.2.42

type Selection any

Selection: Selection: Data item selection.

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 SendObject added in v0.2.38

type SendObject struct {
}

SendObject: The response from the `SendObject` endpoint.

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 string `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 member. 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 member. It creates a new service account for the organization.

Parameters

  • `label`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*ServiceAccountService) DeleteForOrg added in v0.2.33

func (s *ServiceAccountService) DeleteForOrg(token string) error

DeleteForOrg: Delete an service account for your org. This endpoint requires authentication by an org member. 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.

The token path parameter can be either the full service account token (prefixed with `svc-`) or the token's unique ID (a UUID).

Parameters

  • `token`
Example

DeleteForOrg: Delete an service account for your org. This endpoint requires authentication by an org member. 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.

The token path parameter can be either the full service account token (prefixed with `svc-`) or the token's unique ID (a UUID).

Parameters

  • `token`
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.ServiceAccount.DeleteForOrg("some-string"); err != nil {
		panic(err)
	}

}

func (*ServiceAccountService) GetForOrg added in v0.2.33

func (s *ServiceAccountService) GetForOrg(token string) (*ServiceAccount, error)

GetForOrg: Get an service account for your org. This endpoint requires authentication by an org member. It returns details of the requested service account for the organization.

Parameters

  • `token`: An auth token. A uuid with a prefix of svc-
Example

GetForOrg: Get an service account for your org. This endpoint requires authentication by an org member. It returns details of the requested service account for the organization.

Parameters

  • `token`: An auth token. A uuid with a prefix of svc-
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}

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

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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"`
	// Expires: The date and time the session expires.
	Expires Time `json:"expires" yaml:"expires" schema:"expires,required"`
	// ID: The unique identifier for the session.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// SessionToken: The session token.
	SessionToken string `json:"session_token" yaml:"session_token" schema:"session_token,required"`
	// UpdatedAt: The date and time the session was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
	// UserID: The user ID of the user that the session belongs to.
	UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}

Session: An authentication session.

type SessionData added in v0.2.42

type SessionData struct {
	// APICallID: The API call id associated with this websocket session.
	APICallID string `json:"api_call_id" yaml:"api_call_id" schema:"api_call_id,required"`
}

SessionData is the type definition for a SessionData.

type SetBackgroundColor added in v0.2.38

type SetBackgroundColor struct {
}

SetBackgroundColor: The response from the `SetBackgroundColor` endpoint.

type SetCurrentToolProperties added in v0.2.38

type SetCurrentToolProperties struct {
}

SetCurrentToolProperties: The response from the `SetCurrentToolProperties` endpoint.

type SetDefaultSystemProperties added in v0.2.38

type SetDefaultSystemProperties struct {
}

SetDefaultSystemProperties: The response from the `SetDefaultSystemProperties` endpoint.

type SetGridAutoScale added in v0.2.42

type SetGridAutoScale struct {
}

SetGridAutoScale: The response from the 'SetGridScale'.

type SetGridReferencePlane added in v0.2.40

type SetGridReferencePlane struct {
}

SetGridReferencePlane: The response from the 'SetGridReferencePlane'.

type SetGridScale added in v0.2.42

type SetGridScale struct {
}

SetGridScale: The response from the 'SetGridScale'.

type SetKclVersion added in v0.2.44

type SetKclVersion struct {
}

SetKclVersion: The response from the 'SetKclVersion'.

type SetObjectTransform added in v0.2.40

type SetObjectTransform struct {
}

SetObjectTransform: The response from the `SetObjectTransform` command.

type SetOrderIndependentTransparency added in v0.2.42

type SetOrderIndependentTransparency struct {
	// Enabled: Is it now enabled, or disabled?
	Enabled bool `json:"enabled" yaml:"enabled" schema:"enabled,required"`
}

SetOrderIndependentTransparency: The response from the 'SetOrderIndependentTransparency'.

type SetSceneUnits added in v0.2.38

type SetSceneUnits struct {
}

SetSceneUnits: The response from the `SetSceneUnits` endpoint.

type SetSelectionFilter added in v0.2.38

type SetSelectionFilter struct {
}

SetSelectionFilter: The response from the `SetSelectionFilter` endpoint.

type SetSelectionType added in v0.2.38

type SetSelectionType struct {
}

SetSelectionType: The response from the `SetSelectionType` endpoint.

type SetTool added in v0.2.38

type SetTool struct {
}

SetTool: The response from the `SetTool` endpoint.

type Shortlink struct {
	// CreatedAt: The date and time the shortlink was created.
	CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
	// ID: The unique identifier for the shortlink.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// Key: The key of the shortlink. This is the short part of the URL.
	Key string `json:"key" yaml:"key" schema:"key,required"`
	// OrgID: The organization ID of the shortlink.
	OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id"`
	// PasswordHash: The hash of the password for the shortlink.
	PasswordHash string `json:"password_hash" yaml:"password_hash" schema:"password_hash"`
	// RestrictToOrg: If the shortlink should be restricted to the organization. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail.
	RestrictToOrg bool `json:"restrict_to_org" yaml:"restrict_to_org" schema:"restrict_to_org"`
	// UpdatedAt: The date and time the shortlink was last updated.
	UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
	// UserID: The ID of the user that made the shortlink.
	UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
	// Value: The URL the shortlink redirects to.
	Value URL `json:"value" yaml:"value" schema:"value,required"`
}

Shortlink: A short url.

type ShortlinkResultsPage added in v0.2.38

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

ShortlinkResultsPage: A single page of results

type ShortlinkService added in v0.2.38

type ShortlinkService service

ShortlinkService: Shortlinks are a way to create a short URL that redirects to a longer URL. This is useful for sharing links that are long and unwieldy.

type SideFace added in v0.2.40

type SideFace struct {
	// FaceID: Desired ID for the resulting face.
	FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
	// PathID: ID of the path this face is being extruded from.
	PathID UUID `json:"path_id" yaml:"path_id" schema:"path_id,required"`
}

SideFace: IDs for a side face, extruded from the path of some sketch/2D shape.

type SketchGetInfo added in v0.2.44

type SketchGetInfo struct {
	// Curves: All curves in this sketch.
	Curves []CurveDebug `json:"curves" yaml:"curves" schema:"curves,required"`
	// RegionCount: How many regions the Toolpaths library thinks exist
	RegionCount int `json:"region_count" yaml:"region_count" schema:"region_count,required"`
	// RegionObj: OBJ representation of the topology from Toolpaths library.
	RegionObj string `json:"region_obj" yaml:"region_obj" schema:"region_obj,required"`
}

SketchGetInfo: The response from the 'SketchGetInfo'.

type SketchModeDisable added in v0.2.38

type SketchModeDisable struct {
}

SketchModeDisable: The response from the `SketchModeDisable` endpoint.

type Solid2DAddHole added in v0.2.38

type Solid2DAddHole struct {
}

Solid2DAddHole: The response from the `Solid2dAddHole` endpoint.

type Solid3DCutEdgeReferences added in v0.2.44

type Solid3DCutEdgeReferences struct {
}

Solid3DCutEdgeReferences: The response from the `Solid3dCutEdgeReferences` endpoint.

type Solid3DCutEdges added in v0.2.42

type Solid3DCutEdges struct {
}

Solid3DCutEdges: The response from the `Solid3dCutEdges` endpoint.

type Solid3DFilletEdge added in v0.2.38

type Solid3DFilletEdge struct {
}

Solid3DFilletEdge: The response from the `Solid3dFilletEdge` endpoint.

type Solid3DFlip added in v0.2.43

type Solid3DFlip struct {
}

Solid3DFlip: The response from the `Solid3dFlip` command.

type Solid3DFlipFace added in v0.2.43

type Solid3DFlipFace struct {
}

Solid3DFlipFace: The response from the `Solid3dFlipFace` command.

type Solid3DGetAdjacencyInfo added in v0.2.41

type Solid3DGetAdjacencyInfo struct {
	// Edges: Details of each edge.
	Edges []AdjacencyInfo `json:"edges" yaml:"edges" schema:"edges,required"`
}

Solid3DGetAdjacencyInfo: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces) This includes the opposite and adjacent faces and edges.

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 Solid3DGetBodyType added in v0.2.43

type Solid3DGetBodyType struct {
	// BodyType: The body type
	BodyType BodyType `json:"body_type" yaml:"body_type" schema:"body_type,required"`
}

Solid3DGetBodyType: The response from the `Solid3dGetBodyType` endpoint.

type Solid3DGetCommonEdge added in v0.2.38

type Solid3DGetCommonEdge struct {
	// Edge: The UUID of the common edge, if any.
	Edge UUID `json:"edge" yaml:"edge" schema:"edge"`
}

Solid3DGetCommonEdge: The response from the `Solid3DGetCommonEdge` command.

type Solid3DGetEdgeUuid added in v0.2.43

type Solid3DGetEdgeUuid struct {
	// EdgeID: The UUID of the edge.
	EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
}

Solid3DGetEdgeUuid: The response from the `Solid3dGetEdgeUuid` endpoint.

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 Solid3DGetFaceUuid added in v0.2.43

type Solid3DGetFaceUuid struct {
	// FaceID: The UUID of the face.
	FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
}

Solid3DGetFaceUuid: The response from the `Solid3dGetFaceUuid` endpoint.

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 Solid3DJoin added in v0.2.43

type Solid3DJoin struct {
}

Solid3DJoin: The response from the `Solid3dJoin` endpoint.

type Solid3DMultiJoin added in v0.2.43

type Solid3DMultiJoin struct {
}

Solid3DMultiJoin: The response from the `Solid3dMultiJoin` endpoint.

type Solid3DShellFace added in v0.2.38

type Solid3DShellFace struct {
}

Solid3DShellFace: The response from the `Solid3dShellFace` endpoint.

type SourcePosition added in v0.2.37

type SourcePosition struct {
	// Column: The column number.
	Column int `json:"column" yaml:"column" schema:"column,required"`
	// Line: The line number.
	Line int `json:"line" yaml:"line" schema:"line,required"`
}

SourcePosition: A position in the source code.

type SourceRange added in v0.2.37

type SourceRange struct {
	// End: The end of the range.
	End SourcePosition `json:"end" yaml:"end" schema:"end,required"`
	// Start: The start of the range.
	Start SourcePosition `json:"start" yaml:"start" schema:"start,required"`
}

SourceRange: A source range of code.

type SourceRangePrompt added in v0.2.37

type SourceRangePrompt struct {
	// File: The name of the file the source range applies to. This is the relative path to the file from the root of the project. This only applies to multi-file iterations.
	File string `json:"file" yaml:"file" schema:"file"`
	// Prompt: The prompt for the changes.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"`
	// Range: The range of the source code to change. If you want to apply the prompt to the whole file, set the start to 0 and the end to the end of the file.
	Range SourceRange `json:"range" yaml:"range" schema:"range,required"`
}

SourceRangePrompt: A source range and prompt for a text to CAD iteration.

type StartPath added in v0.2.18

type StartPath struct {
}

StartPath: The response from the `StartPath` endpoint.

type StepImportTargetRepresentation added in v0.2.44

type StepImportTargetRepresentation string

StepImportTargetRepresentation: After importing, how should this model's data be represented?

const (
	// StepImportTargetRepresentationMesh: Mesh of 2D geometry
	StepImportTargetRepresentationMesh StepImportTargetRepresentation = "mesh"
	// StepImportTargetRepresentationBrep: Boundary representation
	StepImportTargetRepresentationBrep StepImportTargetRepresentation = "brep"
)

type StepPresentation added in v0.2.43

type StepPresentation string

StepPresentation: Describes the presentation style of the EXPRESS exchange format.

const (
	// StepPresentationCompact: Condenses the text to reduce the size of the file.
	StepPresentationCompact StepPresentation = "compact"
	// StepPresentationPretty: Add extra spaces to make the text more easily readable.
	//
	// This is the default setting.
	StepPresentationPretty StepPresentation = "pretty"
)

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 StorageProvider added in v0.2.42

type StorageProvider string

StorageProvider: Storage provider identifier for org datasets.

const (
	// StorageProviderS3: Amazon Simple Storage Service.
	StorageProviderS3 StorageProvider = "s3"
	// StorageProviderZooManaged: Zoo-managed dataset storage backed by the API's internal object store.
	StorageProviderZooManaged StorageProvider = "zoo_managed"
)

type StoreService added in v0.2.33

type StoreService service

StoreService: Operations involving our swag store.

type SubscriptionActionType added in v0.2.42

type SubscriptionActionType string

SubscriptionActionType: Indicates which kind of Stripe intent requires customer action during subscription creation.

const (
	// SubscriptionActionTypePaymentIntent: The client secret belongs to a PaymentIntent (initial invoice payment).
	SubscriptionActionTypePaymentIntent SubscriptionActionType = "payment_intent"
	// SubscriptionActionTypeSetupIntent: The client secret belongs to a SetupIntent (trial or setup-only flow).
	SubscriptionActionTypeSetupIntent SubscriptionActionType = "setup_intent"
)

type SubscriptionBillingMode added in v0.2.43

type SubscriptionBillingMode string

SubscriptionBillingMode: How a subscription plan is billed operationally.

const (
	// SubscriptionBillingModeStandard: Standard self-serve billing through the normal subscription flow.
	SubscriptionBillingModeStandard SubscriptionBillingMode = "standard"
	// SubscriptionBillingModeContract: Contract-managed billing controlled outside the standard subscription flow.
	SubscriptionBillingModeContract SubscriptionBillingMode = "contract"
)

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 SubscriptionTierPrice added in v0.2.42

type SubscriptionTierPrice any

SubscriptionTierPrice: SubscriptionTierPrice: The price for a subscription tier.

type SubscriptionTierPriceFlat added in v0.2.33

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

SubscriptionTierPriceFlat: Contract-managed pricing. The price is not self-serve and the customer must 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 SubscriptionTierType added in v0.2.42

type SubscriptionTierType any

SubscriptionTierType: SubscriptionTierType: An enum representing a subscription tier type.

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 SupportInquiryType added in v0.2.43

type SupportInquiryType string

SupportInquiryType: The type of support inquiry for website support forms.

const (
	// SupportInquiryTypeTechnicalSupport: Request for technical support or troubleshooting.
	SupportInquiryTypeTechnicalSupport SupportInquiryType = "technical_support"
	// SupportInquiryTypeAccountManagement: Questions or requests related to account management.
	SupportInquiryTypeAccountManagement SupportInquiryType = "account_management"
	// SupportInquiryTypeOtherSupportInquiry: Other support-related inquiries that do not fit predefined categories.
	SupportInquiryTypeOtherSupportInquiry SupportInquiryType = "other_support_inquiry"
)

type SupportTier added in v0.2.33

type SupportTier string

SupportTier: The support tier the subscription provides.

const (
	// SupportTierCommunity: Community support.
	SupportTierCommunity SupportTier = "community"
	// SupportTierStandardEmail: Standard email support.
	SupportTierStandardEmail SupportTier = "standard_email"
	// SupportTierPriorityEmail: Priority email support.
	SupportTierPriorityEmail SupportTier = "priority_email"
	// SupportTierPremium: Premium support.
	SupportTierPremium SupportTier = "premium"
)

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 SurfaceBlend added in v0.2.43

type SurfaceBlend struct {
}

SurfaceBlend: The response from the `SurfaceBlend` endpoint.

type SurfaceCreated added in v0.2.43

type SurfaceCreated struct {
	// FromSegments: Which segment IDs was this surface swept from?
	FromSegments []UUID `json:"from_segments" yaml:"from_segments" schema:"from_segments,required"`
	// ID: The surface's ID.
	ID UUID `json:"id" yaml:"id" schema:"id,required"`
	// PrimitiveFaceIndex: Which number face of the parent body is this?
	PrimitiveFaceIndex int `json:"primitive_face_index" yaml:"primitive_face_index" schema:"primitive_face_index,required"`
}

SurfaceCreated: Details of a surface that was created under some body.

type SurfaceEdgeReference added in v0.2.43

type SurfaceEdgeReference struct {
	// Edges: A list of the edge ids that belong to the body.
	Edges []FractionOfEdge `json:"edges" yaml:"edges" schema:"edges,required"`
	// ObjectID: The id of the body.
	ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
}

SurfaceEdgeReference: An object id, that corresponds to a surface body, and a list of edges of the surface.

type Sweep added in v0.2.40

type Sweep struct {
	// BodiesCreated: Any new bodies created by the request.
	BodiesCreated BodiesCreated `json:"bodies_created" yaml:"bodies_created" schema:"bodies_created"`
	// BodiesUpdated: Any existing bodies updated by the request.
	BodiesUpdated BodiesUpdated `json:"bodies_updated" yaml:"bodies_updated" schema:"bodies_updated"`
}

Sweep: The response from the `Sweep` endpoint.

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 TextToCadModel added in v0.2.34

type TextToCadModel string

TextToCadModel: A type of Text-to-CAD model.

const (
	// TextToCadModelCad: CAD.
	TextToCadModelCad TextToCadModel = "cad"
	// TextToCadModelKcl: KCL.
	TextToCadModelKcl TextToCadModel = "kcl"
	// TextToCadModelKclIteration: KCL iteration.
	TextToCadModelKclIteration TextToCadModel = "kcl_iteration"
)

type TextToCadMultiFileIterationBody added in v0.2.40

type TextToCadMultiFileIterationBody struct {
	// ConversationID: The conversation ID Conversations group different prompts together. This should be omitted when starting a new conversation. The conversation_id returned in the response should be used to link future messages in the same conversation.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id"`
	// KclVersion: The version of kcl to use. If empty, the latest version will be used.
	KclVersion string `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version"`
	// ProjectName: The project name. This is used to tie the prompt to a project. Which helps us make our models better over time.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// Prompt: The prompt for the overall changes. This is optional if you only want changes on specific source ranges. This will apply to all the files. If you want to apply a prompt to just a single file, use the source_ranges field and you can leave this empty.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt"`
	// SourceRanges: The source ranges the user suggested to change. If empty, the prompt will be used and is required.
	SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges"`
}

TextToCadMultiFileIterationBody: Body for iterating on models from text prompts.

type TextToCadResponse added in v0.2.42

type TextToCadResponse any

TextToCadResponse: TextToCadResponse: Type that encompasses all Text-to-CAD response types, including iteration and multi-file iteration.

type TextToCadResponseCode added in v0.2.42

type TextToCadResponseCode struct {
	// Code: The code for the model. This is optional but will be required in the future once we are at v1.
	Code string `json:"code" yaml:"code" schema:"code"`
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation ID Conversations group different prompts together.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
	// 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 MlFeedback `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"`
	// KclVersion: The version of kcl requested.
	KclVersion string `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version"`
	// Model: The model being used.
	Model TextToCadModel `json:"model" yaml:"model" schema:"model,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"`
}

TextToCadResponseCode: A response from a text to CAD prompt.

type TextToCadResponseCompletedAt added in v0.2.42

type TextToCadResponseCompletedAt struct {
	// Code: The code for the new model.
	Code string `json:"code" yaml:"code" schema:"code,required"`
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation ID Conversations group different prompts together.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
	// 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 MlFeedback `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"`
	// Model: The model being used.
	Model TextToCadModel `json:"model" yaml:"model" schema:"model,required"`
	// ModelVersion: The version of the model.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
	// OriginalSourceCode: The original source code for the model, previous to the changes.
	OriginalSourceCode string `json:"original_source_code" yaml:"original_source_code" schema:"original_source_code,required"`
	// Prompt: The prompt for the overall changes. This is optional if you only want changes on specific source ranges.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt"`
	// SourceRanges: The source ranges the user suggested to change.
	SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges,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"`
}

TextToCadResponseCompletedAt: A response from a text to CAD iteration.

type TextToCadResponseConversationID added in v0.2.42

type TextToCadResponseConversationID struct {
	// CompletedAt: The time and date the API call was completed.
	CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
	// ConversationID: The conversation ID Conversations group different prompts together.
	ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id,required"`
	// 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 MlFeedback `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"`
	// KclVersion: The version of kcl to use. If empty, the latest version will be used.
	KclVersion string `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version"`
	// Model: The model being used.
	Model TextToCadModel `json:"model" yaml:"model" schema:"model,required"`
	// ModelVersion: The version of the model.
	ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
	// Outputs: The output files. Returns a map of the file name to the file contents. The file contents are not encoded since kcl files are not binary.
	Outputs map[string]string `json:"outputs" yaml:"outputs" schema:"outputs"`
	// ProjectName: The project name. This is used to tie the prompt to a project. Which helps us make our models better over time.
	ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
	// Prompt: The prompt for the overall changes. This is optional if you only want changes on specific source ranges. This will apply to all the files.
	Prompt string `json:"prompt" yaml:"prompt" schema:"prompt"`
	// SourceRanges: The source ranges the user suggested to change.
	SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges,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"`
}

TextToCadResponseConversationID: A response from a text to CAD multi-file iteration.

type TextToCadResponseResultsPage added in v0.2.42

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

TextToCadResponseResultsPage: 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 TokenRevokeRequestForm added in v0.2.38

type TokenRevokeRequestForm struct {
	// ClientID: The client ID.
	ClientID UUID `json:"client_id" yaml:"client_id" schema:"client_id,required"`
	// ClientSecret: The client secret.
	ClientSecret string `json:"client_secret" yaml:"client_secret" schema:"client_secret"`
	// Token: The token to revoke.
	Token string `json:"token" yaml:"token" schema:"token,required"`
}

TokenRevokeRequestForm: The request parameters for the OAuth 2.0 token revocation flow.

type Tolerance added in v0.2.44

type Tolerance struct {
	// PointPoint2DCoincident: The distance tolerance for 2D point-point coincidence.
	PointPoint2DCoincident float64 `json:"point_point_2d_coincident" yaml:"point_point_2d_coincident" schema:"point_point_2d_coincident,required"`
}

Tolerance: Default tolerance values for modeling operations.

type ToolOutput added in v0.2.42

type ToolOutput struct {
	// Result: The result of the tool call.
	Result any `json:"result" yaml:"result" schema:"result,required"`
}

ToolOutput is the type definition for a ToolOutput.

type Transform added in v0.2.38

type Transform struct {
	// Replicate: Whether to replicate the original solid in this instance.
	Replicate bool `json:"replicate" yaml:"replicate" schema:"replicate"`
	// Rotation: Rotate the replica about the specified rotation axis and origin. Defaults to no rotation.
	Rotation Rotation `json:"rotation" yaml:"rotation" schema:"rotation"`
	// Scale: Scale the replica's size along each axis. Defaults to (1, 1, 1) (i.e. the same size as the original).
	Scale Point3D `json:"scale" yaml:"scale" schema:"scale"`
	// Translate: Translate the replica this far along each dimension. Defaults to zero vector (i.e. same position as the original).
	Translate Point3D `json:"translate" yaml:"translate" schema:"translate"`
}

Transform: Ways to transform each solid being replicated in a repeating pattern.

type TransformByForPoint3D added in v0.2.42

type TransformByForPoint3D struct {
	// Origin: What to use as the origin for the transformation.
	Origin any `json:"origin" yaml:"origin" schema:"origin"`
	// Property: The scale, or rotation, or translation.
	Property Point3D `json:"property" yaml:"property" schema:"property,required"`
	// Set: If true, overwrite the previous value with this. If false, the previous value will be modified. E.g. when translating, `set=true` will set a new location, and `set=false` will translate the current location by the given X/Y/Z.
	Set bool `json:"set" yaml:"set" schema:"set,required"`
}

TransformByForPoint3D: How a property of an object should be transformed.

type TransformByForPoint4D added in v0.2.42

type TransformByForPoint4D struct {
	// Origin: What to use as the origin for the transformation.
	Origin any `json:"origin" yaml:"origin" schema:"origin"`
	// Property: The scale, or rotation, or translation.
	Property Point4D `json:"property" yaml:"property" schema:"property,required"`
	// Set: If true, overwrite the previous value with this. If false, the previous value will be modified. E.g. when translating, `set=true` will set a new location, and `set=false` will translate the current location by the given X/Y/Z.
	Set bool `json:"set" yaml:"set" schema:"set,required"`
}

TransformByForPoint4D: How a property of an object should be transformed.

type TwistExtrude added in v0.2.42

type TwistExtrude struct {
	// BodiesCreated: Any new bodies created by the request.
	BodiesCreated BodiesCreated `json:"bodies_created" yaml:"bodies_created" schema:"bodies_created"`
	// BodiesUpdated: Any existing bodies updated by the request.
	BodiesUpdated BodiesUpdated `json:"bodies_updated" yaml:"bodies_updated" schema:"bodies_updated"`
}

TwistExtrude: The response from the `TwistExtrude` endpoint.

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_yard>
	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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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 (
	// UnitVolumeMm3: Cubic millimeters (mm³)
	UnitVolumeMm3 UnitVolume = "mm3"
	// 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 UpdateAnnotation added in v0.2.38

type UpdateAnnotation struct {
}

UpdateAnnotation: The response from the `UpdateAnnotation` endpoint.

type UpdateCustomModel added in v0.2.42

type UpdateCustomModel struct {
	// Name: The model's display name.
	Name string `json:"name" yaml:"name" schema:"name"`
	// SystemPrompt: The model's system prompt.
	SystemPrompt string `json:"system_prompt" yaml:"system_prompt" schema:"system_prompt"`
}

UpdateCustomModel: Body for updating a custom ML model.

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 UpdateOauth2AppRequest added in v0.2.43

type UpdateOauth2AppRequest struct {
	// GrantTypes: The OAuth grant types this app can use.
	GrantTypes []Oauth2AppGrantType `json:"grant_types" yaml:"grant_types" schema:"grant_types"`
	// Mode: The deployment mode for this app.
	Mode Oauth2AppMode `json:"mode" yaml:"mode" schema:"mode"`
	// Name: The new display name of the app.
	Name string `json:"name" yaml:"name" schema:"name"`
	// RedirectUris: The redirect URIs registered for this app.
	RedirectUris []URL `json:"redirect_uris" yaml:"redirect_uris" schema:"redirect_uris"`
}

UpdateOauth2AppRequest: Request body for updating a public OAuth app.

type UpdateOrgDataset added in v0.2.42

type UpdateOrgDataset struct {
	// Description: Optional description override. Null clears the description.
	Description string `json:"description" yaml:"description" schema:"description"`
	// Name: Optional new display name.
	Name string `json:"name" yaml:"name" schema:"name"`
	// RequireRawKclSimilarityScoreForSuccess: Optional override for whether a low raw-KCL similarity score should block conversion success.
	RequireRawKclSimilarityScoreForSuccess bool `` /* 157-byte string literal not displayed */
	// Source: Optional storage connection overrides.
	Source UpdateOrgDatasetSource `json:"source" yaml:"source" schema:"source"`
}

UpdateOrgDataset: Payload for updating an org dataset.

type UpdateOrgDatasetSource added in v0.2.42

type UpdateOrgDatasetSource struct {
	// AccessRoleArn: Updated identity Zoo should assume when reading the dataset.
	AccessRoleArn string `json:"access_role_arn" yaml:"access_role_arn" schema:"access_role_arn"`
	// Provider: Updated storage provider identifier.
	Provider StorageProvider `json:"provider" yaml:"provider" schema:"provider"`
	// Uri: Updated fully-qualified URI for the dataset contents.
	Uri string `json:"uri" yaml:"uri" schema:"uri"`
}

UpdateOrgDatasetSource: Partial update payload for dataset storage details.

type UpdateShortlinkRequest added in v0.2.38

type UpdateShortlinkRequest struct {
	// Password: The password for the shortlink, if you want to restrict access to it. This can only be set if your subscription allows for it. Otherwise, it will return an error. When you access the link it will be required to enter this password through basic auth. The username will be `{anything}` and the password will be the password you set here.
	Password string `json:"password" yaml:"password" schema:"password"`
	// RestrictToOrg: If the shortlink should be restricted to the user's organization to view. This only applies to org shortlinks. If you are creating a user shortlink and you are not a member of a team or enterprise and you try to set this to true, it will fail.
	RestrictToOrg bool `json:"restrict_to_org" yaml:"restrict_to_org" schema:"restrict_to_org,required"`
}

UpdateShortlinkRequest: Request to update a shortlink.

type UpdateUser added in v0.1.4

type UpdateUser struct {
	// AllowPayAsYouGo: Whether the user has opted into pay-as-you-go charges after using their included credits.
	AllowPayAsYouGo bool `json:"allow_pay_as_you_go" yaml:"allow_pay_as_you_go" schema:"allow_pay_as_you_go"`
	// 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"`
	// IsOnboarded: If the user is now onboarded.
	IsOnboarded bool `json:"is_onboarded" yaml:"is_onboarded" schema:"is_onboarded"`
	// 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"`
	// Username: Public username/handle for community-facing features. Empty clears it.
	Username string `json:"username" yaml:"username" schema:"username"`
}

UpdateUser: The user-modifiable parts of a User.

type UploadOrgDatasetFilesResponse added in v0.2.43

type UploadOrgDatasetFilesResponse struct {
	// QueuedConversions: Number of conversion jobs newly queued.
	QueuedConversions int `json:"queued_conversions" yaml:"queued_conversions" schema:"queued_conversions,required"`
	// UploadedFiles: Number of files accepted and stored.
	UploadedFiles int `json:"uploaded_files" yaml:"uploaded_files" schema:"uploaded_files,required"`
}

UploadOrgDatasetFilesResponse: Response payload for uploading files into a Zoo-managed dataset.

type UserFeatureEntry added in v0.2.42

type UserFeatureEntry struct {
	// ID: Stable identifier for the feature flag (snake_case).
	ID Feature `json:"id" yaml:"id" schema:"id,required"`
}

UserFeatureEntry: Enabled features surfaced to end users.

type UserFeatureList added in v0.2.42

type UserFeatureList struct {
	// Features: Features that are active and safe to expose to the current user.
	Features []UserFeatureEntry `json:"features" yaml:"features" schema:"features,required"`
}

UserFeatureList: User features response payload.

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 UserResponse added in v0.2.43

type UserResponse struct {
	// AllowPayAsYouGo: Whether the user has opted into pay-as-you-go charges after using their included credits.
	AllowPayAsYouGo bool `json:"allow_pay_as_you_go" yaml:"allow_pay_as_you_go" schema:"allow_pay_as_you_go"`
	// Block: If the user should be blocked and the reason why.
	Block BlockReason `json:"block" yaml:"block" schema:"block"`
	// BlockMessage: Human-friendly block reason message.
	BlockMessage string `json:"block_message" yaml:"block_message" schema:"block_message"`
	// 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"`
	// DeletionScheduled: If the user is scheduled for deletion.
	DeletionScheduled bool `json:"deletion_scheduled" yaml:"deletion_scheduled" schema:"deletion_scheduled"`
	// 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"`
	// IsOnboarded: If the user has finished onboarding.
	IsOnboarded bool `json:"is_onboarded" yaml:"is_onboarded" schema:"is_onboarded"`
	// 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"`
	// Username: Public username/handle for community-facing features.
	Username string `json:"username" yaml:"username" schema:"username"`
}

UserResponse: Public user payload returned by the API.

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 (s *UserService) CreateShortlink(body CreateShortlinkRequest) (*CreateShortlinkResponse, error)

CreateShortlink: Create a shortlink for a user. This endpoint requires authentication by any Zoo user. It creates a shortlink for the user.

Parameters

  • `body`: Request to create a shortlink.

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. Personal Factory jobs must be completed or canceled before deleting your account. In-progress jobs owned by an organization do not prevent account deletion.

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. Personal Factory jobs must be completed or canceled before deleting your account. In-progress jobs owned by an organization do not prevent account deletion.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.DeleteSelf(); err != nil {
		panic(err)
	}

}
func (s *UserService) DeleteShortlink(key string) error

DeleteShortlink: Delete a shortlink for a user. This endpoint requires authentication by any Zoo user. It deletes a shortlink for the user.

Parameters

  • `key`

func (*UserService) EmailMarketingConsentDeclineCreate added in v0.2.43

func (s *UserService) EmailMarketingConsentDeclineCreate() error

EmailMarketingConsentDeclineCreate: Record explicit decline for email marketing consent.

Example

EmailMarketingConsentDeclineCreate: Record explicit decline for email marketing consent.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.EmailMarketingConsentDeclineCreate(); err != nil {
		panic(err)
	}

}

func (*UserService) EmailMarketingConsentList added in v0.2.43

func (s *UserService) EmailMarketingConsentList() (*EmailMarketingConsentState, error)

EmailMarketingConsentList: Get email marketing consent state for the authenticated user.

Example

EmailMarketingConsentList: Get email marketing consent state for the authenticated user.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.User.EmailMarketingConsentList()
	if err != nil {
		panic(err)
	}

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

}

func (*UserService) EmailMarketingConsentRequestCreate added in v0.2.43

func (s *UserService) EmailMarketingConsentRequestCreate() error

EmailMarketingConsentRequestCreate: Request email marketing opt-in and send a confirmation email.

Example

EmailMarketingConsentRequestCreate: Request email marketing opt-in and send a confirmation email.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.EmailMarketingConsentRequestCreate(); err != nil {
		panic(err)
	}

}

func (*UserService) EmailMarketingConsentSeenCreate added in v0.2.43

func (s *UserService) EmailMarketingConsentSeenCreate() error

EmailMarketingConsentSeenCreate: Mark the email-marketing modal as seen/dismissed for the authenticated user.

Example

EmailMarketingConsentSeenCreate: Mark the email-marketing modal as seen/dismissed for the authenticated user.

package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.EmailMarketingConsentSeenCreate(); err != nil {
		panic(err)
	}

}

func (*UserService) FeaturesList added in v0.2.42

func (s *UserService) FeaturesList() (*UserFeatureList, error)

FeaturesList: List user-visible feature flags enabled for the authenticated user. Returns only features that are marked as safe for exposure to clients and currently resolved to `true` for the requesting user (including org overrides).

Example

FeaturesList: List user-visible feature flags enabled for the authenticated user. Returns only features that are marked as safe for exposure to clients and currently resolved to `true` for the requesting user (including org overrides).

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.User.FeaturesList()
	if err != nil {
		panic(err)
	}

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

}

func (*UserService) Get added in v0.0.9

func (s *UserService) Get(id string) (*UserResponse, 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.

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.

Parameters

  • `id`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*UserService) GetCadInfoForm added in v0.2.43

func (s *UserService) GetCadInfoForm() (*WebsiteCadUserInfoForm, error)

GetCadInfoForm: Gets authenticated CAD user info form data for the current user.

Example

GetCadInfoForm: Gets authenticated CAD user info form data for the current user.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.User.GetCadInfoForm()
	if err != nil {
		panic(err)
	}

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

}

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.

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.

Parameters

  • `id`
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*UserService) GetSelf added in v0.0.9

func (s *UserService) GetSelf() (*UserResponse, 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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

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.

package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*UserService) GetSessionFor added in v0.2.14

func (s *UserService) GetSessionFor(token string) (*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`: An auth token. A uuid with a prefix of ses-
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`: An auth token. A uuid with a prefix of ses-
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

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

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

}
func (s *UserService) GetShortlinks(limit int, pageToken string, sortBy CreatedAtSortMode) (*ShortlinkResultsPage, error)

GetShortlinks: Get the shortlinks for a user. This endpoint requires authentication by any Zoo user. It gets the shortlinks for the user.

Parameters

  • `limit`

  • `pageToken`

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

    Currently, we only support scanning in ascending order.

func (*UserService) PutCadInfoForm added in v0.2.43

func (s *UserService) PutCadInfoForm(body WebsiteCadUserInfoForm) error

PutCadInfoForm: Stores authenticated CAD user info form data for the current user. Parameters

  • `body`: Request body for authenticated website CAD user info form submissions.
Example

PutCadInfoForm: Stores authenticated CAD user info form data for the current user. Parameters

  • `body`: Request body for authenticated website CAD user info form submissions.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.PutCadInfoForm(kittycad.WebsiteCadUserInfoForm{CadExperienceLevel: "", CadIndustry: "", CadUserType: "", CompanySize: "", DesignWorkflow: "", HasUsedZooDesignStudioOrAPIBefore: true, HowDidYouFindUs: "", HowDidYouFindUsOther: "some-string", LocationCity: "some-string", LocationCountry: "some-string", LocationState: "some-string", NumberOfCadUsers: "some-string", WhatAreYouBuilding: "some-string"}); err != nil {
		panic(err)
	}

}

func (*UserService) PutPublicEmailMarketingConsentRequest added in v0.2.43

func (s *UserService) PutPublicEmailMarketingConsentRequest(body PublicEmailMarketingConsentRequest) error

PutPublicEmailMarketingConsentRequest: Requests public email marketing consent for an email address. Parameters

  • `body`: The data for subscribing a user to the newsletter.
Example

PutPublicEmailMarketingConsentRequest: Requests public email marketing consent for an email address. Parameters

  • `body`: The data for subscribing a user to the newsletter.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.PutPublicEmailMarketingConsentRequest(kittycad.PublicEmailMarketingConsentRequest{Email: "example@example.com"}); err != nil {
		panic(err)
	}

}

func (*UserService) PutPublicMailingListSubscribe added in v0.2.43

func (s *UserService) PutPublicMailingListSubscribe(slug string, body PublicMailingListMembershipRequest) error

PutPublicMailingListSubscribe: Publicly subscribe an email address to a mailing list by slug. Parameters

  • `slug`
  • `body`: Request body for public mailing-list membership changes.
Example

PutPublicMailingListSubscribe: Publicly subscribe an email address to a mailing list by slug. Parameters

  • `slug`
  • `body`: Request body for public mailing-list membership changes.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.PutPublicMailingListSubscribe("some-string", kittycad.PublicMailingListMembershipRequest{Email: "example@example.com"}); err != nil {
		panic(err)
	}

}

func (*UserService) PutPublicMailingListUnsubscribe added in v0.2.43

func (s *UserService) PutPublicMailingListUnsubscribe(slug string, body PublicMailingListMembershipRequest) error

PutPublicMailingListUnsubscribe: Publicly remove an email address from a mailing list by slug. Parameters

  • `slug`
  • `body`: Request body for public mailing-list membership changes.
Example

PutPublicMailingListUnsubscribe: Publicly remove an email address from a mailing list by slug. Parameters

  • `slug`
  • `body`: Request body for public mailing-list membership changes.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.PutPublicMailingListUnsubscribe("some-string", kittycad.PublicMailingListMembershipRequest{Email: "example@example.com"}); err != nil {
		panic(err)
	}

}

func (*UserService) PutPublicSalesForm added in v0.2.43

func (s *UserService) PutPublicSalesForm(body WebsiteSalesForm) error

PutPublicSalesForm: Creates a new sales ticket in the internal help desk from the website sales form. This endpoint accepts optional authentication.

Parameters

  • `body`: Request body for website sales form submissions.
Example

PutPublicSalesForm: Creates a new sales ticket in the internal help desk from the website sales form. This endpoint accepts optional authentication.

Parameters

  • `body`: Request body for website sales form submissions.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.PutPublicSalesForm(kittycad.WebsiteSalesForm{CadPlatforms: []string{}, Company: "some-string", Email: "example@example.com", FirstName: "some-string", Industry: "some-string", InquiryType: "", JobTitle: "some-string", LastName: "some-string", Message: "some-string", NumCadUsers: "some-string", Phone: "some-string"}); err != nil {
		panic(err)
	}

}

func (*UserService) PutPublicSupportForm added in v0.2.43

func (s *UserService) PutPublicSupportForm(body WebsiteSupportForm) error

PutPublicSupportForm: Creates a new support ticket in the internal help desk from the website support form. This endpoint accepts optional authentication.

Parameters

  • `body`: Request body for website support form submissions.
Example

PutPublicSupportForm: Creates a new support ticket in the internal help desk from the website support form. This endpoint accepts optional authentication.

Parameters

  • `body`: Request body for website support form submissions.
package main

import (
	"github.com/kittycad/kittycad.go"
)

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

	if err := client.User.PutPublicSupportForm(kittycad.WebsiteSupportForm{Company: "some-string", Email: "example@example.com", FirstName: "some-string", InquiryType: "", LastName: "some-string", Message: "some-string", Phone: "some-string"}); err != nil {
		panic(err)
	}

}

func (*UserService) ReportClientError added in v0.2.43

func (s *UserService) ReportClientError(body ClientErrorReport) (*ClientErrorReportAccepted, error)

ReportClientError: Report a client-originated error. This endpoint requires authentication by any Zoo user. It accepts a structured client error payload and writes it to the server logs for triage.

Parameters

  • `body`: Structured client-side error report sent by authenticated clients.
Example

ReportClientError: Report a client-originated error. This endpoint requires authentication by any Zoo user. It accepts a structured client error payload and writes it to the server logs for triage.

Parameters

  • `body`: Structured client-side error report sent by authenticated clients.
package main

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.User.ReportClientError(kittycad.ClientErrorReport{Client: "some-string", Code: "some-string", ErrorName: "some-string", Message: "some-string", Release: "some-string", Route: "some-string", Stack: "some-string"})
	if err != nil {
		panic(err)
	}

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

}

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

import (
	"fmt"

	"github.com/kittycad/kittycad.go"
)

func main() {
	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)

}

func (*UserService) UpdateSelf added in v0.1.4

func (s *UserService) UpdateSelf(body UpdateUser) (*UserResponse, 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.
package main

import (
	"fmt"
	"net/url"

	"github.com/kittycad/kittycad.go"
)

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

	result, err := client.User.UpdateSelf(kittycad.UpdateUser{AllowPayAsYouGo: true, Company: "some-string", Discord: "some-string", FirstName: "some-string", Github: "some-string", Image: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, IsOnboarded: true, LastName: "some-string", Phone: "+1-555-555-555", Username: "some-string"})
	if err != nil {
		panic(err)
	}

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

}
func (s *UserService) UpdateShortlink(key string, body UpdateShortlinkRequest) error

UpdateShortlink: Update a shortlink for a user. This endpoint requires authentication by any Zoo user. It updates a shortlink for the user.

This endpoint really only allows you to change the `restrict_to_org` setting of a shortlink. Thus it is only useful for folks who are part of an org. If you are not part of an org, you will not be able to change the `restrict_to_org` status.

Parameters

  • `key`
  • `body`: Request to update a shortlink.

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"`
	// RedirectUrl: The URL to redirect to if the user requires SAML authentication or belongs somewhere else.
	RedirectUrl URL `json:"redirect_url" yaml:"redirect_url" schema:"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 ViewIsometric added in v0.2.34

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

ViewIsometric: The response from the `ViewIsometric` command.

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 WebSocketRequest added in v0.2.42

type WebSocketRequest any

WebSocketRequest: WebSocketRequest: The websocket messages the server receives.

type WebSocketRequestBatchID added in v0.2.41

type WebSocketRequestBatchID struct {
	// Headers: The authentication header.
	Headers map[string]string `json:"headers" yaml:"headers" schema:"headers,required"`
	// Type:
	Type string `json:"type" yaml:"type" schema:"type,required"`
}

WebSocketRequestBatchID: Authentication header request.

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 WebSocketRequestModelingCmdReq added in v0.2.34

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

WebSocketRequestModelingCmdReq: Return information about the connected instance

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 WebSocketResponse added in v0.2.42

type WebSocketResponse any

WebSocketResponse: WebSocketResponse: Websocket responses can either be successful or unsuccessful. Slightly different schemas in either case.

type WebsiteCadUserInfoForm added in v0.2.43

type WebsiteCadUserInfoForm struct {
	// CadExperienceLevel: Experience level with CAD software or APIs.
	CadExperienceLevel CadExperienceLevel `json:"cad_experience_level" yaml:"cad_experience_level" schema:"cad_experience_level"`
	// CadIndustry: The industry of the user.
	CadIndustry CadIndustry `json:"cad_industry" yaml:"cad_industry" schema:"cad_industry"`
	// CadUserType: The user type.
	CadUserType CadUserType `json:"cad_user_type" yaml:"cad_user_type" schema:"cad_user_type"`
	// CompanySize: Optional company size metadata.
	CompanySize CompanySize `json:"company_size" yaml:"company_size" schema:"company_size"`
	// DesignWorkflow: Which design workflow the user is most excited about.
	DesignWorkflow CadDesignWorkflow `json:"design_workflow" yaml:"design_workflow" schema:"design_workflow"`
	// HasUsedZooDesignStudioOrAPIBefore: Whether the user has used Zoo Design Studio or the API before.
	HasUsedZooDesignStudioOrAPIBefore bool `` /* 145-byte string literal not displayed */
	// HowDidYouFindUs: How the user found Zoo.
	HowDidYouFindUs CadDiscoverySource `json:"how_did_you_find_us" yaml:"how_did_you_find_us" schema:"how_did_you_find_us"`
	// HowDidYouFindUsOther: Optional free-text value when "Other" is selected.
	HowDidYouFindUsOther string `json:"how_did_you_find_us_other" yaml:"how_did_you_find_us_other" schema:"how_did_you_find_us_other"`
	// LocationCity: Optional city for the user's location.
	LocationCity string `json:"location_city" yaml:"location_city" schema:"location_city"`
	// LocationCountry: Optional country for the user's location.
	LocationCountry string `json:"location_country" yaml:"location_country" schema:"location_country"`
	// LocationState: Optional state or region for the user's location.
	LocationState string `json:"location_state" yaml:"location_state" schema:"location_state"`
	// NumberOfCadUsers: The number of CAD users.
	NumberOfCadUsers string `json:"number_of_cad_users" yaml:"number_of_cad_users" schema:"number_of_cad_users"`
	// WhatAreYouBuilding: Optional free-text description of what the user wants to build.
	WhatAreYouBuilding string `json:"what_are_you_building" yaml:"what_are_you_building" schema:"what_are_you_building"`
}

WebsiteCadUserInfoForm: Request body for authenticated website CAD user info form submissions.

type WebsiteSalesForm added in v0.2.43

type WebsiteSalesForm struct {
	// CadPlatforms: The CAD platforms (used for pilot inquiries).
	CadPlatforms []string `json:"cad_platforms" yaml:"cad_platforms" schema:"cad_platforms"`
	// Company: The company name.
	Company string `json:"company" yaml:"company" schema:"company"`
	// Email: The email address of the user.
	Email string `json:"email" yaml:"email" schema:"email,required"`
	// FirstName: The first name of the user.
	FirstName string `json:"first_name" yaml:"first_name" schema:"first_name,required"`
	// Industry: The industry of the user.
	Industry string `json:"industry" yaml:"industry" schema:"industry"`
	// InquiryType: The type of sales inquiry.
	InquiryType SalesInquiryType `json:"inquiry_type" yaml:"inquiry_type" schema:"inquiry_type,required"`
	// JobTitle: The job title (used for pilot inquiries).
	JobTitle string `json:"job_title" yaml:"job_title" schema:"job_title"`
	// LastName: The last name of the user.
	LastName string `json:"last_name" yaml:"last_name" schema:"last_name,required"`
	// Message: The message content.
	Message string `json:"message" yaml:"message" schema:"message,required"`
	// NumCadUsers: The number of CAD users (used for pilot inquiries).
	NumCadUsers string `json:"num_cad_users" yaml:"num_cad_users" schema:"num_cad_users"`
	// Phone: The phone number of the user.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
}

WebsiteSalesForm: Request body for website sales form submissions.

type WebsiteSupportForm added in v0.2.43

type WebsiteSupportForm struct {
	// Company: Optional company metadata.
	Company string `json:"company" yaml:"company" schema:"company"`
	// Email: The email address of the user.
	Email string `json:"email" yaml:"email" schema:"email,required"`
	// FirstName: The first name of the user.
	FirstName string `json:"first_name" yaml:"first_name" schema:"first_name,required"`
	// InquiryType: The type of support inquiry.
	InquiryType SupportInquiryType `json:"inquiry_type" yaml:"inquiry_type" schema:"inquiry_type,required"`
	// LastName: The last name of the user.
	LastName string `json:"last_name" yaml:"last_name" schema:"last_name,required"`
	// Message: The message content.
	Message string `json:"message" yaml:"message" schema:"message,required"`
	// Phone: Optional phone metadata.
	Phone string `json:"phone" yaml:"phone" schema:"phone"`
}

WebsiteSupportForm: Request body for website support form submissions.

type WorldCoordinateSystem added in v0.2.40

type WorldCoordinateSystem string

WorldCoordinateSystem is the type definition for a WorldCoordinateSystem.

const (
	// WorldCoordinateSystemRightHandedUpZ represents the WorldCoordinateSystem `"right_handed_up_z"`.
	WorldCoordinateSystemRightHandedUpZ WorldCoordinateSystem = "right_handed_up_z"
	// WorldCoordinateSystemRightHandedUpY represents the WorldCoordinateSystem `"right_handed_up_y"`.
	WorldCoordinateSystemRightHandedUpY WorldCoordinateSystem = "right_handed_up_y"
)

type ZooProductSubscription added in v0.2.33

type ZooProductSubscription struct {
	// AnnualDiscount: Annual discount. The percentage off the monthly price if the user pays annually.
	AnnualDiscount float64 `json:"annual_discount" yaml:"annual_discount" schema:"annual_discount"`
	// BillingMode: Indicates how billing collection is routed for this plan.
	BillingMode SubscriptionBillingMode `json:"billing_mode" yaml:"billing_mode" schema:"billing_mode"`
	// Description: A description of the tier.
	Description string `json:"description" yaml:"description" schema:"description,required"`
	// DisplayName: The display name of the tier.
	DisplayName string `json:"display_name" yaml:"display_name" schema:"display_name"`
	// EndpointsIncluded: The Zoo API endpoints that are included when through an approved zoo tool.
	EndpointsIncluded []APIEndpoint `json:"endpoints_included" yaml:"endpoints_included" schema:"endpoints_included"`
	// Features: Features that are included in the subscription.
	Features []SubscriptionTierFeature `json:"features" yaml:"features" schema:"features"`
	// MlCustomModels: Indicates whether the plan enables custom ML models.
	MlCustomModels bool `json:"ml_custom_models" yaml:"ml_custom_models" schema:"ml_custom_models"`
	// MonthlyPayAsYouGoAPICredits: The amount of pay-as-you-go API credits the individual or org gets outside the modeling app for each monthly account-anniversary period. The boundary is evaluated in UTC and does not change with monthly versus annual subscription payment cadence. This is equivalent to the monetary value divided by the price of an API credit.
	MonthlyPayAsYouGoAPICredits int `json:"monthly_pay_as_you_go_api_credits" yaml:"monthly_pay_as_you_go_api_credits" schema:"monthly_pay_as_you_go_api_credits"`
	// MonthlyPayAsYouGoAPICreditsMonetaryValue: The monetary value of pay-as-you-go API credits the individual or org gets outside the modeling app for each monthly account-anniversary period. The boundary is evaluated in UTC and does not change with monthly versus annual subscription payment cadence.
	MonthlyPayAsYouGoAPICreditsMonetaryValue float64 `` /* 169-byte string literal not displayed */
	// Name: The name of the tier.
	Name string `json:"name" yaml:"name" schema:"name,required"`
	// PayAsYouGoAPICreditPrice: The price of an API credit.
	PayAsYouGoAPICreditPrice float64 `json:"pay_as_you_go_api_credit_price" yaml:"pay_as_you_go_api_credit_price" schema:"pay_as_you_go_api_credit_price"`
	// 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"`
	// ShareLinks: The options for sharable links through the modeling app.
	ShareLinks []ModelingAppShareLinks `json:"share_links" yaml:"share_links" schema:"share_links"`
	// 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 ZooProductSubscriptionDowngradeReason added in v0.2.44

type ZooProductSubscriptionDowngradeReason string

ZooProductSubscriptionDowngradeReason: Customer-selected reason for downgrading an individual subscription.

const (
	// ZooProductSubscriptionDowngradeReasonCostTooHigh: The subscription price is too expensive for the customer.
	ZooProductSubscriptionDowngradeReasonCostTooHigh ZooProductSubscriptionDowngradeReason = "cost_too_high"
	// ZooProductSubscriptionDowngradeReasonErrorsOrBugs: The customer encountered product errors or bugs.
	ZooProductSubscriptionDowngradeReasonErrorsOrBugs ZooProductSubscriptionDowngradeReason = "errors_or_bugs"
	// ZooProductSubscriptionDowngradeReasonMissingFeatures: The product is missing features the customer needs.
	ZooProductSubscriptionDowngradeReasonMissingFeatures ZooProductSubscriptionDowngradeReason = "missing_features"
	// ZooProductSubscriptionDowngradeReasonAnotherAiProductBetter: The customer prefers another AI product.
	ZooProductSubscriptionDowngradeReasonAnotherAiProductBetter ZooProductSubscriptionDowngradeReason = "another_ai_product_better"
	// ZooProductSubscriptionDowngradeReasonZookeeperResultsLowQuality: The customer is unhappy with Zookeeper output quality.
	ZooProductSubscriptionDowngradeReasonZookeeperResultsLowQuality ZooProductSubscriptionDowngradeReason = "zookeeper_results_low_quality"
	// ZooProductSubscriptionDowngradeReasonReasoningTimeRunsOut: The customer runs out of reasoning time too quickly.
	ZooProductSubscriptionDowngradeReasonReasoningTimeRunsOut ZooProductSubscriptionDowngradeReason = "reasoning_time_runs_out"
	// ZooProductSubscriptionDowngradeReasonProductTooSlow: The product feels too slow for the customer.
	ZooProductSubscriptionDowngradeReasonProductTooSlow ZooProductSubscriptionDowngradeReason = "product_too_slow"
	// ZooProductSubscriptionDowngradeReasonOther: The customer selected another reason.
	ZooProductSubscriptionDowngradeReasonOther ZooProductSubscriptionDowngradeReason = "other"
)

type ZooProductSubscriptions added in v0.2.33

type ZooProductSubscriptions struct {
	// ActionClientSecret: Client secret to complete SCA/3DS for the current subscription change, when applicable.
	ActionClientSecret string `json:"action_client_secret" yaml:"action_client_secret" schema:"action_client_secret"`
	// ActionType: Type of intent associated with `action_client_secret`.
	ActionType SubscriptionActionType `json:"action_type" yaml:"action_type" schema:"action_type"`
	// 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: Slug of the modeling app subscription tier requested.
	ModelingApp string `json:"modeling_app" yaml:"modeling_app" schema:"modeling_app,required"`
	// PayAnnually: If the customer chooses to pay annually or monthly, we can add that here. The annual discount will apply if there is a discount for the subscription.
	PayAnnually bool `json:"pay_annually" yaml:"pay_annually" schema:"pay_annually"`
}

ZooProductSubscriptionsOrgRequest: A struct of Zoo product subscriptions an organization can request.

type ZooProductSubscriptionsUserRequest added in v0.2.33

type ZooProductSubscriptionsUserRequest struct {
	// DowngradeReason: Customer-selected reason for downgrading back to the free tier.
	DowngradeReason ZooProductSubscriptionDowngradeReason `json:"downgrade_reason" yaml:"downgrade_reason" schema:"downgrade_reason"`
	// DowngradeReasonText: Optional customer-provided context for the downgrade reason.
	DowngradeReasonText string `json:"downgrade_reason_text" yaml:"downgrade_reason_text" schema:"downgrade_reason_text"`
	// ModelingApp: Slug of the modeling app subscription tier requested.
	ModelingApp string `json:"modeling_app" yaml:"modeling_app" schema:"modeling_app,required"`
	// PayAnnually: If the customer chooses to pay annually or monthly, we can add that here. The annual discount will apply if there is a discount for the subscription.
	PayAnnually bool `json:"pay_annually" yaml:"pay_annually" schema:"pay_annually"`
}

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"
)

type ZookeeperAutoRouterMetadata added in v0.2.44

type ZookeeperAutoRouterMetadata struct {
	// Bucket: Auto-router classifier bucket, e.g. "simple", "moderate", or "complex".
	Bucket string `json:"bucket" yaml:"bucket" schema:"bucket,required"`
	// PromptTemplate: Prompt template/config label used by the router.
	PromptTemplate string `json:"prompt_template" yaml:"prompt_template" schema:"prompt_template"`
	// Reasons: Human-readable route reasons.
	Reasons []string `json:"reasons" yaml:"reasons" schema:"reasons"`
	// Stage: Selection stage, e.g. "classifier" or "replay".
	Stage string `json:"stage" yaml:"stage" schema:"stage"`
}

ZookeeperAutoRouterMetadata: Zookeeper Auto-router decision metadata persisted on a copilot prompt.

type ZookeeperEditPatch added in v0.2.44

type ZookeeperEditPatch struct {
	// ChangedFiles: Project files changed by this Zookeeper edit.
	ChangedFiles []ZookeeperEditPatchFile `json:"changed_files" yaml:"changed_files" schema:"changed_files"`
	// RunID: Stable id for the Zookeeper run that produced this edit.
	RunID string `json:"run_id" yaml:"run_id" schema:"run_id,required"`
}

ZookeeperEditPatch: Local replay data for a single successful Zookeeper project edit.

type ZookeeperEditPatchFile added in v0.2.44

type ZookeeperEditPatchFile any

ZookeeperEditPatchFile: ZookeeperEditPatchFile: Replay data for one project file changed by a Zookeeper edit.

type ZookeeperEditPatchFileContents added in v0.2.44

type ZookeeperEditPatchFileContents struct {
	// Contents: File contents created by Zookeeper.
	Contents string `json:"contents" yaml:"contents" schema:"contents,required"`
	// Path: Project-relative path to the changed file.
	Path string `json:"path" yaml:"path" schema:"path,required"`
	// Status:
	Status string `json:"status" yaml:"status" schema:"status,required"`
}

ZookeeperEditPatchFileContents: The file was created by Zookeeper.

type ZookeeperEditPatchFileCreated added in v0.2.44

type ZookeeperEditPatchFileCreated struct {
	// Path: Project-relative path to the changed file.
	Path string `json:"path" yaml:"path" schema:"path,required"`
	// PreviousContents: File contents before Zookeeper deleted the file.
	PreviousContents string `json:"previous_contents" yaml:"previous_contents" schema:"previous_contents,required"`
	// Status:
	Status string `json:"status" yaml:"status" schema:"status,required"`
}

ZookeeperEditPatchFileCreated: The file was deleted by Zookeeper.

type ZookeeperEditPatchFilePath added in v0.2.44

type ZookeeperEditPatchFilePath struct {
	// Diff: Machine-applicable unified diff from the previous contents to the new contents.
	Diff string `json:"diff" yaml:"diff" schema:"diff,required"`
	// Path: Project-relative path to the changed file.
	Path string `json:"path" yaml:"path" schema:"path,required"`
	// Status:
	Status string `json:"status" yaml:"status" schema:"status,required"`
}

ZookeeperEditPatchFilePath: The file was modified by Zookeeper.

type ZookeeperOpenAiIntermediateResponseCheckpoint added in v0.2.44

type ZookeeperOpenAiIntermediateResponseCheckpoint struct {
	// ExpectedToolCallIds: Tool calls emitted by this response whose outputs must be supplied on continuation.
	ExpectedToolCallIds []string `json:"expected_tool_call_ids" yaml:"expected_tool_call_ids" schema:"expected_tool_call_ids"`
	// ProjectFilesDigest: Digest of the project files against which this response was produced.
	//
	// Older checkpoints omit this field and remain useful for portable replay, but cannot authorize exact intermediate continuation.
	ProjectFilesDigest string `json:"project_files_digest" yaml:"project_files_digest" schema:"project_files_digest"`
	// ResponseID: OpenAI Responses API response identifier.
	ResponseID string `json:"response_id" yaml:"response_id" schema:"response_id,required"`
}

ZookeeperOpenAiIntermediateResponseCheckpoint: OpenAI response state required to resume an unfinished Zookeeper turn.

type ZookeeperOpenAiResponseCheckpoint added in v0.2.44

type ZookeeperOpenAiResponseCheckpoint struct {
	// ResponseID: OpenAI Responses API response identifier.
	ResponseID string `json:"response_id" yaml:"response_id" schema:"response_id,required"`
}

ZookeeperOpenAiResponseCheckpoint is the type definition for a ZookeeperOpenAiResponseCheckpoint.

type ZookeeperRecoveryToolOutput added in v0.2.44

type ZookeeperRecoveryToolOutput struct {
	// CallID: Application-level tool call identifier.
	CallID string `json:"call_id" yaml:"call_id" schema:"call_id,required"`
	// Output: Bounded readable output derived from the completed tool result.
	Output string `json:"output" yaml:"output" schema:"output,required"`
	// OutputTruncated: Whether the output above was shortened before it reached API.
	OutputTruncated bool `json:"output_truncated" yaml:"output_truncated" schema:"output_truncated"`
	// ProjectUpdated: Whether the tool changed the current project.
	ProjectUpdated bool `json:"project_updated" yaml:"project_updated" schema:"project_updated"`
	// ResponseID: OpenAI response that emitted this tool call. Older producers may omit it; such output remains useful for portable replay but not native resume.
	ResponseID string `json:"response_id" yaml:"response_id" schema:"response_id"`
	// ToolName: Name of the completed tool.
	ToolName string `json:"tool_name" yaml:"tool_name" schema:"tool_name,required"`
}

ZookeeperRecoveryToolOutput is the type definition for a ZookeeperRecoveryToolOutput.

type ZookeeperTurnUsage added in v0.2.44

type ZookeeperTurnUsage struct {
	// APICallID: API call the turn belongs to, as the backend knows it.
	APICallID string `json:"api_call_id" yaml:"api_call_id" schema:"api_call_id"`
	// CacheWriteInputTokens: Prompt tokens written to the provider's prompt cache.
	CacheWriteInputTokens int `json:"cache_write_input_tokens" yaml:"cache_write_input_tokens" schema:"cache_write_input_tokens"`
	// CachedInputTokens: Prompt tokens served from the provider's prompt cache.
	CachedInputTokens int `json:"cached_input_tokens" yaml:"cached_input_tokens" schema:"cached_input_tokens"`
	// ConversationID: Conversation the turn belongs to, as the backend knows it.
	ConversationID string `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id"`
	// CostMicroUsd: Cost in millionths of a US dollar, rounded half-up.
	CostMicroUsd int `json:"cost_micro_usd" yaml:"cost_micro_usd" schema:"cost_micro_usd"`
	// CostUsd: Exact cost as a decimal string, e.g. "0.02184000".
	CostUsd string `json:"cost_usd" yaml:"cost_usd" schema:"cost_usd"`
	// FullyPriced: Whether every request was priced.
	FullyPriced bool `json:"fully_priced" yaml:"fully_priced" schema:"fully_priced"`
	// InputTokens: Prompt tokens, including the cached and cache-write subsets below.
	InputTokens int `json:"input_tokens" yaml:"input_tokens" schema:"input_tokens"`
	// Models: Usage split by model.
	Models []ZookeeperTurnUsageModel `json:"models" yaml:"models" schema:"models"`
	// OutputTokens: Completion tokens, including the reasoning subset below.
	OutputTokens int `json:"output_tokens" yaml:"output_tokens" schema:"output_tokens"`
	// PricedRequests: Requests whose model had a known price.
	PricedRequests int `json:"priced_requests" yaml:"priced_requests" schema:"priced_requests"`
	// ReasoningTokens: Completion tokens spent on reasoning.
	ReasoningTokens int `json:"reasoning_tokens" yaml:"reasoning_tokens" schema:"reasoning_tokens"`
	// Requests: Number of model requests.
	Requests int `json:"requests" yaml:"requests" schema:"requests"`
	// SchemaVersion: Payload shape identifier, e.g. "zookeeper_turn_usage.v1".
	SchemaVersion string `json:"schema_version" yaml:"schema_version" schema:"schema_version"`
	// Stages: Usage split by the part of the turn that spent it.
	Stages []ZookeeperTurnUsageStage `json:"stages" yaml:"stages" schema:"stages"`
	// TotalTokens: Input plus output tokens.
	TotalTokens int `json:"total_tokens" yaml:"total_tokens" schema:"total_tokens"`
	// UncachedInputTokens: Prompt tokens billed at the full input rate.
	UncachedInputTokens int `json:"uncached_input_tokens" yaml:"uncached_input_tokens" schema:"uncached_input_tokens"`
	// UnpricedRequests: Requests whose model had no known price; their tokens are counted but contribute no cost, so totals are a floor rather than an estimate.
	UnpricedRequests int `json:"unpriced_requests" yaml:"unpriced_requests" schema:"unpriced_requests"`
}

ZookeeperTurnUsage: Token usage and cost for one completed Zookeeper turn. A turn is many model calls: the streamed agent loop, helper agents, conversation compaction, Auto-mode routing, and any retried attempts. This is the sum of all of them, with breakdowns by model and by stage.

type ZookeeperTurnUsageModel added in v0.2.44

type ZookeeperTurnUsageModel struct {
	// CacheWriteInputTokens: Prompt tokens written to the provider's prompt cache.
	CacheWriteInputTokens int `json:"cache_write_input_tokens" yaml:"cache_write_input_tokens" schema:"cache_write_input_tokens"`
	// CachedInputTokens: Prompt tokens served from the provider's prompt cache.
	CachedInputTokens int `json:"cached_input_tokens" yaml:"cached_input_tokens" schema:"cached_input_tokens"`
	// CostMicroUsd: Cost in millionths of a US dollar, rounded half-up.
	CostMicroUsd int `json:"cost_micro_usd" yaml:"cost_micro_usd" schema:"cost_micro_usd"`
	// CostUsd: Exact cost as a decimal string, e.g. "0.02184000".
	CostUsd string `json:"cost_usd" yaml:"cost_usd" schema:"cost_usd"`
	// FullyPriced: Whether every request was priced.
	FullyPriced bool `json:"fully_priced" yaml:"fully_priced" schema:"fully_priced"`
	// InputTokens: Prompt tokens, including the cached and cache-write subsets below.
	InputTokens int `json:"input_tokens" yaml:"input_tokens" schema:"input_tokens"`
	// Model: Model name as the provider reported it.
	Model string `json:"model" yaml:"model" schema:"model,required"`
	// OutputTokens: Completion tokens, including the reasoning subset below.
	OutputTokens int `json:"output_tokens" yaml:"output_tokens" schema:"output_tokens"`
	// PricedRequests: Requests whose model had a known price.
	PricedRequests int `json:"priced_requests" yaml:"priced_requests" schema:"priced_requests"`
	// PricingSource: Where the price came from, e.g. "litellm", "litellm_alias", "override", or "unknown".
	PricingSource string `json:"pricing_source" yaml:"pricing_source" schema:"pricing_source"`
	// ReasoningTokens: Completion tokens spent on reasoning.
	ReasoningTokens int `json:"reasoning_tokens" yaml:"reasoning_tokens" schema:"reasoning_tokens"`
	// Requests: Number of model requests.
	Requests int `json:"requests" yaml:"requests" schema:"requests"`
	// TotalTokens: Input plus output tokens.
	TotalTokens int `json:"total_tokens" yaml:"total_tokens" schema:"total_tokens"`
	// UncachedInputTokens: Prompt tokens billed at the full input rate.
	UncachedInputTokens int `json:"uncached_input_tokens" yaml:"uncached_input_tokens" schema:"uncached_input_tokens"`
	// UnpricedRequests: Requests whose model had no known price; their tokens are counted but contribute no cost, so totals are a floor rather than an estimate.
	UnpricedRequests int `json:"unpriced_requests" yaml:"unpriced_requests" schema:"unpriced_requests"`
}

ZookeeperTurnUsageModel: Per-model usage within a Zookeeper turn.

type ZookeeperTurnUsageStage added in v0.2.44

type ZookeeperTurnUsageStage struct {
	// CacheWriteInputTokens: Prompt tokens written to the provider's prompt cache.
	CacheWriteInputTokens int `json:"cache_write_input_tokens" yaml:"cache_write_input_tokens" schema:"cache_write_input_tokens"`
	// CachedInputTokens: Prompt tokens served from the provider's prompt cache.
	CachedInputTokens int `json:"cached_input_tokens" yaml:"cached_input_tokens" schema:"cached_input_tokens"`
	// CostMicroUsd: Cost in millionths of a US dollar, rounded half-up.
	CostMicroUsd int `json:"cost_micro_usd" yaml:"cost_micro_usd" schema:"cost_micro_usd"`
	// CostUsd: Exact cost as a decimal string, e.g. "0.02184000".
	CostUsd string `json:"cost_usd" yaml:"cost_usd" schema:"cost_usd"`
	// FullyPriced: Whether every request was priced.
	FullyPriced bool `json:"fully_priced" yaml:"fully_priced" schema:"fully_priced"`
	// InputTokens: Prompt tokens, including the cached and cache-write subsets below.
	InputTokens int `json:"input_tokens" yaml:"input_tokens" schema:"input_tokens"`
	// OutputTokens: Completion tokens, including the reasoning subset below.
	OutputTokens int `json:"output_tokens" yaml:"output_tokens" schema:"output_tokens"`
	// PricedRequests: Requests whose model had a known price.
	PricedRequests int `json:"priced_requests" yaml:"priced_requests" schema:"priced_requests"`
	// ReasoningTokens: Completion tokens spent on reasoning.
	ReasoningTokens int `json:"reasoning_tokens" yaml:"reasoning_tokens" schema:"reasoning_tokens"`
	// Requests: Number of model requests.
	Requests int `json:"requests" yaml:"requests" schema:"requests"`
	// Stage: Which part of the turn spent the tokens, e.g. "agent_stream", "auto_router", "compaction", "sub_agent", or "prompt_validation".
	Stage string `json:"stage" yaml:"stage" schema:"stage,required"`
	// TotalTokens: Input plus output tokens.
	TotalTokens int `json:"total_tokens" yaml:"total_tokens" schema:"total_tokens"`
	// UncachedInputTokens: Prompt tokens billed at the full input rate.
	UncachedInputTokens int `json:"uncached_input_tokens" yaml:"uncached_input_tokens" schema:"uncached_input_tokens"`
	// UnpricedRequests: Requests whose model had no known price; their tokens are counted but contribute no cost, so totals are a floor rather than an estimate.
	UnpricedRequests int `json:"unpriced_requests" yaml:"unpriced_requests" schema:"unpriced_requests"`
}

ZookeeperTurnUsageStage: Per-stage usage within a Zookeeper turn.

type ZoomToFit added in v0.2.34

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

ZoomToFit: The response from the `ZoomToFit` command.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址