Documentation
¶
Index ¶
- Constants
- type APICallQueryGroup
- type APICallQueryGroupBy
- type APICallService
- func (s *APICallService) Get(id UUID) (*APICallWithPrice, error)
- func (s *APICallService) GetAsyncOperation(id UUID) (*any, error)
- func (s *APICallService) GetForOrg(id UUID) (*APICallWithPrice, error)
- func (s *APICallService) GetForUser(id UUID) (*APICallWithPrice, error)
- func (s *APICallService) GetMetrics(groupBy APICallQueryGroupBy) (*[]APICallQueryGroup, error)
- func (s *APICallService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
- func (s *APICallService) ListAsyncOperations(limit int, pageToken string, sortBy CreatedAtSortMode, status APICallStatus) (*AsyncAPICallResultsPage, error)
- func (s *APICallService) ListForUser(id string, limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
- func (s *APICallService) OrgList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
- func (s *APICallService) UserList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
- type APICallStatus
- type APICallWithPrice
- type APICallWithPriceResultsPage
- type APIEndpoint
- type APIError
- type APIToken
- type APITokenResultsPage
- type APITokenService
- func (s *APITokenService) CreateForUser(label string) (*APIToken, error)
- func (s *APITokenService) DeleteForUser(token string) error
- func (s *APITokenService) GetForUser(token string) (*APIToken, error)
- func (s *APITokenService) ListForUser(limit int, pageToken string, sortBy CreatedAtSortMode) (*APITokenResultsPage, error)
- type AccountProvider
- type AddHoleFromOffset
- type AddOrgMember
- type Address
- type AddressDetails
- type AdjacencyInfo
- type Angle
- type AnnotationBasicDimension
- type AnnotationFeatureControl
- type AnnotationFeatureTag
- type AnnotationLineEnd
- type AnnotationLineEndOptions
- type AnnotationMbdBasicDimension
- type AnnotationMbdControlFrame
- type AnnotationOptions
- type AnnotationTextAlignmentX
- type AnnotationTextAlignmentY
- type AnnotationTextOptions
- type AnnotationType
- type AppClientInfo
- type AppService
- type AsyncAPICall
- type AsyncAPICallOutput
- type AsyncAPICallOutputCompletedAt
- type AsyncAPICallOutputCreatedAt
- type AsyncAPICallOutputError
- type AsyncAPICallOutputID
- type AsyncAPICallOutputOutputFormat
- type AsyncAPICallOutputOutputFormatOptions
- type AsyncAPICallOutputOutputs
- type AsyncAPICallOutputSrcFormat
- type AsyncAPICallOutputSrcFormatOptions
- type AsyncAPICallResultsPage
- type AsyncAPICallType
- type AuthAPIKeyResponse
- type AuthCallback
- type Axi
- type Axis
- type AxisDirectionPair
- type Base64
- type BatchResponse
- type BatchResponseErrors
- type BatchResponseResponse
- type BetaService
- type BillingInfo
- type BlockReason
- type BooleanIntersection
- type BooleanSubtract
- type BooleanUnion
- type CameraDragEnd
- type CameraDragInteractionType
- type CameraDragMove
- type CameraDragStart
- type CameraMovement
- type CameraSettings
- type CameraViewState
- type CardDetails
- type CenterOfMass
- type Chamfer
- type Client
- type ClientMetrics
- type ClosePath
- type CodeLanguage
- type CodeOption
- type CodeOutput
- type Color
- type ComplementaryEdges
- type ComponentTransform
- type ConstantService
- type Conversation
- type ConversationID
- type ConversationResultsPage
- type ConversionParams
- type ConversionSortMode
- type Coupon
- type CreateCustomModel
- type CreateOrgDataset
- type CreateShortlinkRequest
- type CreateShortlinkResponse
- type CreatedAtSortMode
- type CrmData
- type CurveGetControlPoints
- type CurveGetEndPoints
- type CurveGetType
- type CurveSetConstraint
- type CurveType
- type Custom
- type CustomModel
- type Customer
- type CustomerBalance
- type CutStrategy
- type CutType
- type CutTypeV2
- type CutTypeV2Chamfer
- type CutTypeV2Custom
- type CutTypeV2Fillet
- type Data
- type DatasetS3Policies
- type DefaultCameraCenterToScene
- type DefaultCameraCenterToSelection
- type DefaultCameraFocusOn
- type DefaultCameraGetSettings
- type DefaultCameraGetView
- type DefaultCameraLookAt
- type DefaultCameraPerspectiveSettings
- type DefaultCameraSetOrthographic
- type DefaultCameraSetPerspective
- type DefaultCameraSetView
- type DefaultCameraZoom
- type Delta
- type Density
- type DerEncodedKeyPair
- type DeviceAccessTokenRequestForm
- type DeviceAuthConfirmParams
- type DeviceAuthRequestForm
- type Direction
- type DisableDryRun
- type Discount
- type DiscountCode
- type DistanceType
- type DistanceTypeAxis
- type DistanceTypeEuclidean
- type DxfStorage
- type EdgeInfo
- type EdgeLinesVisible
- type EmailAuthenticationForm
- type EnableDryRun
- type EnableSketchMode
- type EndOfStream
- type EngineUtilEvaluatePath
- type EntityCircularPattern
- type EntityClone
- type EntityFade
- type EntityGetAllChildUuids
- type EntityGetChildUuid
- type EntityGetDistance
- type EntityGetNumChildren
- type EntityGetParentID
- type EntityGetSketchPaths
- type EntityLinearPattern
- type EntityLinearPatternTransform
- type EntityMakeHelix
- type EntityMakeHelixFromEdge
- type EntityMakeHelixFromParams
- type EntityMirror
- type EntityMirrorAcrossEdge
- type EntityReference
- type EntitySetOpacity
- type EntityType
- type Error
- type ErrorCode
- type Event
- type ExecutorService
- type Export
- type Export2D
- type Export3D
- type ExportFile
- type ExtendPath
- type ExtendedUser
- type ExtendedUserResultsPage
- type Extrude
- type ExtrudeMethod
- type ExtrudeReference
- type ExtrudeReferenceAxis
- type ExtrudeReferenceEntityReference
- type ExtrudeReferencePoint
- type ExtrudeToReference
- type ExtrudedFaceInfo
- type ExtrusionFaceCapType
- type ExtrusionFaceInfo
- type FaceEdgeInfo
- type FaceGetCenter
- type FaceGetGradient
- type FaceGetPosition
- type FaceIsPlanar
- type FailureWebSocketResponse
- type FbxStorage
- type FileCenterOfMass
- type FileConversion
- type FileDensity
- type FileExportFormat
- type FileImportFormat
- type FileMass
- type FileService
- func (s *FileService) CreateCenterOfMass(outputUnit UnitLength, srcFormat FileImportFormat, body []byte) (*FileCenterOfMass, error)
- func (s *FileService) CreateConversion(outputFormat FileExportFormat, srcFormat FileImportFormat, body []byte) (*FileConversion, error)
- func (s *FileService) CreateConversionOptions(body *bytes.Buffer) (*FileConversion, error)
- func (s *FileService) CreateDensity(materialMass float64, materialMassUnit UnitMas, outputUnit UnitDensity, ...) (*FileDensity, error)
- func (s *FileService) CreateMass(materialDensity float64, materialDensityUnit UnitDensity, outputUnit UnitMas, ...) (*FileMass, error)
- func (s *FileService) CreateSurfaceArea(outputUnit UnitArea, srcFormat FileImportFormat, body []byte) (*FileSurfaceArea, error)
- func (s *FileService) CreateVolume(outputUnit UnitVolume, srcFormat FileImportFormat, body []byte) (*FileVolume, error)
- type FileSurfaceArea
- type FileVolume
- type Fillet
- type GetEntityType
- type GetNumObjects
- type GetSketchModePlane
- type GlobalAxi
- type GltfPresentation
- type GltfStorage
- type HTTPError
- type HandleMouseDragEnd
- type HandleMouseDragMove
- type HandleMouseDragStart
- type HiddenService
- func (s *HiddenService) AuthAPIKey() (*AuthAPIKeyResponse, error)
- func (s *HiddenService) AuthEmail(body EmailAuthenticationForm) (*VerificationTokenResponse, error)
- func (s *HiddenService) AuthEmailCallback(callbackUrl URL, email string, token string) error
- func (s *HiddenService) GetAuthSaml(providerId UUID, callbackUrl URL) error
- func (s *HiddenService) GetAuthSamlByOrg(orgId UUID, callbackUrl URL) error
- func (s *HiddenService) Logout() error
- func (s *HiddenService) PostAuthSaml(providerId UUID, body []byte) error
- func (s *HiddenService) RedirectUserShortlink(key string) error
- type HighlightSetEntities
- type HighlightSetEntity
- type IP
- type IceServer
- type IdpMetadataSource
- type IdpMetadataSourceIdpMetadataSourceUrl
- type IdpMetadataSourceUrl
- type ImageFormat
- type ImportFile
- type ImportFiles
- type ImportedGeometry
- type Info
- type InputFormat3D
- type InputFormat3Dcoords
- type InputFormat3Dfbx
- type InputFormat3Dgltf
- type InputFormat3Dobj
- type InputFormat3Dply
- type InputFormat3Dunits
- type InquiryForm
- type InquiryType
- type Invoice
- type InvoiceLineItem
- type InvoiceStatus
- type IpAddrInfo
- type KclCodeCompletionParams
- type KclCodeCompletionRequest
- type KclCodeCompletionResponse
- type KclModel
- type Loft
- type MakeAxesGizmo
- type MakeOffsetPath
- type MakePlane
- type Mass
- type MbdSymbol
- type MetaService
- func (s *MetaService) CommunitySso(sig string, sso string) error
- func (s *MetaService) CreateDebugUploads(body *bytes.Buffer) (*[]URL, error)
- func (s *MetaService) CreateEvent(body *bytes.Buffer) error
- func (s *MetaService) GetIpinfo() (*IpAddrInfo, error)
- func (s *MetaService) GetPricingSubscriptions() (*map[string][]ZooProductSubscription, error)
- func (s *MetaService) GetSchema() error
- func (s *MetaService) InternalGetAPITokenForDiscordUser(discordId string) (*APIToken, error)
- func (s *MetaService) Ping() (*Pong, error)
- type Method
- type MlCopilotClientMessage
- type MlCopilotClientMessageContent
- type MlCopilotClientMessageHeaders
- type MlCopilotClientMessageMlCopilotClientMessageHeaders
- type MlCopilotMode
- type MlCopilotServerMessage
- type MlCopilotServerMessageConversationID
- type MlCopilotServerMessageDelta
- type MlCopilotServerMessageEndOfStream
- type MlCopilotServerMessageError
- type MlCopilotServerMessageErrorError
- type MlCopilotServerMessageInfo
- type MlCopilotServerMessageProjectUpdated
- type MlCopilotServerMessageReasoning
- type MlCopilotServerMessageReplay
- type MlCopilotServerMessageSessionData
- type MlCopilotServerMessageToolOutput
- type MlCopilotSupportedModel
- type MlCopilotSystemCommand
- type MlCopilotTool
- type MlFeedback
- type MlPrompt
- type MlPromptMetadata
- type MlPromptResultsPage
- type MlPromptType
- type MlReasoningEffort
- type MlService
- func (s *MlService) CopilotWs(conversationId UUID, replay bool, pr int, body any) (*websocket.Conn, error)
- func (s *MlService) CreateCustomModel(body CreateCustomModel) (*CustomModel, error)
- func (s *MlService) CreateKclCodeCompletions(body KclCodeCompletionRequest) (*KclCodeCompletionResponse, error)
- func (s *MlService) CreateProprietaryToKcl(codeOption CodeOption, body *bytes.Buffer) (*KclModel, error)
- func (s *MlService) CreateTextToCad(outputFormat FileExportFormat, kcl bool, body TextToCadCreateBody) (*TextToCad, error)
- func (s *MlService) CreateTextToCadIteration(body TextToCadIterationBody) (*TextToCadIteration, error)
- func (s *MlService) CreateTextToCadMultiFileIteration(body *bytes.Buffer) (*TextToCadMultiFileIteration, error)
- func (s *MlService) CreateTextToCadPartFeedback(id UUID, feedback MlFeedback) error
- func (s *MlService) GetCustomModel(id UUID) (*CustomModel, error)
- func (s *MlService) GetPrompt(id UUID) (*MlPrompt, error)
- func (s *MlService) GetTextToCadPartForUser(id UUID) (*any, error)
- func (s *MlService) ListConversationsForUser(limit int, pageToken string, sortBy CreatedAtSortMode) (*ConversationResultsPage, error)
- func (s *MlService) ListOrgDatasetsForModel(id UUID) (*[]OrgDataset, error)
- func (s *MlService) ListPrompts(limit int, pageToken string, sortBy CreatedAtSortMode) (*MlPromptResultsPage, error)
- func (s *MlService) ListTextToCadPartsForUser(limit int, pageToken string, sortBy CreatedAtSortMode, conversationId UUID, ...) (*TextToCadResponseResultsPage, error)
- func (s *MlService) ReasoningWs(id UUID, body any) (*websocket.Conn, error)
- func (s *MlService) UpdateCustomModel(id UUID, body UpdateCustomModel) (*CustomModel, error)
- type MlToolResult
- type MlToolResultError
- type MlToolResultOutputs
- type MlToolResultProjectName
- type ModelingAppEventType
- type ModelingAppShareLinks
- type ModelingAppSubscriptionTier
- type ModelingCmd
- type ModelingCmdAngle
- type ModelingCmdAngleStepSize
- type ModelingCmdArcDegrees
- type ModelingCmdAxis
- type ModelingCmdAxisIs2D
- type ModelingCmdBaseCurveIndex
- type ModelingCmdBezApproximateRational
- type ModelingCmdCameraDragEnd
- type ModelingCmdCameraDragMove
- type ModelingCmdCameraDragStart
- type ModelingCmdCenter
- type ModelingCmdCenter2D
- type ModelingCmdChildIndex
- type ModelingCmdClosePath
- type ModelingCmdCylinderID
- type ModelingCmdDefaultCameraGetSettings
- type ModelingCmdDefaultCameraGetView
- type ModelingCmdDefaultCameraLookAt
- type ModelingCmdDefaultCameraPerspectiveSettings
- type ModelingCmdDefaultCameraSetView
- type ModelingCmdDefaultCameraZoom
- type ModelingCmdDistance
- type ModelingCmdDistanceType
- type ModelingCmdEdgeID
- type ModelingCmdEngineUtilEvaluatePath
- type ModelingCmdEntityCircularPattern
- type ModelingCmdEntityClone
- type ModelingCmdEntityGetAllChildUuids
- type ModelingCmdEntityGetChildUuid
- type ModelingCmdEntityGetDistance
- type ModelingCmdEntityGetNumChildren
- type ModelingCmdEntityGetParentID
- type ModelingCmdEntityGetSketchPaths
- type ModelingCmdEntityID
- type ModelingCmdEntityId1
- type ModelingCmdEntityId2
- type ModelingCmdEntityIds
- type ModelingCmdEntityLinearPattern
- type ModelingCmdEntityLinearPatternTransform
- type ModelingCmdExport
- type ModelingCmdExport2D
- type ModelingCmdExport3D
- type ModelingCmdExtendPath
- type ModelingCmdExtrude
- type ModelingCmdExtrudeMethod
- type ModelingCmdExtrudeToReference
- type ModelingCmdFaceIds
- type ModelingCmdFaces
- type ModelingCmdFormat
- type ModelingCmdFovY
- type ModelingCmdHollow
- type ModelingCmdInteraction
- type ModelingCmdLabel
- type ModelingCmdLoft
- type ModelingCmdMagnitude
- type ModelingCmdModelingCmdAngle
- type ModelingCmdModelingCmdAxis
- type ModelingCmdModelingCmdCenter
- type ModelingCmdModelingCmdDistance
- type ModelingCmdModelingCmdEntityID
- type ModelingCmdModelingCmdEntityIds
- type ModelingCmdModelingCmdExtrudeMethod
- type ModelingCmdModelingCmdFaces
- type ModelingCmdModelingCmdFormat
- type ModelingCmdModelingCmdInteraction
- type ModelingCmdModelingCmdNumRepetitions
- type ModelingCmdModelingCmdOpposite
- type ModelingCmdModelingCmdPath
- type ModelingCmdModelingCmdSequence
- type ModelingCmdModelingCmdTarget
- type ModelingCmdModelingCmdTolerance
- type ModelingCmdModelingCmdUp
- type ModelingCmdModelingCmdVantage
- type ModelingCmdModelingCmdWindow
- type ModelingCmdMovePathPen
- type ModelingCmdNumRepetitions
- type ModelingCmdObjectID
- type ModelingCmdOpposite
- type ModelingCmdOrigin
- type ModelingCmdPath
- type ModelingCmdPathID
- type ModelingCmdPathJson
- type ModelingCmdReference
- type ModelingCmdRelativeTo
- type ModelingCmdReq
- type ModelingCmdRevolve
- type ModelingCmdRevolveAboutEdge
- type ModelingCmdRotateDuplicates
- type ModelingCmdSectionIds
- type ModelingCmdSectional
- type ModelingCmdSegment
- type ModelingCmdSequence
- type ModelingCmdShellThickness
- type ModelingCmdSolid3DshellFace
- type ModelingCmdSpacing
- type ModelingCmdStartPath
- type ModelingCmdSweep
- type ModelingCmdT
- type ModelingCmdTarget
- type ModelingCmdTo
- type ModelingCmdTolerance
- type ModelingCmdTotalRotationAngle
- type ModelingCmdTrajectory
- type ModelingCmdTransform
- type ModelingCmdTransforms
- type ModelingCmdTwistExtrude
- type ModelingCmdUp
- type ModelingCmdVantage
- type ModelingCmdVdegree
- type ModelingCmdView
- type ModelingCmdWindow
- type ModelingCmdZfar
- type ModelingCmdZnear
- type ModelingService
- type ModelingSessionData
- type MouseClick
- type MouseMove
- type MovePathPen
- type NewAnnotation
- type Oauth2ClientInfo
- type Oauth2GrantType
- type Oauth2Service
- func (s *Oauth2Service) DeviceAccessToken(body DeviceAccessTokenRequestForm) error
- func (s *Oauth2Service) DeviceAuthConfirm(body DeviceAuthConfirmParams) error
- func (s *Oauth2Service) DeviceAuthRequest(body DeviceAuthRequestForm) error
- func (s *Oauth2Service) DeviceAuthVerify(appName string, userCode string) error
- func (s *Oauth2Service) ProviderCallback(provider AccountProvider, code string, idToken string, state string, ...) error
- func (s *Oauth2Service) ProviderCallbackCreate(provider AccountProvider, body AuthCallback) error
- func (s *Oauth2Service) ProviderConsent(provider AccountProvider, callbackUrl string) (*Oauth2ClientInfo, error)
- func (s *Oauth2Service) TokenRevoke(body TokenRevokeRequestForm) error
- type ObjectBringToFront
- type ObjectSetMaterialParamsPbr
- type ObjectVisible
- type OkModelingCmdResponse
- type OkModelingCmdResponseCameraDragEnd
- type OkModelingCmdResponseCameraDragMove
- type OkModelingCmdResponseCameraDragStart
- type OkModelingCmdResponseClosePath
- type OkModelingCmdResponseCurveSetConstraint
- type OkModelingCmdResponseData
- type OkModelingCmdResponseDefaultCameraCenterToScene
- type OkModelingCmdResponseDefaultCameraCenterToSelection
- type OkModelingCmdResponseDefaultCameraLookAt
- type OkModelingCmdResponseDefaultCameraPerspectiveSettings
- type OkModelingCmdResponseDefaultCameraSetOrthographic
- type OkModelingCmdResponseDefaultCameraSetPerspective
- type OkModelingCmdResponseDisableDryRun
- type OkModelingCmdResponseEdgeLinesVisible
- type OkModelingCmdResponseEmpty
- type OkModelingCmdResponseEnableDryRun
- type OkModelingCmdResponseEnableSketchMode
- type OkModelingCmdResponseEngineUtilEvaluatePath
- type OkModelingCmdResponseEntityFade
- type OkModelingCmdResponseEntityGetAllChildUuids
- type OkModelingCmdResponseEntityGetChildUuid
- type OkModelingCmdResponseEntityGetNumChildren
- type OkModelingCmdResponseEntityGetParentID
- type OkModelingCmdResponseEntityGetSketchPaths
- type OkModelingCmdResponseEntitySetOpacity
- type OkModelingCmdResponseExport
- type OkModelingCmdResponseExport2D
- type OkModelingCmdResponseExport3D
- type OkModelingCmdResponseExtendPath
- type OkModelingCmdResponseExtrude
- type OkModelingCmdResponseExtrudeToReference
- type OkModelingCmdResponseHandleMouseDragEnd
- type OkModelingCmdResponseHandleMouseDragMove
- type OkModelingCmdResponseHandleMouseDragStart
- type OkModelingCmdResponseHighlightSetEntities
- type OkModelingCmdResponseHighlightSetEntity
- type OkModelingCmdResponseLoft
- type OkModelingCmdResponseMakeAxesGizmo
- type OkModelingCmdResponseMakePlane
- type OkModelingCmdResponseMouseMove
- type OkModelingCmdResponseMovePathPen
- type OkModelingCmdResponseNewAnnotation
- type OkModelingCmdResponseObjectBringToFront
- type OkModelingCmdResponseObjectSetMaterialParamsPbr
- type OkModelingCmdResponseObjectVisible
- type OkModelingCmdResponseOkModelingCmdResponseData
- type OkModelingCmdResponsePlaneSetColor
- type OkModelingCmdResponseReconfigureStream
- type OkModelingCmdResponseRemoveSceneObjects
- type OkModelingCmdResponseRevolve
- type OkModelingCmdResponseRevolveAboutEdge
- type OkModelingCmdResponseSceneClearAll
- type OkModelingCmdResponseSelectAdd
- type OkModelingCmdResponseSelectClear
- type OkModelingCmdResponseSelectRemove
- type OkModelingCmdResponseSelectReplace
- type OkModelingCmdResponseSelectWithPoint
- type OkModelingCmdResponseSendObject
- type OkModelingCmdResponseSetBackgroundColor
- type OkModelingCmdResponseSetCurrentToolProperties
- type OkModelingCmdResponseSetDefaultSystemProperties
- type OkModelingCmdResponseSetSceneUnits
- type OkModelingCmdResponseSetSelectionFilter
- type OkModelingCmdResponseSetSelectionType
- type OkModelingCmdResponseSetTool
- type OkModelingCmdResponseSketchModeDisable
- type OkModelingCmdResponseSolid2DaddHole
- type OkModelingCmdResponseSolid3DcutEdges
- type OkModelingCmdResponseSolid3DfilletEdge
- type OkModelingCmdResponseSolid3DshellFace
- type OkModelingCmdResponseStartPath
- type OkModelingCmdResponseSweep
- type OkModelingCmdResponseTwistExtrude
- type OkModelingCmdResponseUpdateAnnotation
- type OkWebSocketResponseData
- type OkWebSocketResponseDataData
- type OkWebSocketResponseDataIceServerInfo
- type OkWebSocketResponseDataModeling
- type OkWebSocketResponseDataModelingBatch
- type OkWebSocketResponseDataOkWebSocketResponseDataData
- type OkWebSocketResponseDataSdpAnswer
- type OkWebSocketResponseDataTrickleIce
- type Org
- type OrgAddress
- type OrgAdminDetails
- type OrgDataset
- type OrgDatasetConversionStatsResponse
- type OrgDatasetFileConversion
- type OrgDatasetFileConversionDetails
- type OrgDatasetFileConversionStatus
- type OrgDatasetFileConversionSummary
- type OrgDatasetFileConversionSummaryResultsPage
- type OrgDatasetResultsPage
- type OrgDatasetSource
- type OrgDatasetStatus
- type OrgDetails
- type OrgMember
- type OrgMemberResultsPage
- type OrgResultsPage
- type OrgRole
- type OrgService
- func (s *OrgService) AdminDetailsList(id UUID) (*OrgAdminDetails, error)
- func (s *OrgService) Create(body OrgDetails) (*Org, error)
- func (s *OrgService) CreateDataset(body CreateOrgDataset) (*OrgDataset, error)
- func (s *OrgService) CreateMember(body AddOrgMember) (*OrgMember, error)
- func (s *OrgService) CreateSamlIdp(body SamlIdentityProviderCreate) (*SamlIdentityProvider, error)
- func (s *OrgService) DatasetS3Policies(roleArn string, uri string) (*DatasetS3Policies, error)
- func (s *OrgService) Delete() error
- func (s *OrgService) DeleteDataset(id UUID) error
- func (s *OrgService) DeleteMember(userId UUID) error
- func (s *OrgService) DeleteSamlIdp() error
- func (s *OrgService) Get() (*Org, error)
- func (s *OrgService) GetAny(id UUID) (*Org, error)
- func (s *OrgService) GetDataset(id UUID) (*OrgDataset, error)
- func (s *OrgService) GetDatasetConversion(conversionId UUID, id UUID) (*OrgDatasetFileConversionDetails, error)
- func (s *OrgService) GetDatasetConversionStats(id UUID) (*OrgDatasetConversionStatsResponse, error)
- func (s *OrgService) GetMember(userId UUID) (*OrgMember, error)
- func (s *OrgService) GetPrivacySettings() (*PrivacySettings, error)
- func (s *OrgService) GetSamlIdp() (*SamlIdentityProvider, error)
- func (s *OrgService) GetShortlinks(limit int, pageToken string, sortBy CreatedAtSortMode) (*ShortlinkResultsPage, error)
- func (s *OrgService) GetUser() (*UserOrgInfo, error)
- func (s *OrgService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*OrgResultsPage, error)
- func (s *OrgService) ListDatasetConversions(id UUID, limit int, pageToken string, sortBy ConversionSortMode) (*OrgDatasetFileConversionSummaryResultsPage, error)
- func (s *OrgService) ListDatasets(limit int, pageToken string, sortBy CreatedAtSortMode) (*OrgDatasetResultsPage, error)
- func (s *OrgService) ListMembers(limit int, pageToken string, sortBy CreatedAtSortMode, role UserOrgRole) (*OrgMemberResultsPage, error)
- func (s *OrgService) RescanDataset(id UUID) (*OrgDataset, error)
- func (s *OrgService) RetryDatasetConversion(conversionId UUID, id UUID) (*OrgDatasetFileConversion, error)
- func (s *OrgService) Update(body OrgDetails) (*Org, error)
- func (s *OrgService) UpdateDataset(id UUID, body UpdateOrgDataset) (*OrgDataset, error)
- func (s *OrgService) UpdateMember(userId UUID, body UpdateMemberToOrgBody) (*OrgMember, error)
- func (s *OrgService) UpdatePrivacySettings(body PrivacySettings) (*PrivacySettings, error)
- func (s *OrgService) UpdateSamlIdp(body SamlIdentityProviderCreate) (*SamlIdentityProvider, error)
- type OrientToFace
- type OriginType
- type OriginTypeGlobal
- type OriginTypeLocal
- type OriginTypeOrigin
- type OutputFile
- type OutputFormat2D
- type OutputFormat3D
- type OutputFormat3Dcreated
- type OutputFormat3Dfbx
- type OutputFormat3Dgltf
- type OutputFormat3Dpresentation
- type OutputFormat3Dstorage
- type PathCommand
- type PathComponentConstraintBound
- type PathComponentConstraintType
- type PathGetCurveUuid
- type PathGetCurveUuidsForVertices
- type PathGetInfo
- type PathGetSketchTargetUuid
- type PathGetVertexUuids
- type PathSegment
- type PathSegmentArc
- type PathSegmentCenter
- type PathSegmentEnd
- type PathSegmentInfo
- type PathSegmentLine
- type PathSegmentPathSegmentEnd
- type PathSegmentPathSegmentRelative
- type PathSegmentRadius
- type PathSegmentRelative
- type PathSegmentStart
- type PaymentIntent
- type PaymentMethod
- type PaymentMethodCardChecks
- type PaymentMethodType
- type PaymentService
- func (s *PaymentService) CreateInformationForOrg(body BillingInfo) (*Customer, error)
- func (s *PaymentService) CreateInformationForUser(body BillingInfo) (*Customer, error)
- func (s *PaymentService) CreateIntentForOrg() (*PaymentIntent, error)
- func (s *PaymentService) CreateIntentForUser() (*PaymentIntent, error)
- func (s *PaymentService) CreateOrgSubscription(body ZooProductSubscriptionsOrgRequest) (*ZooProductSubscriptions, error)
- func (s *PaymentService) CreateUserSubscription(body ZooProductSubscriptionsUserRequest) (*ZooProductSubscriptions, error)
- func (s *PaymentService) DeleteInformationForOrg() error
- func (s *PaymentService) DeleteInformationForUser() error
- func (s *PaymentService) DeleteMethodForOrg(id string) error
- func (s *PaymentService) DeleteMethodForUser(id string, force bool) error
- func (s *PaymentService) GetBalanceForAnyOrg(includeTotalDue bool, id UUID) (*CustomerBalance, error)
- func (s *PaymentService) GetBalanceForAnyUser(id string, includeTotalDue bool) (*CustomerBalance, error)
- func (s *PaymentService) GetBalanceForOrg(includeTotalDue bool) (*CustomerBalance, error)
- func (s *PaymentService) GetBalanceForUser(includeTotalDue bool) (*CustomerBalance, error)
- func (s *PaymentService) GetInformationForOrg() (*Customer, error)
- func (s *PaymentService) GetInformationForUser() (*Customer, error)
- func (s *PaymentService) GetOrgSubscription() (*ZooProductSubscriptions, error)
- func (s *PaymentService) GetUserSubscription() (*ZooProductSubscriptions, error)
- func (s *PaymentService) ListInvoicesForOrg() (*[]Invoice, error)
- func (s *PaymentService) ListInvoicesForUser() (*[]Invoice, error)
- func (s *PaymentService) ListMethodsForOrg() (*[]PaymentMethod, error)
- func (s *PaymentService) ListMethodsForUser() (*[]PaymentMethod, error)
- func (s *PaymentService) SetDefaultMethodForUser(id string) error
- func (s *PaymentService) UpdateBalanceForAnyOrg(id UUID, includeTotalDue bool, body UpdatePaymentBalance) (*CustomerBalance, error)
- func (s *PaymentService) UpdateBalanceForAnyUser(id string, includeTotalDue bool, body UpdatePaymentBalance) (*CustomerBalance, error)
- func (s *PaymentService) UpdateInformationForOrg(body BillingInfo) (*Customer, error)
- func (s *PaymentService) UpdateInformationForUser(body BillingInfo) (*Customer, error)
- func (s *PaymentService) UpdateOrgSubscription(body ZooProductSubscriptionsOrgRequest) (*ZooProductSubscriptions, error)
- func (s *PaymentService) UpdateOrgSubscriptionForAnyOrg(id UUID, body ZooProductSubscriptionsOrgRequest) (*ZooProductSubscriptions, error)
- func (s *PaymentService) UpdateUserSubscription(body ZooProductSubscriptionsUserRequest) (*ZooProductSubscriptions, error)
- func (s *PaymentService) UpsertSubscriptionPlanPrice(slug string, body PriceUpsertRequest) (*SubscriptionPlanPriceRecord, error)
- func (s *PaymentService) ValidateCustomerTaxInformationForOrg() error
- func (s *PaymentService) ValidateCustomerTaxInformationForUser() error
- type PerspectiveCameraParameters
- type PivotPosition
- type PivotRotation
- type PlanInterval
- type PlanStep
- type PlaneIntersectAndProject
- type PlaneSetColor
- type PlyStorage
- type Point
- type Point2D
- type Point3D
- type Point4D
- type Pong
- type PostEffectType
- type PriceUpsertRequest
- type PrivacySettings
- type ProjectEntityToPlane
- type ProjectPointsToPlane
- type ProjectUpdated
- type RawFile
- type ReasoningMessage
- type ReasoningMessageContent
- type ReasoningMessageFeatureTreeOutline
- type ReasoningMessageKclCodeExamples
- type ReasoningMessageKclDocs
- type ReasoningMessageMarkdown
- type ReasoningMessageReasoningMessageContent
- type ReasoningMessageSteps
- type ReasoningMessageText
- type ReconfigureStream
- type RelativeTo
- type RemoveSceneObjects
- type Replay
- type ResponseError
- type Revolve
- type RevolveAboutEdge
- type Rotation
- type RtcIceCandidateInit
- type RtcSdpType
- type RtcSessionDescription
- type SamlIdentityProvider
- type SamlIdentityProviderCreate
- type SceneClearAll
- type SceneGetEntityIds
- type SceneSelectionType
- type SceneToolType
- type SelectAdd
- type SelectClear
- type SelectGet
- type SelectRemove
- type SelectReplace
- type SelectWithPoint
- type Selection
- type SelectionDefaultScene
- type SelectionIndex
- type SelectionName
- type SelectionSceneByIndex
- type SelectionSceneByName
- type SendObject
- type ServiceAccount
- type ServiceAccountResultsPage
- type ServiceAccountService
- func (s *ServiceAccountService) CreateForOrg(label string) (*ServiceAccount, error)
- func (s *ServiceAccountService) DeleteForOrg(token string) error
- func (s *ServiceAccountService) GetForOrg(token string) (*ServiceAccount, error)
- func (s *ServiceAccountService) ListForOrg(limit int, pageToken string, sortBy CreatedAtSortMode) (*ServiceAccountResultsPage, error)
- type Session
- type SessionData
- type SetBackgroundColor
- type SetCurrentToolProperties
- type SetDefaultSystemProperties
- type SetGridAutoScale
- type SetGridReferencePlane
- type SetGridScale
- type SetObjectTransform
- type SetOrderIndependentTransparency
- type SetSceneUnits
- type SetSelectionFilter
- type SetSelectionType
- type SetTool
- type Shortlink
- type ShortlinkResultsPage
- type ShortlinkService
- type SideFace
- type SketchModeDisable
- type Solid2DAddHole
- type Solid3DCutEdges
- type Solid3DFilletEdge
- type Solid3DGetAdjacencyInfo
- type Solid3DGetAllEdgeFaces
- type Solid3DGetAllOppositeEdges
- type Solid3DGetCommonEdge
- type Solid3DGetExtrusionFaceInfo
- type Solid3DGetNextAdjacentEdge
- type Solid3DGetOppositeEdge
- type Solid3DGetPrevAdjacentEdge
- type Solid3DShellFace
- type SourcePosition
- type SourceRange
- type SourceRangePrompt
- type StartPath
- type StlStorage
- type StorageProvider
- type StoreCouponParams
- type StoreService
- type Subscribe
- type SubscriptionActionType
- type SubscriptionPlanBillingModel
- type SubscriptionPlanPriceRecord
- type SubscriptionTierFeature
- type SubscriptionTierPrice
- type SubscriptionTierPriceFlat
- type SubscriptionTierPriceInterval
- type SubscriptionTierPricePrice
- type SubscriptionTierType
- type SubscriptionTierTypeIndividual
- type SubscriptionTierTypeSamlSso
- type SubscriptionTrainingDataBehavior
- type SuccessWebSocketResponse
- type SupportTier
- type SurfaceArea
- type Sweep
- type System
- type TakeSnapshot
- type TextToCad
- type TextToCadCreateBody
- type TextToCadIteration
- type TextToCadIterationBody
- type TextToCadModel
- type TextToCadMultiFileIteration
- type TextToCadMultiFileIterationBody
- type TextToCadResponse
- type TextToCadResponseCode
- type TextToCadResponseCompletedAt
- type TextToCadResponseConversationID
- type TextToCadResponseResultsPage
- type Time
- type TokenRevokeRequestForm
- type ToolOutput
- type Transform
- type TransformByForPoint3D
- type TransformByForPoint4D
- type TwistExtrude
- type URL
- type UUID
- type UnitAngle
- type UnitAngleConversion
- type UnitArea
- type UnitAreaConversion
- type UnitCurrent
- type UnitCurrentConversion
- type UnitDensity
- type UnitEnergy
- type UnitEnergyConversion
- type UnitForce
- type UnitForceConversion
- type UnitFrequency
- type UnitFrequencyConversion
- type UnitLength
- type UnitLengthConversion
- type UnitMas
- type UnitMassConversion
- type UnitPower
- type UnitPowerConversion
- type UnitPressure
- type UnitPressureConversion
- type UnitService
- func (s *UnitService) GetAngleConversion(inputUnit UnitAngle, outputUnit UnitAngle, value float64) (*UnitAngleConversion, error)
- func (s *UnitService) GetAreaConversion(inputUnit UnitArea, outputUnit UnitArea, value float64) (*UnitAreaConversion, error)
- func (s *UnitService) GetCurrentConversion(inputUnit UnitCurrent, outputUnit UnitCurrent, value float64) (*UnitCurrentConversion, error)
- func (s *UnitService) GetEnergyConversion(inputUnit UnitEnergy, outputUnit UnitEnergy, value float64) (*UnitEnergyConversion, error)
- func (s *UnitService) GetForceConversion(inputUnit UnitForce, outputUnit UnitForce, value float64) (*UnitForceConversion, error)
- func (s *UnitService) GetFrequencyConversion(inputUnit UnitFrequency, outputUnit UnitFrequency, value float64) (*UnitFrequencyConversion, error)
- func (s *UnitService) GetLengthConversion(inputUnit UnitLength, outputUnit UnitLength, value float64) (*UnitLengthConversion, error)
- func (s *UnitService) GetMassConversion(inputUnit UnitMas, outputUnit UnitMas, value float64) (*UnitMassConversion, error)
- func (s *UnitService) GetPowerConversion(inputUnit UnitPower, outputUnit UnitPower, value float64) (*UnitPowerConversion, error)
- func (s *UnitService) GetPressureConversion(inputUnit UnitPressure, outputUnit UnitPressure, value float64) (*UnitPressureConversion, error)
- func (s *UnitService) GetTemperatureConversion(inputUnit UnitTemperature, outputUnit UnitTemperature, value float64) (*UnitTemperatureConversion, error)
- func (s *UnitService) GetTorqueConversion(inputUnit UnitTorque, outputUnit UnitTorque, value float64) (*UnitTorqueConversion, error)
- func (s *UnitService) GetVolumeConversion(inputUnit UnitVolume, outputUnit UnitVolume, value float64) (*UnitVolumeConversion, error)
- type UnitTemperature
- type UnitTemperatureConversion
- type UnitTorque
- type UnitTorqueConversion
- type UnitVolume
- type UnitVolumeConversion
- type UpdateAnnotation
- type UpdateCustomModel
- type UpdateMemberToOrgBody
- type UpdateOrgDataset
- type UpdateOrgDatasetSource
- type UpdatePaymentBalance
- type UpdateShortlinkRequest
- type UpdateUser
- type User
- type UserAdminDetails
- type UserFeature
- type UserFeatureEntry
- type UserFeatureList
- type UserOrgInfo
- type UserOrgRole
- type UserResultsPage
- type UserService
- func (s *UserService) AdminDetailsList(id string) (*UserAdminDetails, error)
- func (s *UserService) CreateShortlink(body CreateShortlinkRequest) (*CreateShortlinkResponse, error)
- func (s *UserService) DeleteSelf() error
- func (s *UserService) DeleteShortlink(key string) error
- func (s *UserService) FeaturesList() (*UserFeatureList, error)
- func (s *UserService) Get(id string) (*User, error)
- func (s *UserService) GetExtended(id string) (*ExtendedUser, error)
- func (s *UserService) GetOauth2ProvidersFor() (*[]AccountProvider, error)
- func (s *UserService) GetPrivacySettings() (*PrivacySettings, error)
- func (s *UserService) GetSelf() (*User, error)
- func (s *UserService) GetSelfExtended() (*ExtendedUser, error)
- func (s *UserService) GetSessionFor(token string) (*Session, error)
- func (s *UserService) GetShortlinks(limit int, pageToken string, sortBy CreatedAtSortMode) (*ShortlinkResultsPage, error)
- func (s *UserService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*UserResultsPage, error)
- func (s *UserService) ListExtended(limit int, pageToken string, sortBy CreatedAtSortMode) (*ExtendedUserResultsPage, error)
- func (s *UserService) PatchCrm(body CrmData) error
- func (s *UserService) PutFormSelf(body InquiryForm) error
- func (s *UserService) PutPublicForm(body InquiryForm) error
- func (s *UserService) PutPublicSubscribe(body Subscribe) error
- func (s *UserService) UpdatePrivacySettings(body PrivacySettings) (*PrivacySettings, error)
- func (s *UserService) UpdateSelf(body UpdateUser) (*User, error)
- func (s *UserService) UpdateShortlink(key string, body UpdateShortlinkRequest) error
- func (s *UserService) UpdateSubscriptionFor(id string, body ZooProductSubscriptionsUserRequest) (*ZooProductSubscriptions, error)
- type VerificationTokenResponse
- type ViewIsometric
- type Volume
- type WebSocketRequest
- type WebSocketRequestBatchID
- type WebSocketRequestCandidate
- type WebSocketRequestCmd
- type WebSocketRequestCmdID
- type WebSocketRequestModelingCmdReq
- type WebSocketRequestOffer
- type WebSocketRequestSdpOffer
- type WebSocketRequestTrickleIce
- type WebSocketResponse
- type WorldCoordinateSystem
- type ZooProductSubscription
- type ZooProductSubscriptions
- type ZooProductSubscriptionsOrgRequest
- type ZooProductSubscriptionsUserRequest
- type ZooTool
- type ZoomToFit
Examples ¶
- APICallService.Get
- APICallService.GetAsyncOperation
- APICallService.GetForOrg
- APICallService.GetForUser
- APICallService.GetMetrics
- APICallService.List
- APICallService.ListAsyncOperations
- APICallService.ListForUser
- APICallService.OrgList
- APICallService.UserList
- APITokenService.CreateForUser
- APITokenService.DeleteForUser
- APITokenService.GetForUser
- APITokenService.ListForUser
- AppService.GithubCallback
- AppService.GithubConsent
- AppService.GithubWebhook
- ExecutorService.CreateFileExecution
- ExecutorService.CreateTerm
- FileService.CreateCenterOfMass
- FileService.CreateConversion
- FileService.CreateConversionOptions
- FileService.CreateDensity
- FileService.CreateMass
- FileService.CreateSurfaceArea
- FileService.CreateVolume
- HiddenService.AuthAPIKey
- HiddenService.AuthEmail
- HiddenService.AuthEmailCallback
- HiddenService.GetAuthSaml
- HiddenService.GetAuthSamlByOrg
- HiddenService.Logout
- HiddenService.PostAuthSaml
- HiddenService.RedirectUserShortlink
- MetaService.CommunitySso
- MetaService.CreateDebugUploads
- MetaService.CreateEvent
- MetaService.GetIpinfo
- MetaService.GetPricingSubscriptions
- MetaService.GetSchema
- MetaService.InternalGetAPITokenForDiscordUser
- MetaService.Ping
- MlService.CopilotWs
- MlService.CreateCustomModel
- MlService.CreateKclCodeCompletions
- MlService.CreateProprietaryToKcl
- MlService.CreateTextToCad
- MlService.CreateTextToCadIteration
- MlService.CreateTextToCadMultiFileIteration
- MlService.CreateTextToCadPartFeedback
- MlService.GetCustomModel
- MlService.GetPrompt
- MlService.GetTextToCadPartForUser
- MlService.ListConversationsForUser
- MlService.ListOrgDatasetsForModel
- MlService.ListPrompts
- MlService.ListTextToCadPartsForUser
- MlService.ReasoningWs
- MlService.UpdateCustomModel
- ModelingService.CommandsWs
- NewClient
- NewClientFromEnv
- Oauth2Service.DeviceAccessToken
- Oauth2Service.DeviceAuthConfirm
- Oauth2Service.DeviceAuthRequest
- Oauth2Service.DeviceAuthVerify
- Oauth2Service.ProviderCallback
- Oauth2Service.ProviderCallbackCreate
- Oauth2Service.ProviderConsent
- Oauth2Service.TokenRevoke
- OrgService.AdminDetailsList
- OrgService.Create
- OrgService.CreateDataset
- OrgService.CreateMember
- OrgService.CreateSamlIdp
- OrgService.DatasetS3Policies
- OrgService.Delete
- OrgService.DeleteDataset
- OrgService.DeleteMember
- OrgService.DeleteSamlIdp
- OrgService.Get
- OrgService.GetAny
- OrgService.GetDataset
- OrgService.GetDatasetConversion
- OrgService.GetDatasetConversionStats
- OrgService.GetMember
- OrgService.GetPrivacySettings
- OrgService.GetSamlIdp
- OrgService.GetShortlinks
- OrgService.GetUser
- OrgService.List
- OrgService.ListDatasetConversions
- OrgService.ListDatasets
- OrgService.ListMembers
- OrgService.RescanDataset
- OrgService.RetryDatasetConversion
- OrgService.Update
- OrgService.UpdateDataset
- OrgService.UpdateMember
- OrgService.UpdatePrivacySettings
- OrgService.UpdateSamlIdp
- PaymentService.CreateInformationForOrg
- PaymentService.CreateInformationForUser
- PaymentService.CreateIntentForOrg
- PaymentService.CreateIntentForUser
- PaymentService.CreateOrgSubscription
- PaymentService.CreateUserSubscription
- PaymentService.DeleteInformationForOrg
- PaymentService.DeleteInformationForUser
- PaymentService.DeleteMethodForOrg
- PaymentService.DeleteMethodForUser
- PaymentService.GetBalanceForAnyOrg
- PaymentService.GetBalanceForAnyUser
- PaymentService.GetBalanceForOrg
- PaymentService.GetBalanceForUser
- PaymentService.GetInformationForOrg
- PaymentService.GetInformationForUser
- PaymentService.GetOrgSubscription
- PaymentService.GetUserSubscription
- PaymentService.ListInvoicesForOrg
- PaymentService.ListInvoicesForUser
- PaymentService.ListMethodsForOrg
- PaymentService.ListMethodsForUser
- PaymentService.SetDefaultMethodForUser
- PaymentService.UpdateBalanceForAnyOrg
- PaymentService.UpdateBalanceForAnyUser
- PaymentService.UpdateInformationForOrg
- PaymentService.UpdateInformationForUser
- PaymentService.UpdateOrgSubscription
- PaymentService.UpdateOrgSubscriptionForAnyOrg
- PaymentService.UpdateUserSubscription
- PaymentService.UpsertSubscriptionPlanPrice
- PaymentService.ValidateCustomerTaxInformationForOrg
- PaymentService.ValidateCustomerTaxInformationForUser
- ServiceAccountService.CreateForOrg
- ServiceAccountService.DeleteForOrg
- ServiceAccountService.GetForOrg
- ServiceAccountService.ListForOrg
- StoreService.CreateCoupon
- UnitService.GetAngleConversion
- UnitService.GetAreaConversion
- UnitService.GetCurrentConversion
- UnitService.GetEnergyConversion
- UnitService.GetForceConversion
- UnitService.GetFrequencyConversion
- UnitService.GetLengthConversion
- UnitService.GetMassConversion
- UnitService.GetPowerConversion
- UnitService.GetPressureConversion
- UnitService.GetTemperatureConversion
- UnitService.GetTorqueConversion
- UnitService.GetVolumeConversion
- UserService.AdminDetailsList
- UserService.CreateShortlink
- UserService.DeleteSelf
- UserService.DeleteShortlink
- UserService.FeaturesList
- UserService.Get
- UserService.GetExtended
- UserService.GetOauth2ProvidersFor
- UserService.GetPrivacySettings
- UserService.GetSelf
- UserService.GetSelfExtended
- UserService.GetSessionFor
- UserService.GetShortlinks
- UserService.List
- UserService.ListExtended
- UserService.PatchCrm
- UserService.PutFormSelf
- UserService.PutPublicForm
- UserService.PutPublicSubscribe
- UserService.UpdatePrivacySettings
- UserService.UpdateSelf
- UserService.UpdateShortlink
- UserService.UpdateSubscriptionFor
Constants ¶
const DefaultServerURL = "https://api.zoo.dev"
DefaultServerURL is the default server URL for the KittyCad API.
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 APICallQueryGroup ¶ added in v0.0.9
type APICallQueryGroup struct {
// Count:
Count int `json:"count" yaml:"count" schema:"count,required"`
// Query:
Query string `json:"query" yaml:"query" schema:"query,required"`
}
APICallQueryGroup: A response for a query on the API call table that is grouped by something.
type APICallQueryGroupBy ¶ added in v0.0.9
type APICallQueryGroupBy string
APICallQueryGroupBy: The field of an API call to group by.
const ( // APICallQueryGroupByEmail: The email of the user that requested the API call. APICallQueryGroupByEmail APICallQueryGroupBy = "email" // APICallQueryGroupByMethod: The HTTP method of the API call. APICallQueryGroupByMethod APICallQueryGroupBy = "method" // APICallQueryGroupByEndpoint: The endpoint of the API call. APICallQueryGroupByEndpoint APICallQueryGroupBy = "endpoint" // APICallQueryGroupByUserID: The user ID of the user that requested the API call. APICallQueryGroupByUserID APICallQueryGroupBy = "user_id" // APICallQueryGroupByOrigin: The origin of the API call. This is parsed from the `Origin` header. APICallQueryGroupByOrigin APICallQueryGroupBy = "origin" // APICallQueryGroupByIpAddress: The IP address of the user making the API call. APICallQueryGroupByIpAddress APICallQueryGroupBy = "ip_address" )
type APICallService ¶ added in v0.0.9
type APICallService service
APICallService: API calls that have been performed by users can be queried by the API. This is helpful for debugging as well as billing.
func (*APICallService) Get ¶ added in v0.0.9
func (s *APICallService) Get(id UUID) (*APICallWithPrice, error)
Get: Get details of an API call. This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.
If the user is not authenticated to view the specified API call, then it is not returned.
Only Zoo employees can view API calls for other users.
Parameters
- `id`
Example ¶
Get: Get details of an API call. This endpoint requires authentication by any Zoo user. It returns details of the requested API call for the user.
If the user is not authenticated to view the specified API call, then it is not returned.
Only Zoo employees can view API calls for other users.
Parameters
- `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.Get(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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`
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`
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`
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) GetMetrics ¶ added in v0.0.9
func (s *APICallService) GetMetrics(groupBy APICallQueryGroupBy) (*[]APICallQueryGroup, error)
GetMetrics: Get API call metrics. This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.
Parameters
- `groupBy`: The field of an API call to group by.
Example ¶
GetMetrics: Get API call metrics. This endpoint requires authentication by a Zoo employee. The API calls are grouped by the parameter passed.
Parameters
- `groupBy`: The field of an API call to group by.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.GetMetrics("")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*APICallService) List ¶ added in v0.0.9
func (s *APICallService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
List: List API calls. This endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
List: List API calls. This endpoint requires authentication by a Zoo employee. The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.List(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*APICallService) ListAsyncOperations ¶ added in v0.1.6
func (s *APICallService) ListAsyncOperations(limit int, pageToken string, sortBy CreatedAtSortMode, status APICallStatus) (*AsyncAPICallResultsPage, error)
ListAsyncOperations: List async operations. For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.
This endpoint requires authentication by a Zoo employee.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
`status`: The status of an async API call.
Example ¶
ListAsyncOperations: List async operations. For async file conversion operations, this endpoint does not return the contents of converted files (`output`). To get the contents use the `/async/operations/{id}` endpoint.
This endpoint requires authentication by a Zoo employee.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
`status`: The status of an async API call.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.ListAsyncOperations(123, "some-string", "", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*APICallService) ListForUser ¶ added in v0.0.9
func (s *APICallService) ListForUser(id string, limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
ListForUser: List API calls for a user. This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if "me" is passed as the user id.
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.
The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`id`
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
ListForUser: List API calls for a user. This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user if "me" is passed as the user id.
Alternatively, you can use the `/user/api-calls` endpoint to get the API calls for your user.
If the authenticated user is a Zoo employee, then the API calls are returned for the user specified by the user id.
The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`id`
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.ListForUser("some-string", 123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*APICallService) OrgList ¶ added in v0.2.32
func (s *APICallService) OrgList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
OrgList: List API calls for your org. This includes all API calls that were made by users in the org.
This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.
The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
OrgList: List API calls for your org. This includes all API calls that were made by users in the org.
This endpoint requires authentication by an org admin. It returns the API calls for the authenticated user's org.
The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.OrgList(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*APICallService) UserList ¶ added in v0.0.9
func (s *APICallService) UserList(limit int, pageToken string, sortBy CreatedAtSortMode) (*APICallWithPriceResultsPage, error)
UserList: List API calls for your user. This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.
The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
UserList: List API calls for your user. This endpoint requires authentication by any Zoo user. It returns the API calls for the authenticated user.
The API calls are returned in order of creation, with the most recently created API calls first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APICall.UserList(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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"`
// RequestBody: The request body sent by the API call.
RequestBody string `json:"request_body" yaml:"request_body" schema:"request_body"`
// RequestQueryParams: The request query params sent by the API call.
RequestQueryParams string `json:"request_query_params" yaml:"request_query_params" schema:"request_query_params"`
// ResponseBody: The response body returned by the API call. We do not store this information if it is above a certain size.
ResponseBody string `json:"response_body" yaml:"response_body" schema:"response_body"`
// 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.
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) (*APIToken, error)
CreateForUser: Create a new API token for your user. This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.
Parameters
- `label`
Example ¶
CreateForUser: Create a new API token for your user. This endpoint requires authentication by any Zoo user. It creates a new API token for the authenticated user.
Parameters
- `label`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.APIToken.CreateForUser("some-string")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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.
Parameters
- `token`: An auth token. A uuid with a prefix of api-
Example ¶
DeleteForUser: Delete an API token for your user. This endpoint requires authentication by any Zoo user. It deletes the requested API token for the user.
This endpoint does not actually delete the API token from the database. It merely marks the token as invalid. We still want to keep the token in the database for historical purposes.
Parameters
- `token`: An auth token. A uuid with a prefix of api-
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-
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.
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 AccountProvider ¶ added in v0.1.9
type AccountProvider string
AccountProvider: An account provider.
const ( // AccountProviderApple: The Apple account provider. AccountProviderApple AccountProvider = "apple" // AccountProviderDiscord: The Discord account provider. AccountProviderDiscord AccountProvider = "discord" // AccountProviderGoogle: The Google account provider. AccountProviderGoogle AccountProvider = "google" // AccountProviderGithub: The GitHub account provider. AccountProviderGithub AccountProvider = "github" // AccountProviderMicrosoft: The Microsoft account provider. AccountProviderMicrosoft AccountProvider = "microsoft" // AccountProviderSaml: The SAML account provider. AccountProviderSaml AccountProvider = "saml" // AccountProviderTencent: The Tencent QQ account provider. AccountProviderTencent AccountProvider = "tencent" )
type 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 Address ¶ added in v0.1.4
type Address 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"`
// CreatedAt: The time and date the address was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// ID: The unique identifier of the address.
ID UUID `json:"id" yaml:"id" schema:"id,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"`
// UpdatedAt: The time and date the address was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID that this address belongs to.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
// Zip: The zip component.
Zip string `json:"zip" yaml:"zip" schema:"zip"`
}
Address: An address for a user.
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: 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"`
}
AdjacencyInfo: Edge info struct (useful for maintaining mappings between edges and faces and adjacent/opposite edges).
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 {
// 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"`
// FromEntityID: Entity to measure the dimension from
FromEntityID UUID `json:"from_entity_id" yaml:"from_entity_id" schema:"from_entity_id,required"`
// FromEntityPos: Normalized position within the entity to position the dimension from
FromEntityPos Point2D `json:"from_entity_pos" yaml:"from_entity_pos" schema:"from_entity_pos,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"`
// ToEntityID: Entity to measure the dimension to
ToEntityID UUID `json:"to_entity_id" yaml:"to_entity_id" schema:"to_entity_id,required"`
// ToEntityPos: Normalized position within the entity to position the dimension to
ToEntityPos Point2D `json:"to_entity_pos" yaml:"to_entity_pos" schema:"to_entity_pos,required"`
}
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"`
// EntityID: Entity to place the annotation leader from
EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
// EntityPos: Normalized position within the entity to position the annotation leader from
EntityPos Point2D `json:"entity_pos" yaml:"entity_pos" schema:"entity_pos,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"`
// 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 {
// EntityID: Entity to place the annotation leader from
EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
// EntityPos: Normalized position within the entity to position the annotation leader from
EntityPos Point2D `json:"entity_pos" yaml:"entity_pos" schema:"entity_pos,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"`
// Key: Tag key
Key string `json:"key" yaml:"key" schema:"key,required"`
// 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,required"`
}
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 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"`
// Position: Position to put the annotation
Position Point3D `json:"position" yaml:"position" schema:"position"`
// Text: Text displayed on the annotation
Text AnnotationTextOptions `json:"text" yaml:"text" schema:"text"`
}
AnnotationOptions: Options for annotations
type AnnotationTextAlignmentX ¶ added in v0.2.22
type AnnotationTextAlignmentX string
AnnotationTextAlignmentX: Horizontal Text alignment
const ( // AnnotationTextAlignmentXLeft represents the AnnotationTextAlignmentX `"left"`. AnnotationTextAlignmentXLeft AnnotationTextAlignmentX = "left" // AnnotationTextAlignmentXCenter represents the AnnotationTextAlignmentX `"center"`. AnnotationTextAlignmentXCenter AnnotationTextAlignmentX = "center" // AnnotationTextAlignmentXRight represents the AnnotationTextAlignmentX `"right"`. AnnotationTextAlignmentXRight AnnotationTextAlignmentX = "right" )
type AnnotationTextAlignmentY ¶ added in v0.2.22
type AnnotationTextAlignmentY string
AnnotationTextAlignmentY: Vertical Text alignment
const ( // AnnotationTextAlignmentYBottom represents the AnnotationTextAlignmentY `"bottom"`. AnnotationTextAlignmentYBottom AnnotationTextAlignmentY = "bottom" // AnnotationTextAlignmentYCenter represents the AnnotationTextAlignmentY `"center"`. AnnotationTextAlignmentYCenter AnnotationTextAlignmentY = "center" // AnnotationTextAlignmentYTop represents the AnnotationTextAlignmentY `"top"`. AnnotationTextAlignmentYTop AnnotationTextAlignmentY = "top" )
type AnnotationTextOptions ¶ added in v0.2.22
type AnnotationTextOptions struct {
// PointSize: Text font's point size
PointSize int `json:"point_size" yaml:"point_size" schema:"point_size,required"`
// Text: Text displayed on the annotation
Text string `json:"text" yaml:"text" schema:"text,required"`
// X: Alignment along the X axis
X AnnotationTextAlignmentX `json:"x" yaml:"x" schema:"x,required"`
// Y: Alignment along the Y axis
Y AnnotationTextAlignmentY `json:"y" yaml:"y" schema:"y,required"`
}
AnnotationTextOptions: Options for annotation text
type AnnotationType ¶ added in v0.2.22
type AnnotationType string
AnnotationType: The type of annotation
const ( // AnnotationTypeT2D: 2D annotation type (screen or planar space) AnnotationTypeT2D AnnotationType = "t2d" // AnnotationTypeT3D: 3D annotation type AnnotationTypeT3D AnnotationType = "t3d" )
type AppClientInfo ¶ added in v0.2.4
type AppClientInfo struct {
// Url: The URL for consent.
Url string `json:"url" yaml:"url" schema:"url"`
}
AppClientInfo: Information about a third party app client.
type AppService ¶ added in v0.2.4
type AppService service
AppService: Endpoints for third party app grant flows.
func (*AppService) GithubCallback ¶ added in v0.2.4
func (s *AppService) GithubCallback(body any) error
GithubCallback: Listen for callbacks to GitHub app authentication. This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
Parameters
- `body`
Example ¶
GithubCallback: Listen for callbacks to GitHub app authentication. This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
Parameters
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.App.GithubCallback(""); err != nil {
panic(err)
}
func (*AppService) GithubConsent ¶ added in v0.2.4
func (s *AppService) GithubConsent() (*AppClientInfo, error)
GithubConsent: Get the consent URL for GitHub app authentication. This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
Example ¶
GithubConsent: Get the consent URL for GitHub app authentication. This is different than OAuth 2.0 authentication for users. This endpoint grants access for Zoo to access user's repos.
The user doesn't need Zoo OAuth authorization for this endpoint, this is purely for the GitHub permissions to access repos.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.App.GithubConsent()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*AppService) GithubWebhook ¶ added in v0.2.5
func (s *AppService) GithubWebhook(body []byte) error
GithubWebhook: Listen for GitHub webhooks. These come from the GitHub app.
Parameters
- `body`
Example ¶
GithubWebhook: Listen for GitHub webhooks. These come from the GitHub app.
Parameters
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.App.GithubWebhook([]byte("some-binary")); err != nil {
panic(err)
}
type AsyncAPICall ¶ added in v0.1.6
type AsyncAPICall struct {
// Attempts: The number of times we've attempted to process this job.
Attempts int `json:"attempts" yaml:"attempts" schema:"attempts"`
// CompletedAt: The time and date the async API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the async API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the async API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The JSON input for the API call. These are determined by the endpoint that is run.
Input any `json:"input" yaml:"input" schema:"input"`
// Output: The JSON output for the API call. These are determined by the endpoint that is run.
Output any `json:"output" yaml:"output" schema:"output"`
// StartedAt: The time and date the async API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the async API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// Type: The type of async API call.
Type AsyncAPICallType `json:"type" yaml:"type" schema:"type,required"`
// UpdatedAt: The time and date the async API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the async API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
// Worker: The worker node that is performing or performed the async API call.
Worker string `json:"worker" yaml:"worker" schema:"worker"`
}
AsyncAPICall: An async API call.
type 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.
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 {
// 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"`
}
AsyncAPICallOutputOutputs: Text to CAD.
type AsyncAPICallOutputSrcFormat ¶ added in v0.2.37
type AsyncAPICallOutputSrcFormat 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"`
}
AsyncAPICallOutputSrcFormat: Text to CAD iteration.
type AsyncAPICallOutputSrcFormatOptions ¶ added in v0.2.40
type AsyncAPICallOutputSrcFormatOptions 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"`
}
AsyncAPICallOutputSrcFormatOptions: Text to CAD multi-file iteration.
type AsyncAPICallResultsPage ¶ added in v0.1.6
type AsyncAPICallResultsPage struct {
// Items: list of items on this page of results
Items []AsyncAPICall `json:"items" yaml:"items" schema:"items,required"`
// NextPage: token used to fetch the next page of results (if any)
NextPage string `json:"next_page" yaml:"next_page" schema:"next_page"`
}
AsyncAPICallResultsPage: A single page of results
type AsyncAPICallType ¶ added in v0.1.6
type AsyncAPICallType string
AsyncAPICallType: The type of async API call.
const ( // AsyncAPICallTypeFileConversion: File conversion. AsyncAPICallTypeFileConversion AsyncAPICallType = "file_conversion" // AsyncAPICallTypeFileVolume: File volume. AsyncAPICallTypeFileVolume AsyncAPICallType = "file_volume" // AsyncAPICallTypeFileCenterOfMass: File center of mass. AsyncAPICallTypeFileCenterOfMass AsyncAPICallType = "file_center_of_mass" // AsyncAPICallTypeFileMass: File mass. AsyncAPICallTypeFileMass AsyncAPICallType = "file_mass" // AsyncAPICallTypeFileDensity: File density. AsyncAPICallTypeFileDensity AsyncAPICallType = "file_density" // AsyncAPICallTypeFileSurfaceArea: File surface area. AsyncAPICallTypeFileSurfaceArea AsyncAPICallType = "file_surface_area" // AsyncAPICallTypeTextToCad: Text to CAD. AsyncAPICallTypeTextToCad AsyncAPICallType = "text_to_cad" // AsyncAPICallTypeTextToCadIteration: Text to CAD iteration. AsyncAPICallTypeTextToCadIteration AsyncAPICallType = "text_to_cad_iteration" // AsyncAPICallTypeTextToCadMultiFileIteration: Text to CAD multi-file iteration. AsyncAPICallTypeTextToCadMultiFileIteration AsyncAPICallType = "text_to_cad_multi_file_iteration" )
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.
type Axis ¶ added in v0.2.42
type Axis struct {
// Axis: The axis to extrude to.
Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
// Point: Point the axis goes through. Defaults to (0, 0, 0).
Point Point3D `json:"point" yaml:"point" schema:"point"`
}
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 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
MarshalJSON implements the json.Marshaler interface.
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 BetaService ¶ added in v0.2.4
type BetaService service
BetaService: Beta API endpoints. We will not charge for these endpoints while they are in beta.
type BillingInfo ¶ added in v0.1.4
type BillingInfo struct {
// Address: The address of the customer.
Address AddressDetails `json:"address" yaml:"address" schema:"address"`
// Name: The name of the customer.
Name string `json:"name" yaml:"name" schema:"name"`
// Phone: The phone for the customer.
Phone string `json:"phone" yaml:"phone" schema:"phone"`
}
BillingInfo: The billing information for payments.
type BlockReason ¶ added in v0.2.31
type BlockReason string
BlockReason: The reason for blocking a user.
const ( // BlockReasonMissingPaymentMethod: The user is missing a payment method and has exceeded their free API call credits for the month. BlockReasonMissingPaymentMethod BlockReason = "missing_payment_method" // BlockReasonPaymentMethodFailed: The users payment method has failed. BlockReasonPaymentMethodFailed BlockReason = "payment_method_failed" )
type BooleanIntersection ¶ added in v0.2.41
type BooleanIntersection struct {
// 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 {
// 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 {
// 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 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
// 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
// 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 ¶
NewClient creates a new client for the KittyCad API. You need to pass in your API token to create the client.
Example ¶
Create a client with your token.
client, err := kittycad.NewClient("$TOKEN", "your apps user agent")
if err != nil {
panic(err)
}
// Call the client's methods.
result, err := client.Meta.Ping()
if err != nil {
panic(err)
}
fmt.Println(result)
func NewClientFromEnv ¶
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`.
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 ¶
WithBaseURL overrides the baseURL.
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: Total duration of pauses 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 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: Code option for running and verifying kcl. <details><summary>JSON schema</summary>
```json { "title": "CodeOption", "description": "Code option for running and verifying kcl.", "type": "string", "enum": [ "parse", "execute", "cleanup", "mock_execute" ] } ``` </details>
const ( // CodeOptionParse represents the CodeOption `"parse"`. CodeOptionParse CodeOption = "parse" // CodeOptionExecute represents the CodeOption `"execute"`. CodeOptionExecute CodeOption = "execute" // CodeOptionCleanup represents the CodeOption `"cleanup"`. CodeOptionCleanup CodeOption = "cleanup" // CodeOptionMockExecute represents the CodeOption `"mock_execute"`. CodeOptionMockExecute CodeOption = "mock_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 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" // 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 CreateOrgDataset ¶ added in v0.2.42
type CreateOrgDataset struct {
// Name: The dataset's display name.
Name string `json:"name" yaml:"name" schema:"name,required"`
// Source: Details for accessing the dataset.
Source OrgDatasetSource `json:"source" yaml:"source" schema:"source,required"`
}
CreateOrgDataset: Payload for creating an org dataset.
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 CrmData ¶ added in v0.2.41
type CrmData struct {
// CadIndustry: The industry of the user.
CadIndustry string `json:"cad_industry" yaml:"cad_industry" schema:"cad_industry"`
// CadUserType: The user type.
CadUserType string `json:"cad_user_type" yaml:"cad_user_type" schema:"cad_user_type"`
// NumberOfCadUsers: The user count of the user.
NumberOfCadUsers string `json:"number_of_cad_users" yaml:"number_of_cad_users" schema:"number_of_cad_users"`
}
CrmData: The data for subscribing a user to the newsletter.
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)
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 {
// CreatedAt: The date and time the balance was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// 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: This includes any outstanding, draft, or open invoices and any pending invoice items. This does not include any credits the customer has on their account. 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 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 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.
type DisableDryRun ¶ added in v0.2.38
type DisableDryRun struct {
}
DisableDryRun: The response from the `DisableDryRun` endpoint.
type Discount ¶ added in v0.2.18
type Discount struct {
// Coupon: The coupon that applied to create this discount.
Coupon Coupon `json:"coupon" yaml:"coupon" schema:"coupon,required"`
}
Discount: The resource representing a Discount.
type DiscountCode ¶ added in v0.2.33
type DiscountCode struct {
// Code: The code for the discount.
Code string `json:"code" yaml:"code" schema:"code,required"`
// ExpiresAt: The date the discount code expires.
ExpiresAt Time `json:"expires_at" yaml:"expires_at" schema:"expires_at"`
// PercentOff: The percent off for the discount.
PercentOff int `json:"percent_off" yaml:"percent_off" schema:"percent_off,required"`
}
DiscountCode: A discount code for a store.
type 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 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 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 EnableDryRun ¶ added in v0.2.38
type EnableDryRun struct {
}
EnableDryRun: The response from the `EnableDryRun` endpoint.
type EnableSketchMode ¶ added in v0.2.38
type EnableSketchMode struct {
}
EnableSketchMode: The response from the `EnableSketchMode` endpoint.
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 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 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 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 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: The UUID of the entity to extrude to.
EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
}
EntityReference is the type definition for a EntityReference.
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" // EntityTypeCurve represents the EntityType `"curve"`. EntityTypeCurve EntityType = "curve" // EntityTypeSolid2D represents the EntityType `"solid2d"`. EntityTypeSolid2D EntityType = "solid2d" // EntityTypeSolid3D represents the EntityType `"solid3d"`. EntityTypeSolid3D EntityType = "solid3d" // EntityTypeEdge represents the EntityType `"edge"`. EntityTypeEdge EntityType = "edge" // EntityTypeFace represents the EntityType `"face"`. EntityTypeFace EntityType = "face" // EntityTypePlane represents the EntityType `"plane"`. EntityTypePlane EntityType = "plane" // EntityTypeVertex represents the EntityType `"vertex"`. EntityTypeVertex EntityType = "vertex" )
type 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 it was configured as a WebRTC connection. ErrorCodeMessageTypeNotAcceptedForWebRTC ErrorCode = "message_type_not_accepted_for_web_r_t_c" )
type Event ¶ added in v0.2.33
type Event struct {
// AttachmentUri: Attachment URI for where the attachment is stored.
AttachmentUri string `json:"attachment_uri" yaml:"attachment_uri" schema:"attachment_uri"`
// CreatedAt: Time this event was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// EventType: The specific event type from the modeling app.
EventType ModelingAppEventType `json:"event_type" yaml:"event_type" schema:"event_type,required"`
// LastCompiledAt: Time the associated attachment was last compiled.
LastCompiledAt Time `json:"last_compiled_at" yaml:"last_compiled_at" schema:"last_compiled_at"`
// ProjectDescription: Project descriptino as given by the user.
ProjectDescription string `json:"project_description" yaml:"project_description" schema:"project_description"`
// ProjectName: Project name as given by the user.
ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name,required"`
// SourceID: The source app for this event, uuid that is unique to the app.
SourceID UUID `json:"source_id" yaml:"source_id" schema:"source_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
// UserID: An anonymous user id generated client-side.
UserID string `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
Event: An event related to modeling app files
type ExecutorService ¶ added in v0.2.14
type ExecutorService service
ExecutorService: Endpoints that allow for code execution or creation of code execution environments.
func (*ExecutorService) CreateFileExecution ¶ added in v0.2.14
func (s *ExecutorService) CreateFileExecution(lang CodeLanguage, output string, body []byte) (*CodeOutput, error)
CreateFileExecution: Execute a Zoo program in a specific language. Parameters
`lang`: The language code is written in.
<details><summary>JSON schema</summary>
```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>
`output`
`body`
Example ¶
CreateFileExecution: Execute a Zoo program in a specific language. Parameters
`lang`: The language code is written in.
<details><summary>JSON schema</summary>
```json { "description": "The language code is written in.", "oneOf": [ { "description": "The `go` programming language.", "type": "string", "enum": [ "go" ] }, { "description": "The `python` programming language.", "type": "string", "enum": [ "python" ] }, { "description": "The `node` programming language.", "type": "string", "enum": [ "node" ] } ] } ``` </details>
`output`
`body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Executor.CreateFileExecution("", "some-string", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*ExecutorService) CreateTerm ¶ added in v0.2.14
func (s *ExecutorService) CreateTerm() (*websocket.Conn, error)
CreateTerm: Create a terminal. Attach to a docker container to create an interactive terminal.
Example ¶
CreateTerm: Create a terminal. Attach to a docker container to create an interactive terminal.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
// Create the websocket connection.
ws, err := client.Executor.CreateTerm()
if err != nil {
panic(err)
}
defer ws.Close()
done := make(chan struct{})
go func() {
defer close(done)
for {
_, message, err := ws.ReadMessage()
if err != nil {
log.Println("read:", err)
return
}
log.Printf("recv: %s", message)
}
}()
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
interrupt := make(chan os.Signal, 1)
signal.Notify(interrupt, os.Interrupt)
for {
select {
case <-done:
return
case t := <-ticker.C:
err := ws.WriteMessage(websocket.TextMessage, []byte(t.String()))
if err != nil {
log.Println("write:", err)
return
}
case <-interrupt:
log.Println("interrupt")
// Cleanly close the connection by sending a close message and then
// waiting (with timeout) for the server to close the connection.
err := ws.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
if err != nil {
log.Println("write close:", err)
return
}
select {
case <-done:
case <-time.After(time.Second):
}
return
}
}
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 {
// 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"`
// HubspotContactID: The user's Hubspot ID. This is mostly used for internal mapping.
HubspotContactID string `json:"hubspot_contact_id" yaml:"hubspot_contact_id" schema:"hubspot_contact_id"`
// 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"`
}
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 ExtendedUserResultsPage ¶ added in v0.1.0
type ExtendedUserResultsPage struct {
// Items: list of items on this page of results
Items []ExtendedUser `json:"items" yaml:"items" schema:"items,required"`
// NextPage: token used to fetch the next page of results (if any)
NextPage string `json:"next_page" yaml:"next_page" schema:"next_page"`
}
ExtendedUserResultsPage: A single page of results
type Extrude ¶ added in v0.2.13
type Extrude struct {
}
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, 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 {
}
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 FailureWebSocketResponse ¶ added in v0.2.27
type FailureWebSocketResponse struct {
// Errors: The errors that occurred.
Errors []APIError `json:"errors" yaml:"errors" schema:"errors,required"`
// RequestID: Which request this is a response to. If the request was a modeling command, this is the modeling command ID. If no request ID was sent, this will be null.
RequestID UUID `json:"request_id" yaml:"request_id" schema:"request_id"`
// Success: Always false
Success bool `json:"success" yaml:"success" schema:"success,required"`
}
FailureWebSocketResponse: Unsuccessful Websocket response.
type FbxStorage ¶ added in v0.2.27
type FbxStorage string
FbxStorage: Describes the storage format of an FBX file.
const ( // FbxStorageAscii: ASCII FBX encoding. FbxStorageAscii FbxStorage = "ascii" // FbxStorageBinary: Binary FBX encoding. FbxStorageBinary FbxStorage = "binary" )
type FileCenterOfMass ¶ added in v0.2.8
type FileCenterOfMass struct {
// CenterOfMass: The resulting center of mass.
CenterOfMass Point3D `json:"center_of_mass" yaml:"center_of_mass" schema:"center_of_mass"`
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// OutputUnit: The output unit for the center of mass.
OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// SrcFormat: The source format of the file.
SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
FileCenterOfMass: A file center of mass result.
type FileConversion ¶
type FileConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// OutputFormat: The output format of the file conversion.
OutputFormat FileExportFormat `json:"output_format" yaml:"output_format" schema:"output_format,required"`
// OutputFormatOptions: The output format options of the file conversion.
OutputFormatOptions any `json:"output_format_options" yaml:"output_format_options" schema:"output_format_options"`
// Outputs: The converted files (if multiple file conversion), if completed, base64 encoded. The key of the map is the path of the output file.
Outputs map[string]Base64 `json:"outputs" yaml:"outputs" schema:"outputs"`
// SrcFormat: The source format of the file conversion.
SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
// SrcFormatOptions: The source format options of the file conversion.
SrcFormatOptions any `json:"src_format_options" yaml:"src_format_options" schema:"src_format_options"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
FileConversion: A file conversion.
type FileDensity ¶ added in v0.1.6
type FileDensity struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Density: The resulting density.
Density float64 `json:"density" yaml:"density" schema:"density"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// MaterialMass: The material mass as denoted by the user.
MaterialMass float64 `json:"material_mass" yaml:"material_mass" schema:"material_mass"`
// MaterialMassUnit: The material mass unit.
MaterialMassUnit UnitMas `json:"material_mass_unit" yaml:"material_mass_unit" schema:"material_mass_unit,required"`
// OutputUnit: The output unit for the density.
OutputUnit UnitDensity `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// SrcFormat: The source format of the file.
SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
FileDensity: A file density result.
type FileExportFormat ¶ added in v0.2.8
type FileExportFormat string
FileExportFormat: The valid types of output file formats.
const ( // FileExportFormatFbx: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX> FileExportFormatFbx FileExportFormat = "fbx" // FileExportFormatGlb: Binary glTF 2.0. // // This is a single binary with .glb extension. // // This is better if you want a compressed format as opposed to the human readable glTF that lacks compression. FileExportFormatGlb FileExportFormat = "glb" // FileExportFormatGltf: glTF 2.0. Embedded glTF 2.0 (pretty printed). // // Single JSON file with .gltf extension binary data encoded as base64 data URIs. // // The JSON contents are pretty printed. // // It is human readable, single file, and you can view the diff easily in a git commit. FileExportFormatGltf FileExportFormat = "gltf" // FileExportFormatObj: The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. FileExportFormatObj FileExportFormat = "obj" // FileExportFormatPly: The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)> FileExportFormatPly FileExportFormat = "ply" // FileExportFormatStep: The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21> FileExportFormatStep FileExportFormat = "step" // FileExportFormatStl: The STL file format. <https://en.wikipedia.org/wiki/STL_(file_format)> FileExportFormatStl FileExportFormat = "stl" )
type FileImportFormat ¶ added in v0.2.8
type FileImportFormat string
FileImportFormat: The valid types of source file formats.
const ( // FileImportFormatFbx: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX> FileImportFormatFbx FileImportFormat = "fbx" // FileImportFormatGltf: glTF 2.0. FileImportFormatGltf FileImportFormat = "gltf" // FileImportFormatObj: The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not. FileImportFormatObj FileImportFormat = "obj" // FileImportFormatPly: The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)> FileImportFormatPly FileImportFormat = "ply" // FileImportFormatSldprt: SolidWorks part (SLDPRT) format. FileImportFormatSldprt FileImportFormat = "sldprt" // FileImportFormatStep: The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21> FileImportFormatStep FileImportFormat = "step" // FileImportFormatStl: The STL file format. <https://en.wikipedia.org/wiki/STL_(file_format)> FileImportFormatStl FileImportFormat = "stl" )
type FileMass ¶ added in v0.1.4
type FileMass struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Mass: The resulting mass.
Mass float64 `json:"mass" yaml:"mass" schema:"mass"`
// MaterialDensity: The material density as denoted by the user.
MaterialDensity float64 `json:"material_density" yaml:"material_density" schema:"material_density"`
// MaterialDensityUnit: The material density unit.
MaterialDensityUnit UnitDensity `json:"material_density_unit" yaml:"material_density_unit" schema:"material_density_unit,required"`
// OutputUnit: The output unit for the mass.
OutputUnit UnitMas `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// SrcFormat: The source format of the file.
SrcFormat FileImportFormat `json:"src_format" yaml:"src_format" schema:"src_format,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
FileMass: A file mass result.
type FileService ¶
type FileService service
FileService: CAD file operations. Create, get, and list CAD file conversions. More endpoints will be added here in the future as we build out transforms, etc on CAD models.
func (*FileService) CreateCenterOfMass ¶ added in v0.2.8
func (s *FileService) CreateCenterOfMass(outputUnit UnitLength, srcFormat FileImportFormat, body []byte) (*FileCenterOfMass, error)
CreateCenterOfMass: Get CAD file center of mass. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint returns the cartesian coordinate in world space measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputUnit`: The valid types of length units.
- `srcFormat`: The valid types of source file formats.
- `body`
Example ¶
CreateCenterOfMass: Get CAD file center of mass. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint returns the cartesian coordinate in world space measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the center of mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputUnit`: The valid types of length units.
- `srcFormat`: The valid types of source file formats.
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.File.CreateCenterOfMass("", "", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*FileService) CreateConversion ¶ added in v0.0.9
func (s *FileService) CreateConversion(outputFormat FileExportFormat, srcFormat FileImportFormat, body []byte) (*FileConversion, error)
CreateConversion: Convert CAD file with defaults. If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputFormat`: The valid types of output file formats.
- `srcFormat`: The valid types of source file formats.
- `body`
Example ¶
CreateConversion: Convert CAD file with defaults. If you wish to specify the conversion options, use the `/file/conversion` endpoint instead.
Convert a CAD file from one format to another. If the file being converted is larger than 25MB, it will be performed asynchronously.
If the conversion is performed synchronously, the contents of the converted file (`output`) will be returned as a base64 encoded string.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputFormat`: The valid types of output file formats.
- `srcFormat`: The valid types of source file formats.
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.File.CreateConversion("", "", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*FileService) CreateConversionOptions ¶ added in v0.2.42
func (s *FileService) CreateConversionOptions(body *bytes.Buffer) (*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).
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
buf := new(bytes.Buffer)
result, err := client.File.CreateConversionOptions(buf)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*FileService) CreateDensity ¶ added in v0.1.6
func (s *FileService) CreateDensity(materialMass float64, materialMassUnit UnitMas, outputUnit UnitDensity, srcFormat FileImportFormat, body []byte) (*FileDensity, error)
CreateDensity: Get CAD file density. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `materialMass`
- `materialMassUnit`: The valid types of mass units.
- `outputUnit`: The valid types for density units.
- `srcFormat`: The valid types of source file formats.
- `body`
Example ¶
CreateDensity: Get CAD file density. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint assumes if you are giving a material mass in a specific mass units, we return a density in mass unit per cubic measure unit.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the density of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `materialMass`
- `materialMassUnit`: The valid types of mass units.
- `outputUnit`: The valid types for density units.
- `srcFormat`: The valid types of source file formats.
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.File.CreateDensity(123.45, "", "", "", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*FileService) CreateMass ¶ added in v0.1.4
func (s *FileService) CreateMass(materialDensity float64, materialDensityUnit UnitDensity, outputUnit UnitMas, srcFormat FileImportFormat, body []byte) (*FileMass, error)
CreateMass: Get CAD file mass. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `materialDensity`
- `materialDensityUnit`: The valid types for density units.
- `outputUnit`: The valid types of mass units.
- `srcFormat`: The valid types of source file formats.
- `body`
Example ¶
CreateMass: Get CAD file mass. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint assumes if you are giving a material density in a specific mass unit per cubic measure unit, we return a mass in mass units. The same mass units as passed in the material density.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the mass of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `materialDensity`
- `materialDensityUnit`: The valid types for density units.
- `outputUnit`: The valid types of mass units.
- `srcFormat`: The valid types of source file formats.
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.File.CreateMass(123.45, "", "", "", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*FileService) CreateSurfaceArea ¶ added in v0.2.8
func (s *FileService) CreateSurfaceArea(outputUnit UnitArea, srcFormat FileImportFormat, body []byte) (*FileSurfaceArea, error)
CreateSurfaceArea: Get CAD file surface area. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint returns the square measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputUnit`: The valid types of area units.
- `srcFormat`: The valid types of source file formats.
- `body`
Example ¶
CreateSurfaceArea: Get CAD file surface area. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint returns the square measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the surface area of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputUnit`: The valid types of area units.
- `srcFormat`: The valid types of source file formats.
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.File.CreateSurfaceArea("", "", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*FileService) CreateVolume ¶ added in v0.1.4
func (s *FileService) CreateVolume(outputUnit UnitVolume, srcFormat FileImportFormat, body []byte) (*FileVolume, error)
CreateVolume: Get CAD file volume. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint returns the cubic measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputUnit`: The valid types of volume units.
- `srcFormat`: The valid types of source file formats.
- `body`
Example ¶
CreateVolume: Get CAD file volume. We assume any file given to us has one consistent unit throughout. We also assume the file is at the proper scale.
This endpoint returns the cubic measure units.
In the future, we will use the units inside the file if they are given and do any conversions if necessary for the calculation. But currently, that is not supported.
Get the volume of an object in a CAD file. If the file is larger than 25MB, it will be performed asynchronously.
If the operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
Parameters
- `outputUnit`: The valid types of volume units.
- `srcFormat`: The valid types of source file formats.
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.File.CreateVolume("", "", []byte("some-binary"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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 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 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 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.
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.
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
func (s *HiddenService) AuthEmail(body EmailAuthenticationForm) (*VerificationTokenResponse, error)
AuthEmail: Create an email verification request for a user. Parameters
- `body`: The body of the form for email authentication.
Example ¶
AuthEmail: Create an email verification request for a user. Parameters
- `body`: The body of the form for email authentication.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Hidden.AuthEmail(kittycad.EmailAuthenticationForm{CallbackUrl: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, Email: "[email protected]"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*HiddenService) AuthEmailCallback ¶ added in v0.2.4
func (s *HiddenService) AuthEmailCallback(callbackUrl URL, email string, token string) error
AuthEmailCallback: Listen for callbacks for email authentication for users. Parameters
- `callbackUrl`
- `email`
- `token`
Example ¶
AuthEmailCallback: Listen for callbacks for email authentication for users. Parameters
- `callbackUrl`
- `email`
- `token`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Hidden.AuthEmailCallback(kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, "[email protected]", "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`
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`
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.
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`
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 (*HiddenService) RedirectUserShortlink ¶ added in v0.2.38
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`
Example ¶
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`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Hidden.RedirectUserShortlink("some-string"); err != nil {
panic(err)
}
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
IP is a wrapper around ip.IP which marshals to and from empty strings.
func (IP) MarshalJSON ¶ added in v0.2.4
MarshalJSON implements the json.Marshaler interface.
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 model. If you are sending binary data for a file, be sure to send the WebSocketRequest as binary/bson, not text/json.
type ImportFiles ¶ added in v0.2.28
type ImportFiles struct {
// ObjectID: ID of the imported 3D models within the scene.
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
}
ImportFiles: Data from importing the files
type ImportedGeometry ¶ added in v0.2.33
type ImportedGeometry struct {
// ID: ID of the imported 3D models within the scene.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Value: The original file paths that held the geometry.
Value []string `json:"value" yaml:"value" schema:"value,required"`
}
ImportedGeometry: Data from importing the files
type 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 InputFormat3Dcoords ¶ added in v0.2.40
type InputFormat3Dcoords struct {
// 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"`
}
InputFormat3Dcoords: ISO 10303-21 (STEP) format.
type InputFormat3Dfbx ¶ added in v0.2.40
type InputFormat3Dfbx struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
InputFormat3Dfbx: Autodesk Filmbox (FBX) format.
type InputFormat3Dgltf ¶ added in v0.2.40
type InputFormat3Dgltf struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
InputFormat3Dgltf: Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).
type InputFormat3Dobj ¶ added in v0.2.40
type InputFormat3Dobj 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"`
}
InputFormat3Dobj: The PLY Polygon File Format.
type InputFormat3Dply ¶ added in v0.2.40
type InputFormat3Dply 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"`
}
InputFormat3Dply: *ST**ereo**L**ithography format.
type InputFormat3Dunits ¶ added in v0.2.40
type InputFormat3Dunits struct {
// 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"`
}
InputFormat3Dunits: SolidWorks part (SLDPRT) format.
type InquiryForm ¶ added in v0.2.41
type InquiryForm 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 inquiry.
InquiryType InquiryType `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"`
}
InquiryForm: The form for a public inquiry submission.
type InquiryType ¶ added in v0.2.41
type InquiryType string
InquiryType: The type of inquiry.
const ( // InquiryTypePilotInquiry: Inquiries related to pilots (on the enterprise page). InquiryTypePilotInquiry InquiryType = "pilot_inquiry" // InquiryTypeGeneralInquiry: General inquiry about the service or product. InquiryTypeGeneralInquiry InquiryType = "general_inquiry" // InquiryTypeSalesQuestion: Questions related to sales or purchasing. InquiryTypeSalesQuestion InquiryType = "sales_question" // InquiryTypeDeveloperInquiry: Inquiry from a developer, typically technical in nature. InquiryTypeDeveloperInquiry InquiryType = "developer_inquiry" // InquiryTypePartnershipOpportunity: Opportunity for partnership or collaboration. InquiryTypePartnershipOpportunity InquiryType = "partnership_opportunity" // InquiryTypeOtherSalesInquiry: Other inquiries related to sales that do not fit predefined categories. InquiryTypeOtherSalesInquiry InquiryType = "other_sales_inquiry" // InquiryTypeTechnicalSupport: Request for technical support or troubleshooting. InquiryTypeTechnicalSupport InquiryType = "technical_support" // InquiryTypeAccountManagement: Questions or requests related to account management. InquiryTypeAccountManagement InquiryType = "account_management" // InquiryTypeOtherSupportInquiry: Other support-related inquiries that do not fit predefined categories. InquiryTypeOtherSupportInquiry InquiryType = "other_support_inquiry" )
type Invoice ¶ added in v0.1.4
type Invoice struct {
// AmountDue: Final amount due at this time for this invoice.
//
// If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`.
AmountDue float64 `json:"amount_due" yaml:"amount_due" schema:"amount_due"`
// AmountPaid: The amount, in USD, that was paid.
AmountPaid float64 `json:"amount_paid" yaml:"amount_paid" schema:"amount_paid"`
// AmountRemaining: The amount remaining, in USD, that is due.
AmountRemaining float64 `json:"amount_remaining" yaml:"amount_remaining" schema:"amount_remaining"`
// AttemptCount: Number of payment attempts made for this invoice, from the perspective of the payment retry schedule.
//
// Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule.
AttemptCount int `json:"attempt_count" yaml:"attempt_count" schema:"attempt_count"`
// Attempted: Whether an attempt has been made to pay the invoice.
//
// An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users.
Attempted bool `json:"attempted" yaml:"attempted" schema:"attempted"`
// BillingReason: Why this invoice was created (e.g. `subscription_cycle`).
BillingReason string `json:"billing_reason" yaml:"billing_reason" schema:"billing_reason"`
// 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), in lowercase.
Currency string `json:"currency" yaml:"currency" schema:"currency"`
// CustomerEmail: The email address for the customer. Until the invoice is finalized, this field will equal customer.email. Once the invoice is finalized, this field will no longer be updated.
CustomerEmail string `json:"customer_email" yaml:"customer_email" schema:"customer_email"`
// CustomerID: Customer ID. The unique identifier for the customer this invoice belongs to. This is the customer ID in the payments service, not our database customer ID.
CustomerID string `json:"customer_id" yaml:"customer_id" schema:"customer_id"`
// DefaultPaymentMethod: Default payment method.
DefaultPaymentMethod string `json:"default_payment_method" yaml:"default_payment_method" schema:"default_payment_method"`
// Description: Description of the invoice.
Description string `json:"description" yaml:"description" schema:"description"`
// Discounts: The discounts applied to the invoice. This is an array of discount objects.
Discounts []Discount `json:"discounts" yaml:"discounts" schema:"discounts"`
// ID: Unique identifier for the object.
ID string `json:"id" yaml:"id" schema:"id"`
// Lines: The individual line items that make up the invoice.
//
// `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
Lines []InvoiceLineItem `json:"lines" yaml:"lines" schema:"lines"`
// Metadata: Set of key-value pairs.
Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
// Number: A unique, identifying string that appears on emails sent to the customer for this invoice.
Number string `json:"number" yaml:"number" schema:"number"`
// Paid: Whether payment was successfully collected for this invoice.
//
// An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance.
Paid bool `json:"paid" yaml:"paid" schema:"paid"`
// Pdf: The link to download the PDF for the invoice.
Pdf URL `json:"pdf" yaml:"pdf" schema:"pdf"`
// ReceiptNumber: This is the transaction number that appears on email receipts sent for this invoice.
ReceiptNumber string `json:"receipt_number" yaml:"receipt_number" schema:"receipt_number"`
// StatementDescriptor: Extra information about an invoice for the customer's credit card statement.
StatementDescriptor string `json:"statement_descriptor" yaml:"statement_descriptor" schema:"statement_descriptor"`
// Status: The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`.
Status InvoiceStatus `json:"status" yaml:"status" schema:"status"`
// 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), in lowercase.
Currency string `json:"currency" yaml:"currency" schema:"currency"`
// Description: The description.
Description string `json:"description" yaml:"description" schema:"description"`
// ID: Unique identifier for the object.
ID string `json:"id" yaml:"id" schema:"id"`
// InvoiceItem: The ID of the invoice item associated with this line item if any.
InvoiceItem string `json:"invoice_item" yaml:"invoice_item" schema:"invoice_item"`
// Metadata: Set of key-value pairs.
Metadata map[string]string `json:"metadata" yaml:"metadata" schema:"metadata"`
}
InvoiceLineItem: An invoice line item.
type InvoiceStatus ¶ added in v0.1.4
type InvoiceStatus string
InvoiceStatus: An enum representing the possible values of an `Invoice`'s `status` field.
const ( // InvoiceStatusDraft: Draft. InvoiceStatusDraft InvoiceStatus = "draft" // InvoiceStatusOpen: Open. InvoiceStatusOpen InvoiceStatus = "open" // InvoiceStatusPaid: Paid. InvoiceStatusPaid InvoiceStatus = "paid" // InvoiceStatusUncollectible: Uncollectible. InvoiceStatusUncollectible InvoiceStatus = "uncollectible" // InvoiceStatusVoid: Void. InvoiceStatusVoid InvoiceStatus = "void" // 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 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 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(sig string, sso string) error
CommunitySso: Authorize an inbound auth request from our Community page. Parameters
- `sig`
- `sso`
Example ¶
CommunitySso: Authorize an inbound auth request from our Community page. Parameters
- `sig`
- `sso`
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) CreateDebugUploads ¶ added in v0.2.33
func (s *MetaService) CreateDebugUploads(body *bytes.Buffer) (*[]URL, error)
CreateDebugUploads: Uploads files to public blob storage for debugging purposes. Do NOT send files here that you don't want to be public.
Parameters
- `body`
Example ¶
CreateDebugUploads: Uploads files to public blob storage for debugging purposes. Do NOT send files here that you don't want to be public.
Parameters
- `body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
buf := new(bytes.Buffer)
result, err := client.Meta.CreateDebugUploads(buf)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MetaService) CreateEvent ¶ added in v0.2.33
func (s *MetaService) CreateEvent(body *bytes.Buffer) error
CreateEvent: Creates an internal telemetry event. We collect anonymous telemetry data for improving our product.
Parameters
- `body`: Telemetry data we are collecting
Example ¶
CreateEvent: Creates an internal telemetry event. We collect anonymous telemetry data for improving our product.
Parameters
- `body`: Telemetry data we are collecting
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
buf := new(bytes.Buffer)
if err := client.Meta.CreateEvent(buf); err != nil {
panic(err)
}
func (*MetaService) GetIpinfo ¶ added in v0.2.33
func (s *MetaService) GetIpinfo() (*IpAddrInfo, error)
GetIpinfo: Get ip address information.
Example ¶
GetIpinfo: Get ip address information.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Meta.GetIpinfo()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MetaService) GetPricingSubscriptions ¶ added in v0.2.33
func (s *MetaService) GetPricingSubscriptions() (*map[string][]ZooProductSubscription, error)
GetPricingSubscriptions: Get the pricing for our subscriptions. This is the ultimate source of truth for the pricing of our subscriptions.
Example ¶
GetPricingSubscriptions: Get the pricing for our subscriptions. This is the ultimate source of truth for the pricing of our subscriptions.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Meta.GetPricingSubscriptions()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MetaService) GetSchema ¶ added in v0.0.9
func (s *MetaService) GetSchema() error
GetSchema: Get OpenAPI schema.
Example ¶
GetSchema: Get OpenAPI schema.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Meta.GetSchema(); err != nil {
panic(err)
}
func (*MetaService) InternalGetAPITokenForDiscordUser ¶ added in v0.2.29
func (s *MetaService) InternalGetAPITokenForDiscordUser(discordId string) (*APIToken, error)
InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id. This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.
You must be a Zoo admin to use this endpoint.
Parameters
- `discordId`
Example ¶
InternalGetAPITokenForDiscordUser: Get an API token for a user by their discord id. This endpoint allows us to run API calls from our discord bot on behalf of a user. The user must have a discord account linked to their Zoo Account via oauth2 for this to work.
You must be a Zoo admin to use this endpoint.
Parameters
- `discordId`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Meta.InternalGetAPITokenForDiscordUser("some-string")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MetaService) Ping ¶
func (s *MetaService) Ping() (*Pong, error)
Ping: Return pong.
Example ¶
Ping: Return pong.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Meta.Ping()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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 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 MlCopilotClientMessageContent ¶ added in v0.2.42
type MlCopilotClientMessageContent 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"`
}
MlCopilotClientMessageContent: The system message, which can be used to set the context or instructions for the AI.
type MlCopilotClientMessageHeaders ¶ added in v0.2.42
type MlCopilotClientMessageHeaders 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"`
}
MlCopilotClientMessageHeaders: Authentication header request.
type MlCopilotClientMessageMlCopilotClientMessageHeaders ¶ added in v0.2.42
type MlCopilotClientMessageMlCopilotClientMessageHeaders struct {
// Content: The content of the user's message.
Content string `json:"content" yaml:"content" schema:"content,required"`
// 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"`
// 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 a fast mode.
Mode MlCopilotMode `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"`
// 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"`
}
MlCopilotClientMessageMlCopilotClientMessageHeaders: The user message, which contains the content of the user's input.
type MlCopilotMode ¶ added in v0.2.42
type MlCopilotMode string
MlCopilotMode: The mode to have the agent work in.
const ( // MlCopilotModeFast: Use a combination of models and reasoning effort for fast results. MlCopilotModeFast MlCopilotMode = "fast" // MlCopilotModeThoughtful: Use a model and effort that results in thoughtful responses. MlCopilotModeThoughtful MlCopilotMode = "thoughtful" )
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 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 MlCopilotServerMessageInfo ¶ added in v0.2.42
type MlCopilotServerMessageInfo struct {
// Info:
Info Info `json:"info" yaml:"info" schema:"info,required"`
}
MlCopilotServerMessageInfo: Log / banner text.
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: - Includes server messages: `Info`, `Error`, `Reasoning(..)`, `ToolOutput { .. }`, `ProjectUpdated { .. }`, and `EndOfStream { .. }`. - Also includes client `User` messages. - The following are NEVER included: `SessionData`, `ConversationId`, or `Delta`. - 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`. - 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 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 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" // MlCopilotSystemCommandInterrupt: Interrupt the current prompt that is being processed. MlCopilotSystemCommandInterrupt MlCopilotSystemCommand = "interrupt" )
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 MlPrompt ¶ added in v0.2.37
type MlPrompt struct {
// CompletedAt: When the prompt was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// ConversationID: The id for the conversation related to this prompt.
ConversationID UUID `json:"conversation_id" yaml:"conversation_id" schema:"conversation_id"`
// CreatedAt: The date and time the ML prompt was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error message if the prompt failed.
Error string `json:"error" yaml:"error" schema:"error"`
// Feedback: Feedback from the user, if any.
Feedback MlFeedback `json:"feedback" yaml:"feedback" schema:"feedback"`
// ID: The unique identifier for the ML prompt.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// KclVersion: The KCL version being used.
KclVersion string `json:"kcl_version" yaml:"kcl_version" schema:"kcl_version"`
// Metadata: The metadata for the prompt.
Metadata MlPromptMetadata `json:"metadata" yaml:"metadata" schema:"metadata"`
// ModelVersion: The version of the model.
ModelVersion string `json:"model_version" yaml:"model_version" schema:"model_version,required"`
// OutputFile: The output file. In the case of TextToCad this is a link to a file in a GCP bucket.
OutputFile string `json:"output_file" yaml:"output_file" schema:"output_file"`
// ProjectName: The name of the project, if any. This allows us to group prompts together that come from the same project and user.
ProjectName string `json:"project_name" yaml:"project_name" schema:"project_name"`
// Prompt: The prompt.
Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"`
// Seconds: Sum of EndOfStream durations, in seconds. Nullable to allow lazy backfill.
Seconds int `json:"seconds" yaml:"seconds" schema:"seconds"`
// StartedAt: When the prompt was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the prompt.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// Type: The type of prompt.
Type MlPromptType `json:"type" yaml:"type" schema:"type,required"`
// UpdatedAt: The date and time the ML prompt was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the ML prompt.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
MlPrompt: A ML prompt.
type MlPromptMetadata ¶ added in v0.2.37
type MlPromptMetadata struct {
// Code: Code for the model.
Code string `json:"code" yaml:"code" schema:"code"`
// OriginalSourceCode: The original source code for the model.
OriginalSourceCode string `json:"original_source_code" yaml:"original_source_code" schema:"original_source_code"`
// SourceRanges: The source ranges the user suggested to change.
SourceRanges []SourceRangePrompt `json:"source_ranges" yaml:"source_ranges" schema:"source_ranges"`
// UpstreamConversationID: The upstream conversation ID, if any.
UpstreamConversationID string `json:"upstream_conversation_id" yaml:"upstream_conversation_id" schema:"upstream_conversation_id"`
}
MlPromptMetadata: Metadata for a ML prompt.
type MlPromptResultsPage ¶ added in v0.2.37
type MlPromptResultsPage struct {
// Items: list of items on this page of results
Items []MlPrompt `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"`
}
MlPromptResultsPage: A single page of results
type MlPromptType ¶ added in v0.2.37
type MlPromptType string
MlPromptType: A type of ML prompt.
const ( // MlPromptTypeTextToCad: Text to CAD. MlPromptTypeTextToCad MlPromptType = "text_to_cad" // MlPromptTypeTextToKcl: Text to KCL. MlPromptTypeTextToKcl MlPromptType = "text_to_kcl" // MlPromptTypeTextToKclIteration: Text to KCL iteration. MlPromptTypeTextToKclIteration MlPromptType = "text_to_kcl_iteration" // MlPromptTypeTextToKclMultiFileIteration: Text to KCL iteration with multiple files. MlPromptTypeTextToKclMultiFileIteration MlPromptType = "text_to_kcl_multi_file_iteration" // MlPromptTypeCopilot: Copilot chat/assist prompts. MlPromptTypeCopilot MlPromptType = "copilot" )
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" )
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(conversationId UUID, replay bool, pr int, body any) (*websocket.Conn, error)
CopilotWs: Open a websocket to prompt the ML copilot. This endpoint accepts typed query parameters via `MlCopilotQuery`. See the field documentation on that struct for details, including replay behavior and wire format.
Parameters
- `conversationId`
- `replay`
- `pr`
- `body`: The types of messages that can be sent by the client to the server.
Example ¶
CopilotWs: Open a websocket to prompt the ML copilot. This endpoint accepts typed query parameters via `MlCopilotQuery`. See the field documentation on that struct for details, including replay behavior and wire format.
Parameters
- `conversationId`
- `replay`
- `pr`
- `body`: The types of messages that can be sent by the client to the server.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
// Create the websocket connection.
ws, err := client.Ml.CopilotWs(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), 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
}
}
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.
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.
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 *bytes.Buffer) (*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`: Code option for running and verifying kcl.
<details><summary>JSON schema</summary>
```json { "title": "CodeOption", "description": "Code option for running and verifying kcl.", "type": "string", "enum": [ "parse", "execute", "cleanup", "mock_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`: Code option for running and verifying kcl.
<details><summary>JSON schema</summary>
```json { "title": "CodeOption", "description": "Code option for running and verifying kcl.", "type": "string", "enum": [ "parse", "execute", "cleanup", "mock_execute" ] } ``` </details>
`body`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
buf := new(bytes.Buffer)
result, err := client.Ml.CreateProprietaryToKcl(kittycad.CodeOptionParse, buf)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MlService) CreateTextToCad ¶ added in v0.2.36
func (s *MlService) CreateTextToCad(outputFormat FileExportFormat, kcl bool, body TextToCadCreateBody) (*TextToCad, error)
CreateTextToCad: Generate a CAD model from text. Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated parts. Any other formats you request here will also be returned when you list your generated parts.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.
Parameters
- `outputFormat`: The valid types of output file formats.
- `kcl`
- `body`: Body for generating parts from text.
Example ¶
CreateTextToCad: Generate a CAD model from text. Because our source of truth for the resulting model is a STEP file, you will always have STEP file contents when you list your generated parts. Any other formats you request here will also be returned when you list your generated parts.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
One thing to note, if you hit the cache, this endpoint will return right away. So you only have to wait if the status is not `Completed` or `Failed`.
Parameters
- `outputFormat`: The valid types of output file formats.
- `kcl`
- `body`: Body for generating parts from text.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Ml.CreateTextToCad("", true, kittycad.TextToCadCreateBody{KclVersion: "some-string", ModelVersion: "some-string", ProjectName: "some-string", Prompt: "some-string"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MlService) CreateTextToCadIteration ¶ added in v0.2.37
func (s *MlService) CreateTextToCadIteration(body TextToCadIterationBody) (*TextToCadIteration, error)
CreateTextToCadIteration: Iterate on a CAD model with a prompt. Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.
You always get the whole code back, even if you only changed a small part of it.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
This endpoint will soon be deprecated in favor of the `/ml/text-to-cad/multi-file/iteration` endpoint. In that the endpoint path will remain but it will have the same behavior as `ml/text-to-cad/multi-file/iteration`.
Parameters
- `body`: Body for generating parts from text.
Example ¶
CreateTextToCadIteration: Iterate on a CAD model with a prompt. Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.
You always get the whole code back, even if you only changed a small part of it.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
This endpoint will soon be deprecated in favor of the `/ml/text-to-cad/multi-file/iteration` endpoint. In that the endpoint path will remain but it will have the same behavior as `ml/text-to-cad/multi-file/iteration`.
Parameters
- `body`: Body for generating parts from text.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Ml.CreateTextToCadIteration(kittycad.TextToCadIterationBody{KclVersion: "some-string", OriginalSourceCode: "some-string", ProjectName: "some-string", Prompt: "some-string", SourceRanges: []kittycad.SourceRangePrompt{}})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MlService) CreateTextToCadMultiFileIteration ¶ added in v0.2.40
func (s *MlService) CreateTextToCadMultiFileIteration(body *bytes.Buffer) (*TextToCadMultiFileIteration, error)
CreateTextToCadMultiFileIteration: Iterate on a multi-file CAD model with a prompt. This endpoint can iterate on multi-file projects.
Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.
You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
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
- `body`: Body for iterating on models from text prompts.
Example ¶
CreateTextToCadMultiFileIteration: Iterate on a multi-file CAD model with a prompt. This endpoint can iterate on multi-file projects.
Even if you give specific ranges to edit, the model might change more than just those in order to make the changes you requested without breaking the code.
You always get the whole code back, even if you only changed a small part of it. This endpoint will always return all the code back, including files that were not changed. If your original source code imported a stl/gltf/step/etc file, the output will not include that file since the model will never change non-kcl files. The endpoint will only return the kcl files that were changed.
This operation is performed asynchronously, the `id` of the operation will be returned. You can use the `id` returned from the request to get status information about the async operation from the `/async/operations/{id}` endpoint.
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
- `body`: Body for iterating on models from text prompts.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
buf := new(bytes.Buffer)
result, err := client.Ml.CreateTextToCadMultiFileIteration(buf)
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.
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
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) GetPrompt ¶ added in v0.2.37
GetPrompt: Get a ML prompt. This endpoint requires authentication by a Zoo employee.
Parameters
- `id`
Example ¶
GetPrompt: Get a ML prompt. This endpoint requires authentication by a Zoo employee.
Parameters
- `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Ml.GetPrompt(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MlService) GetTextToCadPartForUser ¶ added in v0.2.42
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`
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) 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.
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) ListOrgDatasetsForModel ¶ added in v0.2.42
func (s *MlService) ListOrgDatasetsForModel(id UUID) (*[]OrgDataset, error)
ListOrgDatasetsForModel: List the org datasets that are currently attached to a custom ML model owned by the caller’s organization. Parameters
- `id`: A UUID usually v4 or v7
Example ¶
ListOrgDatasetsForModel: List the org datasets that are currently attached to a custom ML model owned by the caller’s organization. Parameters
- `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Ml.ListOrgDatasetsForModel(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MlService) ListPrompts ¶ added in v0.2.37
func (s *MlService) ListPrompts(limit int, pageToken string, sortBy CreatedAtSortMode) (*MlPromptResultsPage, error)
ListPrompts: List all ML prompts. For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by a Zoo employee.
The ML prompts are returned in order of creation, with the most recently created ML prompts first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
ListPrompts: List all ML prompts. For text-to-cad prompts, this will always return the STEP file contents as well as the format the user originally requested.
This endpoint requires authentication by a Zoo employee.
The ML prompts are returned in order of creation, with the most recently created ML prompts first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Ml.ListPrompts(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, conversationId UUID, noModels bool, noParts bool) (*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.
`conversationId`: A UUID usually v4 or v7
`noModels`
`noParts`
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.
`conversationId`: A UUID usually v4 or v7
`noModels`
`noParts`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Ml.ListTextToCadPartsForUser(123, "some-string", "", kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), true, true)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*MlService) ReasoningWs ¶ added in v0.2.42
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.
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.
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"`
}
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 ModelingAppEventType ¶ added in v0.2.33
type ModelingAppEventType string
ModelingAppEventType: Type for modeling-app events
const ( // ModelingAppEventTypeSuccessfulCompileBeforeClose: This event is sent before the modeling app or project is closed. The attachment should contain the contents of the most recent successful compile. ModelingAppEventTypeSuccessfulCompileBeforeClose ModelingAppEventType = "successful_compile_before_close" )
type ModelingAppShareLinks ¶ added in v0.2.38
type ModelingAppShareLinks string
ModelingAppShareLinks: Modeling App share link capabilities.
const ( ModelingAppShareLinksPublic ModelingAppShareLinks = "public" ModelingAppShareLinksPasswordProtected ModelingAppShareLinks = "password_protected" 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"`
// 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"`
// IsCustomQuote: Indicates whether this plan uses custom-quoted pricing.
IsCustomQuote bool `json:"is_custom_quote" yaml:"is_custom_quote" schema:"is_custom_quote"`
// 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 per month. This re-ups on the 1st of each month. 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 per month. This re-ups on the 1st of each month.
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 (meaning 1 credit = 1 second of API usage).
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 []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 {
// 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"`
}
ModelingCmdAngle: Create a helix using the specified parameters.
type ModelingCmdAngleStepSize ¶ added in v0.2.42
type ModelingCmdAngleStepSize 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"`
}
ModelingCmdAngleStepSize: Export a sketch to a file.
type ModelingCmdArcDegrees ¶ added in v0.2.33
type ModelingCmdArcDegrees struct {
// SolidIds: Which solids to intersect together
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"`
}
ModelingCmdArcDegrees: Create a new solid from intersecting several other solids. In other words, the part of the input solids where they all overlap will be the output solid.
type ModelingCmdAxis ¶ added in v0.2.33
type ModelingCmdAxis struct {
// EdgeID: Edge about which to make the helix.
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// IsClockwise: Is the helix rotation clockwise?
IsClockwise bool `json:"is_clockwise" yaml:"is_clockwise" schema:"is_clockwise,required"`
// Length: Length of the helix. 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"`
}
ModelingCmdAxis: Create a helix using the specified parameters.
type ModelingCmdAxisIs2D ¶ added in v0.2.33
type ModelingCmdAxisIs2D 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"`
}
ModelingCmdAxisIs2D: Mirror the input entities over the specified axis. (Currently only supports sketches)
type ModelingCmdBaseCurveIndex ¶ added in v0.2.38
type ModelingCmdBaseCurveIndex 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"`
}
ModelingCmdBaseCurveIndex: Add a hole to a Solid2d object before extruding it.
type ModelingCmdBezApproximateRational ¶ added in v0.2.38
type ModelingCmdBezApproximateRational 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"`
}
ModelingCmdBezApproximateRational: Gets all edges which are opposite the given edge, across all possible faces.
type ModelingCmdCameraDragEnd ¶ added in v0.2.18
type ModelingCmdCameraDragEnd 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"`
}
ModelingCmdCameraDragEnd: Set the color of a plane.
type ModelingCmdCameraDragMove ¶ added in v0.2.18
type ModelingCmdCameraDragMove 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"`
}
ModelingCmdCameraDragMove: Set opacity of the entity.
type ModelingCmdCameraDragStart ¶ added in v0.2.18
type ModelingCmdCameraDragStart 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"`
}
ModelingCmdCameraDragStart: Determines a position on a brep face evaluated by parameters u,v
type ModelingCmdCenter ¶ added in v0.2.22
type ModelingCmdCenter 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"`
}
ModelingCmdCenter: Get the plane for sketch mode.
type ModelingCmdCenter2D ¶ added in v0.2.42
type ModelingCmdCenter2D 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"`
}
ModelingCmdCenter2D: Export the scene to a file.
type ModelingCmdChildIndex ¶ added in v0.2.27
type ModelingCmdChildIndex 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"`
}
ModelingCmdChildIndex: Get the density of entities in the scene or the default scene.
type ModelingCmdClosePath ¶ added in v0.2.18
type ModelingCmdClosePath 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"`
// 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"`
}
ModelingCmdClosePath: Cut the list of given edges with the given cut parameters.
type ModelingCmdCylinderID ¶ added in v0.2.33
type ModelingCmdCylinderID 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"`
}
ModelingCmdCylinderID: Render transparent surfaces more accurately, but this might make rendering slower. Because it can interfere with runtime performance, it defaults to false.
type ModelingCmdDefaultCameraGetSettings ¶ added in v0.2.33
type ModelingCmdDefaultCameraGetSettings 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"`
}
ModelingCmdDefaultCameraGetSettings: Send a mouse move event
type ModelingCmdDefaultCameraGetView ¶ added in v0.2.40
type ModelingCmdDefaultCameraGetView 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"`
}
ModelingCmdDefaultCameraGetView: Send a mouse click event Updates modified/selected entities.
type ModelingCmdDefaultCameraLookAt ¶ added in v0.2.19
type ModelingCmdDefaultCameraLookAt struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdDefaultCameraLookAt: Sets whether or not changes to the scene or its objects will be done as a "dry run" In a dry run, successful commands won't actually change the model. This is useful for catching errors before actually making the change.
type ModelingCmdDefaultCameraPerspectiveSettings ¶ added in v0.2.33
type ModelingCmdDefaultCameraPerspectiveSettings 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"`
}
ModelingCmdDefaultCameraPerspectiveSettings: Get control points of the given curve.
type ModelingCmdDefaultCameraSetView ¶ added in v0.2.40
type ModelingCmdDefaultCameraSetView struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdDefaultCameraSetView: 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 ModelingCmdDefaultCameraZoom ¶ added in v0.2.27
type ModelingCmdDefaultCameraZoom 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"`
}
ModelingCmdDefaultCameraZoom: Obtain curve ids for vertex ids
type ModelingCmdDistance ¶ added in v0.2.22
type ModelingCmdDistance 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"`
// 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"`
}
ModelingCmdDistance: Command for lofting sections to create a solid
type ModelingCmdDistanceType ¶ added in v0.2.33
type ModelingCmdDistanceType 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"`
}
ModelingCmdDistanceType: Get the ids of a given entity type.
type ModelingCmdEdgeID ¶ added in v0.2.33
type ModelingCmdEdgeID 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"`
}
ModelingCmdEdgeID: Hide or show an object
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 ModelingCmdEntityCircularPattern ¶ added in v0.2.33
type ModelingCmdEntityCircularPattern struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdEntityCircularPattern: Set the grid lines to auto scale. The grid will get larger the further you zoom out, and smaller the more you zoom in.
type ModelingCmdEntityClone ¶ added in v0.2.40
type ModelingCmdEntityClone 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"`
}
ModelingCmdEntityClone: Fit the view to the specified object(s).
type ModelingCmdEntityGetAllChildUuids ¶ added in v0.2.27
type ModelingCmdEntityGetAllChildUuids 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"`
}
ModelingCmdEntityGetAllChildUuids: Focus the default camera upon an object in the scene.
type ModelingCmdEntityGetChildUuid ¶ added in v0.2.27
type ModelingCmdEntityGetChildUuid 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"`
}
ModelingCmdEntityGetChildUuid: Get the center of mass of entities in the scene or the default scene.
type ModelingCmdEntityGetDistance ¶ added in v0.2.33
type ModelingCmdEntityGetDistance 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"`
}
ModelingCmdEntityGetDistance: Updates the camera to center to the center of the current selection (or the origin if nothing is selected)
type ModelingCmdEntityGetNumChildren ¶ added in v0.2.27
type ModelingCmdEntityGetNumChildren 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"`
}
ModelingCmdEntityGetNumChildren: Get the mass of entities in the scene or the default scene.
type ModelingCmdEntityGetParentID ¶ added in v0.2.27
type ModelingCmdEntityGetParentID 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"`
}
ModelingCmdEntityGetParentID: Import files to the current model.
type ModelingCmdEntityGetSketchPaths ¶ added in v0.2.34
type ModelingCmdEntityGetSketchPaths 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"`
}
ModelingCmdEntityGetSketchPaths: What kind of entities can be selected?
type ModelingCmdEntityID ¶ added in v0.2.27
type ModelingCmdEntityID 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"`
}
ModelingCmdEntityID: Reconfigure the stream.
type ModelingCmdEntityId1 ¶ added in v0.2.33
type ModelingCmdEntityId1 struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdEntityId1: Use orthographic projection.
type ModelingCmdEntityId2 ¶ added in v0.2.33
type ModelingCmdEntityId2 struct {
// Parameters: If this is not given, use the same parameters as last time the perspective camera was used.
Parameters PerspectiveCameraParameters `json:"parameters" yaml:"parameters" schema:"parameters"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdEntityId2: Use perspective projection.
type ModelingCmdEntityIds ¶ added in v0.2.27
type ModelingCmdEntityIds 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"`
}
ModelingCmdEntityIds: Obtain curve id by index
type ModelingCmdEntityLinearPattern ¶ added in v0.2.33
type ModelingCmdEntityLinearPattern struct {
// 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"`
}
ModelingCmdEntityLinearPattern: Create a new solid from combining other smaller solids. In other words, every part of the input solids will be included in the output solid.
type ModelingCmdEntityLinearPatternTransform ¶ added in v0.2.34
type ModelingCmdEntityLinearPatternTransform struct {
// EdgeID: Any edge that lies on the extrusion base path.
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// ObjectID: The Solid3d object whose info 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"`
}
ModelingCmdEntityLinearPatternTransform: Get a concise description of all of solids edges.
type ModelingCmdExport ¶ added in v0.2.19
type ModelingCmdExport 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"`
}
ModelingCmdExport: Find the start and end of a curve.
type ModelingCmdExport2D ¶ added in v0.2.40
type ModelingCmdExport2D 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"`
}
ModelingCmdExport2D: Obtain the sketch target id (if the path was drawn in sketchmode) for a path
type ModelingCmdExport3D ¶ added in v0.2.40
type ModelingCmdExport3D struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
// Window: The mouse position.
Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}
ModelingCmdExport3D: Stop dragging the mouse.
type ModelingCmdExtendPath ¶ added in v0.2.18
type ModelingCmdExtendPath struct {
// Angle: The signed angle of revolution (in degrees, must be <= 360 in either direction)
Angle Angle `json:"angle" yaml:"angle" schema:"angle,required"`
// EdgeID: The edge to use as the axis of revolution, must be linear and lie in the plane of the solid
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// 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"`
}
ModelingCmdExtendPath: Command for revolving a solid 2d about a brep edge
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 {
// 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"`
}
ModelingCmdExtrudeMethod: Closes a path, converting it to a 2D solid.
type ModelingCmdExtrudeToReference ¶ added in v0.2.42
type ModelingCmdExtrudeToReference struct {
// Magnitude: Move the camera forward along the vector it's looking at, by this magnitudedefaultCameraZoom. Basically, how much should the camera move forward by.
Magnitude float64 `json:"magnitude" yaml:"magnitude" schema:"magnitude,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdExtrudeToReference: Adjust zoom of the default camera.
type ModelingCmdFaceIds ¶ added in v0.2.34
type ModelingCmdFaceIds struct {
// Entities: Which entities to select
Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdFaceIds: Replaces current selection with these entities (by UUID).
type ModelingCmdFaces ¶ added in v0.2.40
type ModelingCmdFaces 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"`
}
ModelingCmdFaces: Camera drag started.
type ModelingCmdFormat ¶ added in v0.2.27
type ModelingCmdFormat 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"`
}
ModelingCmdFormat: Obtain vertex ids for a path
type ModelingCmdFovY ¶ added in v0.2.33
type ModelingCmdFovY struct {
// Color: The default system color.
Color Color `json:"color" yaml:"color" schema:"color"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdFovY: Set the default system properties used when a specific property isn't set.
type ModelingCmdHollow ¶ added in v0.2.37
type ModelingCmdHollow 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"`
}
ModelingCmdHollow: 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 ModelingCmdInteraction ¶ added in v0.2.27
type ModelingCmdInteraction 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"`
}
ModelingCmdInteraction: Determines whether a brep face is planar and returns its surface-local planar axes if so
type ModelingCmdLabel ¶ added in v0.2.42
type ModelingCmdLabel struct {
// RelativeTo: What is this sweep relative to?
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"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdLabel: Extrude the object along a path.
type ModelingCmdLoft ¶ added in v0.2.38
type ModelingCmdLoft struct {
// EdgeID: Which edge you want the opposite of.
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// FaceID: Which face is used to figure out the opposite edge?
FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
// ObjectID: Which object is being queried.
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdLoft: Gets the previous adjacent edge for the given edge, along the given face.
type ModelingCmdMagnitude ¶ added in v0.2.27
type ModelingCmdMagnitude 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"`
}
ModelingCmdMagnitude: Query the given path.
type ModelingCmdModelingCmdAngle ¶ added in v0.2.33
type ModelingCmdModelingCmdAngle 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"`
}
ModelingCmdModelingCmdAngle: Changes visibility of scene-wide edge lines on brep solids
type ModelingCmdModelingCmdAxis ¶ added in v0.2.33
type ModelingCmdModelingCmdAxis struct {
// 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"`
}
ModelingCmdModelingCmdAxis: Create a new solid from subtracting several other solids. The 'target' is what will be cut from. The 'tool' is what will be cut out from 'target'.
type ModelingCmdModelingCmdCenter ¶ added in v0.2.33
type ModelingCmdModelingCmdCenter struct {
// FaceID: If the object is a solid, this is the ID of the face to base the offset on. If given, and `object_id` refers to a solid, then this face on the solid will be offset. If given but `object_id` doesn't refer to a solid, responds with an error. If not given, then `object_id` itself will be offset directly.
FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id"`
// ObjectID: The object that will be offset (can be a path, sketch, or a solid)
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"`
}
ModelingCmdModelingCmdCenter: Make a new path by offsetting an object by a given distance. The new path's ID will be the ID of this command.
type ModelingCmdModelingCmdDistance ¶ added in v0.2.42
type ModelingCmdModelingCmdDistance 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"`
}
ModelingCmdModelingCmdDistance: Export the scene to a file.
type ModelingCmdModelingCmdEntityID ¶ added in v0.2.27
type ModelingCmdModelingCmdEntityID 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"`
}
ModelingCmdModelingCmdEntityID: Add a hole to a closed path by offsetting it a uniform distance inward.
type ModelingCmdModelingCmdEntityIds ¶ added in v0.2.40
type ModelingCmdModelingCmdEntityIds 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"`
}
ModelingCmdModelingCmdEntityIds: Remove scene objects.
type ModelingCmdModelingCmdExtrudeMethod ¶ added in v0.2.42
type ModelingCmdModelingCmdExtrudeMethod struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdModelingCmdExtrudeMethod: Gets 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 parent?
type ModelingCmdModelingCmdFormat ¶ added in v0.2.40
type ModelingCmdModelingCmdFormat 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"`
}
ModelingCmdModelingCmdFormat: Utility method. Performs both a ray cast and projection to plane-local coordinates. Returns the plane coordinates for the given window coordinates.
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"`
// 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"`
}
ModelingCmdModelingCmdInteraction: Make a new plane
type ModelingCmdModelingCmdNumRepetitions ¶ added in v0.2.33
type ModelingCmdModelingCmdNumRepetitions struct {
// GridID: The grid to be moved.
GridID UUID `json:"grid_id" yaml:"grid_id" schema:"grid_id,required"`
// ReferenceID: The plane or face that the grid will be aligned to. If a face, it must be planar to succeed.
ReferenceID UUID `json:"reference_id" yaml:"reference_id" schema:"reference_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdModelingCmdNumRepetitions: Align the grid with a plane or a planar face.
type ModelingCmdModelingCmdOpposite ¶ added in v0.2.41
type ModelingCmdModelingCmdOpposite struct {
// ObjectID: Which object to change
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdModelingCmdOpposite: Bring an object to the front of the scene
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"`
// 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 {
// 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"`
}
ModelingCmdModelingCmdSequence: Get type of the given curve.
type ModelingCmdModelingCmdTarget ¶ added in v0.2.27
type ModelingCmdModelingCmdTarget 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"`
}
ModelingCmdModelingCmdTarget: Set the material properties of an object
type ModelingCmdModelingCmdTolerance ¶ added in v0.2.33
type ModelingCmdModelingCmdTolerance struct {
// EdgeID: Which edge you want the opposite of.
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// FaceID: Which face is used to figure out the opposite edge?
FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
// ObjectID: Which object is being queried.
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdModelingCmdTolerance: Gets the next adjacent edge for the given edge, along the given face.
type ModelingCmdModelingCmdUp ¶ added in v0.2.33
type ModelingCmdModelingCmdUp struct {
// EntityID: Which entity to project (vertex or edge).
EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
// PlaneID: Which plane to project entity_id 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"`
}
ModelingCmdModelingCmdUp: Project an entity on to a plane.
type ModelingCmdModelingCmdVantage ¶ added in v0.2.33
type ModelingCmdModelingCmdVantage 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"`
}
ModelingCmdModelingCmdVantage: Project a list of points on to a plane.
type ModelingCmdModelingCmdWindow ¶ added in v0.2.27
type ModelingCmdModelingCmdWindow 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"`
}
ModelingCmdModelingCmdWindow: Set the current tool.
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"`
// Center2D: Center to twist about (relative to 2D sketch)
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 ModelingCmdNumRepetitions ¶ added in v0.2.33
type ModelingCmdNumRepetitions struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdNumRepetitions: Get the number of objects in the scene
type ModelingCmdObjectID ¶ added in v0.2.34
type ModelingCmdObjectID struct {
// Entities: Highlight these entities.
Entities []UUID `json:"entities" yaml:"entities" schema:"entities,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdObjectID: Changes the current highlighted entity to these entities.
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"`
// 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"`
}
ModelingCmdOpposite: Camera drag continued.
type ModelingCmdOrigin ¶ added in v0.2.22
type ModelingCmdOrigin 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"`
}
ModelingCmdOrigin: Modifies the selection by simulating a "mouse click" at the given x,y window coordinate Returns ID of whatever was selected.
type ModelingCmdPath ¶ added in v0.2.27
type ModelingCmdPath struct {
// Distance: How far off the plane to extrude
Distance float64 `json:"distance" yaml:"distance" schema:"distance,required"`
// 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"`
// 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. Must be a closed 2D solid.
Target UUID `json:"target" yaml:"target" schema:"target,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdPath: Command for extruding a solid 2d.
type ModelingCmdPathID ¶ added in v0.2.22
type ModelingCmdPathID 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"`
// 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"`
}
ModelingCmdPathID: Fillets the given edge with the specified radius.
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 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"`
// 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"`
}
ModelingCmdReference: Change what the default camera is looking at.
type ModelingCmdRelativeTo ¶ added in v0.2.41
type ModelingCmdRelativeTo struct {
// DistanceType: Type of distance to be measured.
DistanceType any `json:"distance_type" yaml:"distance_type" schema:"distance_type,required"`
// EntityId1: ID of the first entity being queried.
EntityId1 UUID `json:"entity_id1" yaml:"entity_id1" schema:"entity_id1,required"`
// EntityId2: ID of the second entity being queried.
EntityId2 UUID `json:"entity_id2" yaml:"entity_id2" schema:"entity_id2,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdRelativeTo: What is the distance between these two entities?
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 {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdRevolve: Removes all of the Objects in the scene
type ModelingCmdRevolveAboutEdge ¶ added in v0.2.33
type ModelingCmdRevolveAboutEdge 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"`
}
ModelingCmdRevolveAboutEdge: Gets all faces which use the given edge.
type ModelingCmdRotateDuplicates ¶ added in v0.2.33
type ModelingCmdRotateDuplicates 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"`
}
ModelingCmdRotateDuplicates: Set the scale of the grid lines in the video feed.
type ModelingCmdSectionIds ¶ added in v0.2.38
type ModelingCmdSectionIds struct {
// EdgeID: Which edge you want the opposite of.
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// FaceID: Which face is used to figure out the opposite edge?
FaceID UUID `json:"face_id" yaml:"face_id" schema:"face_id,required"`
// ObjectID: Which object is being queried.
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdSectionIds: Gets the edge opposite the given edge, along the given face.
type ModelingCmdSectional ¶ added in v0.2.40
type ModelingCmdSectional 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"`
}
ModelingCmdSectional: 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 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 {
// 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"`
}
ModelingCmdSequence: Send object to front or back.
type ModelingCmdShellThickness ¶ added in v0.2.34
type ModelingCmdShellThickness 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"`
}
ModelingCmdShellThickness: Create a new annotation
type ModelingCmdSolid3DshellFace ¶ added in v0.2.34
type ModelingCmdSolid3DshellFace 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"`
}
ModelingCmdSolid3DshellFace: Update an annotation
type ModelingCmdSpacing ¶ added in v0.2.33
type ModelingCmdSpacing struct {
// ObjectID: Id of the object whose transform is to be set.
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
// Transforms: List of transforms to be applied to the object.
Transforms []ComponentTransform `json:"transforms" yaml:"transforms" schema:"transforms,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdSpacing: Set the transform of 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 ModelingCmdSweep ¶ added in v0.2.40
type ModelingCmdSweep struct {
// CylinderID: ID of the cylinder.
CylinderID UUID `json:"cylinder_id" yaml:"cylinder_id" schema:"cylinder_id,required"`
// IsClockwise: Is the helix rotation clockwise?
IsClockwise bool `json:"is_clockwise" yaml:"is_clockwise" schema:"is_clockwise,required"`
// Length: Length of the helix. If None, the length of the cylinder will be used instead.
Length float64 `json:"length" yaml:"length" schema:"length"`
// 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"`
}
ModelingCmdSweep: Create a helix using the input cylinder and other specified parameters.
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"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
// Window: The final mouse position.
Window Point2D `json:"window" yaml:"window" schema:"window,required"`
}
ModelingCmdTarget: Camera drag ended
type ModelingCmdTo ¶ added in v0.2.22
type ModelingCmdTo struct {
// 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 to extrude. Must be a closed 2D solid.
Target UUID `json:"target" yaml:"target" schema:"target,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdTo: Command for extruding a solid 2d to a reference geometry.
type ModelingCmdTolerance ¶ added in v0.2.33
type ModelingCmdTolerance 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"`
}
ModelingCmdTolerance: What is the UUID of this entity's n-th child?
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 {
// ArcDegrees: Arc angle (in degrees) to place repetitions along.
ArcDegrees float64 `json:"arc_degrees" yaml:"arc_degrees" schema:"arc_degrees,required"`
// Axis: Axis around which to make the copies. For Solid2d patterns, this is ignored.
Axis Point3D `json:"axis" yaml:"axis" schema:"axis,required"`
// Center: Point around which to make the copies. For Solid2d patterns, the z component is ignored.
Center Point3D `json:"center" yaml:"center" schema:"center,required"`
// EntityID: ID of the entity being copied.
EntityID UUID `json:"entity_id" yaml:"entity_id" schema:"entity_id,required"`
// NumRepetitions: Number of repetitions to make.
NumRepetitions int `json:"num_repetitions" yaml:"num_repetitions" schema:"num_repetitions,required"`
// RotateDuplicates: Whether or not to rotate the objects as they are copied.
RotateDuplicates bool `json:"rotate_duplicates" yaml:"rotate_duplicates" schema:"rotate_duplicates,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdTrajectory: Create a circular pattern using this entity.
type ModelingCmdTransform ¶ added in v0.2.34
type ModelingCmdTransform 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"`
}
ModelingCmdTransform: Fit the view to the scene with an isometric view.
type ModelingCmdTransforms ¶ added in v0.2.40
type ModelingCmdTransforms struct {
// EdgeID: Any edge that lies on the extrusion base path.
EdgeID UUID `json:"edge_id" yaml:"edge_id" schema:"edge_id,required"`
// ObjectID: The Solid3d object whose extrusion is being queried.
ObjectID UUID `json:"object_id" yaml:"object_id" schema:"object_id,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdTransforms: Get a concise description of all of an extrusion's faces.
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 {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdUp: Sets whether or not changes to the scene or its objects will be done as a "dry run" In a dry run, successful commands won't actually change the model. This is useful for catching errors before actually making the change.
type ModelingCmdVantage ¶ added in v0.2.22
type ModelingCmdVantage 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"`
}
ModelingCmdVantage: Set the background color of the scene.
type ModelingCmdVdegree ¶ added in v0.2.38
type ModelingCmdVdegree struct {
// FaceIds: The faces being queried
FaceIds []UUID `json:"face_ids" yaml:"face_ids" schema:"face_ids,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"`
}
ModelingCmdVdegree: Gets the shared edge between these two faces if it exists
type ModelingCmdView ¶ added in v0.2.40
type ModelingCmdView struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdView: Get the plane for sketch mode.
type ModelingCmdWindow ¶ added in v0.2.27
type ModelingCmdWindow 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"`
}
ModelingCmdWindow: Obtains the surface "center of mass"
type ModelingCmdZfar ¶ added in v0.2.33
type ModelingCmdZfar struct {
// Format: What image format to return.
Format ImageFormat `json:"format" yaml:"format" schema:"format,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
ModelingCmdZfar: Take a snapshot of the current view.
type ModelingCmdZnear ¶ added in v0.2.33
type ModelingCmdZnear 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"`
}
ModelingCmdZnear: Add a gizmo showing the axes.
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(apicallId string, fps int, orderIndependentTransparency bool, pool string, postEffect PostEffectType, replay string, showGrid bool, unlockedFramerate bool, videoResHeight int, videoResWidth int, webrtc bool, pr int, body any) (*websocket.Conn, error)
CommandsWs: Open a websocket which accepts modeling commands. Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.
Parameters
- `apicallId`
- `fps`
- `orderIndependentTransparency`
- `pool`
- `postEffect`: Post effect type
- `replay`
- `showGrid`
- `unlockedFramerate`
- `videoResHeight`
- `videoResWidth`
- `webrtc`
- `pr`
- `body`: The websocket messages the server receives.
Example ¶
CommandsWs: Open a websocket which accepts modeling commands. Pass those commands to the engine via websocket, and pass responses back to the client. Basically, this is a websocket proxy between the frontend/client and the engine.
Parameters
- `apicallId`
- `fps`
- `orderIndependentTransparency`
- `pool`
- `postEffect`: Post effect type
- `replay`
- `showGrid`
- `unlockedFramerate`
- `videoResHeight`
- `videoResWidth`
- `webrtc`
- `pr`
- `body`: The websocket messages the server receives.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
// Create the websocket connection.
ws, err := client.Modeling.CommandsWs("some-string", 123, true, "some-string", kittycad.PostEffectTypePhosphor, "some-string", true, true, 123, 123, 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 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 NewAnnotation ¶ added in v0.2.38
type NewAnnotation struct {
}
NewAnnotation: The response from the `NewAnnotation` endpoint.
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 Oauth2GrantType ¶ added in v0.2.19
type Oauth2GrantType string
Oauth2GrantType: An OAuth 2.0 Grant Type. These are documented here: <https://oauth.net/2/grant-types/>.
const ( // Oauth2GrantTypeUrnietfparamsoauthgrantTypedeviceCode: An OAuth 2.0 Device Authorization Grant. Oauth2GrantTypeUrnietfparamsoauthgrantTypedeviceCode Oauth2GrantType = "urn:ietf:params:oauth:grant-type:device_code" )
type Oauth2Service ¶ added in v0.1.9
type Oauth2Service service
Oauth2Service: Endpoints that implement OAuth 2.0 grant flows.
func (*Oauth2Service) DeviceAccessToken ¶ added in v0.2.4
func (s *Oauth2Service) DeviceAccessToken(body DeviceAccessTokenRequestForm) error
DeviceAccessToken: Request a device access token. This endpoint should be polled by the client until the user code is verified and the grant is confirmed.
Parameters
- `body`: The form for a device access token request.
Example ¶
DeviceAccessToken: Request a device access token. This endpoint should be polled by the client until the user code is verified and the grant is confirmed.
Parameters
- `body`: The form for a device access token request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Oauth2.DeviceAccessToken(kittycad.DeviceAccessTokenRequestForm{ClientID: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), DeviceCode: kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), GrantType: ""}); err != nil {
panic(err)
}
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.
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.
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(appName string, userCode string) error
DeviceAuthVerify: Verify an OAuth 2.0 Device Authorization Grant. This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.
Parameters
- `appName`
- `userCode`
Example ¶
DeviceAuthVerify: Verify an OAuth 2.0 Device Authorization Grant. This endpoint should be accessed in a full user agent (e.g., a browser). If the user is not logged in, we redirect them to the login page and use the `callback_url` parameter to get them to the UI verification form upon logging in. If they are logged in, we redirect them to the UI verification form on the website.
Parameters
- `appName`
- `userCode`
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) ProviderCallback ¶ added in v0.2.4
func (s *Oauth2Service) ProviderCallback(provider AccountProvider, code string, idToken string, state string, user string) error
ProviderCallback: Listen for callbacks for the OAuth 2.0 provider. Parameters
- `provider`: An account provider.
- `code`
- `idToken`
- `state`
- `user`
Example ¶
ProviderCallback: Listen for callbacks for the OAuth 2.0 provider. Parameters
- `provider`: An account provider.
- `code`
- `idToken`
- `state`
- `user`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Oauth2.ProviderCallback("", "some-string", "some-string", "some-string", "some-string"); err != nil {
panic(err)
}
func (*Oauth2Service) ProviderCallbackCreate ¶ added in v0.2.33
func (s *Oauth2Service) ProviderCallbackCreate(provider AccountProvider, body AuthCallback) error
ProviderCallbackCreate: Listen for callbacks for the OAuth 2.0 provider. This specific endpoint listens for posts of form data.
Parameters
- `provider`: An account provider.
- `body`: The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating.
Example ¶
ProviderCallbackCreate: Listen for callbacks for the OAuth 2.0 provider. This specific endpoint listens for posts of form data.
Parameters
- `provider`: An account provider.
- `body`: The authentication callback from the OAuth 2.0 client. This is typically posted to the redirect URL as query params after authenticating.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Oauth2.ProviderCallbackCreate("", kittycad.AuthCallback{Code: "some-string", IdToken: "some-string", State: "some-string", User: "some-string"}); err != nil {
panic(err)
}
func (*Oauth2Service) ProviderConsent ¶ added in v0.2.4
func (s *Oauth2Service) ProviderConsent(provider AccountProvider, callbackUrl string) (*Oauth2ClientInfo, error)
ProviderConsent: Get the consent URL and other information for the OAuth 2.0 provider. Parameters
- `provider`: An account provider.
- `callbackUrl`
Example ¶
ProviderConsent: Get the consent URL and other information for the OAuth 2.0 provider. Parameters
- `provider`: An account provider.
- `callbackUrl`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Oauth2.ProviderConsent("", "some-string")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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.
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)
}
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 ObjectVisible ¶ added in v0.2.38
type ObjectVisible struct {
}
ObjectVisible: The response from the `ObjectVisible` endpoint.
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 'SetOrderIndependentTransparency'.
Data SetOrderIndependentTransparency `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 'SetGridScale'.
Data SetGridScale `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 `ObjectBringToFront` endpoint.
Data ObjectBringToFront `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 'BooleanIntersection'.
Data BooleanIntersection `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: Data from importing the files
Data ImportFiles `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 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"`
}
OkModelingCmdResponseDefaultCameraCenterToSelection is the type definition for a OkModelingCmdResponseDefaultCameraCenterToSelection.
type OkModelingCmdResponseDefaultCameraLookAt ¶ added in v0.2.38
type OkModelingCmdResponseDefaultCameraLookAt struct {
// Data: The response from the `Solid2dAddHole` endpoint.
Data Solid2DAddHole `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 `Solid3dCutEdges` endpoint.
Data Solid3DCutEdges `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: Endpoints of a curve
Data CurveGetEndPoints `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: 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"`
}
OkModelingCmdResponseDefaultCameraSetPerspective is the type definition for a OkModelingCmdResponseDefaultCameraSetPerspective.
type OkModelingCmdResponseDisableDryRun ¶ added in v0.2.38
type OkModelingCmdResponseDisableDryRun 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"`
}
OkModelingCmdResponseDisableDryRun is the type definition for a OkModelingCmdResponseDisableDryRun.
type OkModelingCmdResponseEdgeLinesVisible ¶ added in v0.2.38
type OkModelingCmdResponseEdgeLinesVisible 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"`
}
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 OkModelingCmdResponseEnableDryRun ¶ added in v0.2.38
type OkModelingCmdResponseEnableDryRun 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"`
}
OkModelingCmdResponseEnableDryRun is the type definition for a OkModelingCmdResponseEnableDryRun.
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 OkModelingCmdResponseEntityFade ¶ added in v0.2.38
type OkModelingCmdResponseEntityFade struct {
// Data: The response from the `HighlightSetEntity` command.
Data HighlightSetEntity `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: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
Data Solid3DGetExtrusionFaceInfo `json:"data" yaml:"data" schema:"data,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
OkModelingCmdResponseEntityGetAllChildUuids is the type definition for a OkModelingCmdResponseEntityGetAllChildUuids.
type OkModelingCmdResponseEntityGetChildUuid ¶ added in v0.2.22
type OkModelingCmdResponseEntityGetChildUuid 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"`
}
OkModelingCmdResponseEntityGetChildUuid is the type definition for a OkModelingCmdResponseEntityGetChildUuid.
type OkModelingCmdResponseEntityGetNumChildren ¶ added in v0.2.22
type OkModelingCmdResponseEntityGetNumChildren struct {
// Data: The response from the `EntityMirrorAcrossEdge` endpoint.
Data EntityMirrorAcrossEdge `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 `EntityMakeHelixFromParams` endpoint.
Data EntityMakeHelixFromParams `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 OkModelingCmdResponseEntityGetSketchPaths ¶ added in v0.2.34
type OkModelingCmdResponseEntityGetSketchPaths struct {
// Data: Struct to contain the edge information of a wall of an extrude/rotate/loft/sweep.
Data ComplementaryEdges `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 `Export` endpoint.
Data Export `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 response from the `EntitiesGetDistance` command.
Data EntityGetDistance `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 `CameraDragStart` endpoint.
Data CameraDragStart `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 `CurveGetControlPoints` command.
Data CurveGetControlPoints `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 `GetEntityType` command.
Data GetEntityType `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 `Solid3dGetPrevAdjacentEdge` command.
Data Solid3DGetPrevAdjacentEdge `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 `DisableDryRun` endpoint.
Data DisableDryRun `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 `EntityLinearPatternTransform` command.
Data EntityLinearPatternTransform `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 'SetGridReferencePlane'.
Data SetGridReferencePlane `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 `Solid3dGetOppositeEdge` command.
Data Solid3DGetOppositeEdge `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 `EntityGetNumChildren` command.
Data EntityGetNumChildren `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 `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"`
}
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 `EnableSketchMode` endpoint.
Data EnableSketchMode `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 `RemoveSceneObjects` endpoint.
Data RemoveSceneObjects `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 `SetSceneUnits` endpoint.
Data SetSceneUnits `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 OkModelingCmdResponseObjectVisible ¶ added in v0.2.38
type OkModelingCmdResponseObjectVisible 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"`
}
OkModelingCmdResponseObjectVisible is the type definition for a OkModelingCmdResponseObjectVisible.
type OkModelingCmdResponseOkModelingCmdResponseData ¶ added in v0.2.27
type OkModelingCmdResponseOkModelingCmdResponseData struct {
// Data: The response from the 'SetGridScale'.
Data SetGridAutoScale `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 `EntityGetAllChildUuids` command.
Data EntityGetAllChildUuids `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 OkModelingCmdResponseReconfigureStream ¶ added in v0.2.38
type OkModelingCmdResponseReconfigureStream 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"`
}
OkModelingCmdResponseReconfigureStream is the type definition for a OkModelingCmdResponseReconfigureStream.
type OkModelingCmdResponseRemoveSceneObjects ¶ added in v0.2.38
type OkModelingCmdResponseRemoveSceneObjects 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"`
}
OkModelingCmdResponseRemoveSceneObjects is the type definition for a OkModelingCmdResponseRemoveSceneObjects.
type OkModelingCmdResponseRevolve ¶ added in v0.2.38
type OkModelingCmdResponseRevolve 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"`
}
OkModelingCmdResponseRevolve is the type definition for a OkModelingCmdResponseRevolve.
type OkModelingCmdResponseRevolveAboutEdge ¶ added in v0.2.38
type OkModelingCmdResponseRevolveAboutEdge 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"`
}
OkModelingCmdResponseRevolveAboutEdge is the type definition for a OkModelingCmdResponseRevolveAboutEdge.
type OkModelingCmdResponseSceneClearAll ¶ added in v0.2.38
type OkModelingCmdResponseSceneClearAll 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"`
}
OkModelingCmdResponseSceneClearAll is the type definition for a OkModelingCmdResponseSceneClearAll.
type OkModelingCmdResponseSelectAdd ¶ added in v0.2.38
type OkModelingCmdResponseSelectAdd 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"`
}
OkModelingCmdResponseSelectAdd is the type definition for a OkModelingCmdResponseSelectAdd.
type OkModelingCmdResponseSelectClear ¶ added in v0.2.38
type OkModelingCmdResponseSelectClear struct {
// Data: The mass response.
Data Mass `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 OkModelingCmdResponseSelectRemove ¶ added in v0.2.38
type OkModelingCmdResponseSelectRemove 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"`
}
OkModelingCmdResponseSelectRemove is the type definition for a OkModelingCmdResponseSelectRemove.
type OkModelingCmdResponseSelectReplace ¶ added in v0.2.38
type OkModelingCmdResponseSelectReplace 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"`
}
OkModelingCmdResponseSelectReplace is the type definition for a OkModelingCmdResponseSelectReplace.
type OkModelingCmdResponseSelectWithPoint ¶ added in v0.2.22
type OkModelingCmdResponseSelectWithPoint 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"`
}
OkModelingCmdResponseSelectWithPoint is the type definition for a OkModelingCmdResponseSelectWithPoint.
type OkModelingCmdResponseSendObject ¶ added in v0.2.38
type OkModelingCmdResponseSendObject struct {
// Data: The response from the `Export2d` endpoint.
Data Export2D `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 `PathGetInfo` command.
Data PathGetInfo `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 `PathGetVertexUuids` command.
Data PathGetVertexUuids `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 `PathGetCurveUuidsForVertices` command.
Data PathGetCurveUuidsForVertices `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 `Loft` command.
Data Loft `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 `DefaultCameraGetSettings` command.
Data DefaultCameraGetSettings `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 `SetSelectionFilter` endpoint.
Data SetSelectionFilter `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 OkModelingCmdResponseSolid3DcutEdges ¶ added in v0.2.42
type OkModelingCmdResponseSolid3DcutEdges 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"`
}
OkModelingCmdResponseSolid3DcutEdges is the type definition for a OkModelingCmdResponseSolid3DcutEdges.
type OkModelingCmdResponseSolid3DfilletEdge ¶ added in v0.2.38
type OkModelingCmdResponseSolid3DfilletEdge 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"`
}
OkModelingCmdResponseSolid3DfilletEdge is the type definition for a OkModelingCmdResponseSolid3DfilletEdge.
type OkModelingCmdResponseSolid3DshellFace ¶ added in v0.2.38
type OkModelingCmdResponseSolid3DshellFace 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"`
}
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 OkModelingCmdResponseSweep ¶ added in v0.2.40
type OkModelingCmdResponseSweep 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"`
}
OkModelingCmdResponseSweep is the type definition for a OkModelingCmdResponseSweep.
type OkModelingCmdResponseTwistExtrude ¶ added in v0.2.42
type OkModelingCmdResponseTwistExtrude 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"`
}
OkModelingCmdResponseTwistExtrude is the type definition for a OkModelingCmdResponseTwistExtrude.
type OkModelingCmdResponseUpdateAnnotation ¶ added in v0.2.38
type OkModelingCmdResponseUpdateAnnotation 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"`
}
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 Data `json:"data" yaml:"data" schema:"data,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
OkWebSocketResponseDataOkWebSocketResponseDataData: Pong response to a Ping message.
type OkWebSocketResponseDataSdpAnswer ¶ added in v0.2.28
type OkWebSocketResponseDataSdpAnswer struct {
// Data:
Data Data `json:"data" yaml:"data" schema:"data,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
OkWebSocketResponseDataSdpAnswer: 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 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 OrgAddress ¶ added in v0.2.42
type OrgAddress 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"`
// CreatedAt: The time and date the address was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// ID: The unique identifier of the address.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// OrgID: The org ID that this address belongs to.
OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id,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"`
// UpdatedAt: The time and date the address was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// Zip: The zip component.
Zip string `json:"zip" yaml:"zip" schema:"zip"`
}
OrgAddress: An address for an organization.
type OrgAdminDetails ¶ added in v0.2.42
type OrgAdminDetails struct {
// Address: Latest billing address stored for the organization.
Address OrgAddress `json:"address" yaml:"address" schema:"address"`
// AddressSummary: Readable billing address summary.
AddressSummary string `json:"address_summary" yaml:"address_summary" schema:"address_summary"`
// Block: Block reason when the org is blocked.
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"`
// PaymentMethods: Known payment methods on file.
PaymentMethods []PaymentMethod `json:"payment_methods" yaml:"payment_methods" schema:"payment_methods,required"`
// PaymentMethodsSummary: Summaries of the known payment methods.
PaymentMethodsSummary []string `json:"payment_methods_summary" yaml:"payment_methods_summary" schema:"payment_methods_summary,required"`
// StripeCustomerID: Stripe customer identifier if one exists.
StripeCustomerID string `json:"stripe_customer_id" yaml:"stripe_customer_id" schema:"stripe_customer_id"`
// StripeDashboardUrl: Direct link to the Stripe customer dashboard.
StripeDashboardUrl string `json:"stripe_dashboard_url" yaml:"stripe_dashboard_url" schema:"stripe_dashboard_url"`
}
OrgAdminDetails: Extra admin-only details for 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"`
// 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"`
// 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"`
// 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 OrgDatasetFileConversion ¶ added in v0.2.42
type OrgDatasetFileConversion 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 converted again can be reused when creating new custom ML models.
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 the file was processed with. If conversion failed due to an internal error, then it will be retried on converter version change.
ImporterVersion string `json:"importer_version" yaml:"importer_version" schema:"importer_version"`
// OutputPath: Path where the processed file output is stored, when available.
OutputPath string `json:"output_path" yaml:"output_path" schema:"output_path"`
// 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"`
}
OrgDatasetFileConversion: Tracks state of `OrgDataset` file conversions.
type OrgDatasetFileConversionDetails ¶ added in v0.2.42
type OrgDatasetFileConversionDetails struct {
// Conversion: Conversion metadata without storage pointers.
Conversion OrgDatasetFileConversionSummary `json:"conversion" yaml:"conversion" schema:"conversion,required"`
// Output: Plain-text contents of the converted artifact.
Output string `json:"output" yaml:"output" schema:"output,required"`
}
OrgDatasetFileConversionDetails: Detailed response that bundles conversion metadata with the converted file contents.
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" // 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"`
// 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 OrgDatasetSource ¶ added in v0.2.42
type OrgDatasetSource struct {
// AccessRoleArn: Identity we assume when accessing the dataset. 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,required"`
// Provider: Storage provider identifier.
Provider StorageProvider `json:"provider" yaml:"provider" schema:"provider,required"`
// Uri: Fully-qualified URI for the dataset contents.
Uri string `json:"uri" yaml:"uri" schema:"uri,required"`
}
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" // 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 OrgResultsPage ¶ added in v0.2.33
type OrgResultsPage struct {
// Items: list of items on this page of results
Items []Org `json:"items" yaml:"items" schema:"items,required"`
// NextPage: token used to fetch the next page of results (if any)
NextPage string `json:"next_page" yaml:"next_page" schema:"next_page"`
}
OrgResultsPage: A single page of results
type OrgRole ¶ added in v0.2.32
type OrgRole string
OrgRole: The roles in an organization.
const ( // OrgRoleAdmin: Admins can do anything in the org. OrgRoleAdmin OrgRole = "admin" // OrgRoleMember: Members of an org can not modify an org, but they belong in the org. OrgRoleMember OrgRole = "member" // OrgRoleServiceAccount: A service account role. OrgRoleServiceAccount OrgRole = "service_account" )
type OrgService ¶ added in v0.2.32
type OrgService service
OrgService: An organization is a group of users of the Zoo API. Here, we can add users to an org and perform operations on orgs.
func (*OrgService) AdminDetailsList ¶ added in v0.2.42
func (s *OrgService) AdminDetailsList(id UUID) (*OrgAdminDetails, error)
AdminDetailsList: Get admin-only details for an organization. Zoo admins can retrieve extended information about any organization, while non-admins receive a 404 to avoid leaking existence.
Parameters
- `id`: A UUID usually v4 or v7
Example ¶
AdminDetailsList: Get admin-only details for an organization. Zoo admins can retrieve extended information about any organization, while non-admins receive a 404 to avoid leaking existence.
Parameters
- `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.AdminDetailsList(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) Create ¶ added in v0.2.32
func (s *OrgService) Create(body OrgDetails) (*Org, error)
Create: Create an org. This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.
Parameters
- `body`: The user-modifiable parts of an organization.
Example ¶
Create: Create an org. This endpoint requires authentication by a Zoo user that is not already in an org. It creates a new org for the authenticated user and makes them an admin.
Parameters
- `body`: The user-modifiable parts of an organization.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.Create(kittycad.OrgDetails{AllowUsersInDomainToAutoJoin: true, BillingEmail: "[email protected]", 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 S3 dataset that Zoo can assume into on behalf of the caller's org. 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 S3 dataset that Zoo can assume into on behalf of the caller's org. 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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.CreateDataset(kittycad.CreateOrgDataset{Name: "some-string", 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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.CreateMember(kittycad.AddOrgMember{Email: "[email protected]", Role: ""})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) CreateSamlIdp ¶ added in v0.2.33
func (s *OrgService) CreateSamlIdp(body SamlIdentityProviderCreate) (*SamlIdentityProvider, error)
CreateSamlIdp: Create a SAML identity provider. This endpoint requires authentication by an org admin.
Parameters
- `body`: Parameters for creating a SAML identity provider.
Example ¶
CreateSamlIdp: Create a SAML identity provider. This endpoint requires authentication by an org admin.
Parameters
- `body`: Parameters for creating a SAML identity provider.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.CreateSamlIdp(kittycad.SamlIdentityProviderCreate{IdpEntityID: "some-string", IdpMetadataSource: "", SigningKeypair: kittycad.DerEncodedKeyPair{PrivateKey: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}, PublicCert: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}}, TechnicalContactEmail: "[email protected]"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) DatasetS3Policies ¶ added in v0.2.42
func (s *OrgService) DatasetS3Policies(roleArn string, uri string) (*DatasetS3Policies, error)
DatasetS3Policies: Return the IAM policies customers should apply when onboarding an S3 dataset. Parameters
- `roleArn`
- `uri`
Example ¶
DatasetS3Policies: Return the IAM policies customers should apply when onboarding an S3 dataset. Parameters
- `roleArn`
- `uri`
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.
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
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
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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Org.DeleteSamlIdp(); 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.
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) GetAny ¶ added in v0.2.33
func (s *OrgService) GetAny(id UUID) (*Org, error)
GetAny: Get an org. This endpoint requires authentication by a Zoo employee. It gets the information for the specified org.
Parameters
- `id`: A UUID usually v4 or v7
Example ¶
GetAny: Get an org. This endpoint requires authentication by a Zoo employee. It gets the information for the specified org.
Parameters
- `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.GetAny(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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
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(conversionId UUID, id UUID) (*OrgDatasetFileConversionDetails, error)
GetDatasetConversion: Fetch the metadata and converted output for a single dataset conversion. Parameters
- `conversionId`: A UUID usually v4 or v7
- `id`: A UUID usually v4 or v7
Example ¶
GetDatasetConversion: Fetch the metadata and converted output for a single dataset conversion. Parameters
- `conversionId`: A UUID usually v4 or v7
- `id`: A UUID usually v4 or v7
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
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
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.
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.
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 (*OrgService) GetShortlinks ¶ added in v0.2.38
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.
Example ¶
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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.GetShortlinks(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) GetUser ¶ added in v0.2.32
func (s *OrgService) GetUser() (*UserOrgInfo, error)
GetUser: Get a user's org. This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.
If the user is not a member of an org, this endpoint will return a 404.
Example ¶
GetUser: Get a user's org. This endpoint requires authentication by any Zoo user. It gets the authenticated user's org.
If the user is not a member of an org, this endpoint will return a 404.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.GetUser()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) List ¶ added in v0.2.33
func (s *OrgService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*OrgResultsPage, error)
List: List orgs. This endpoint requires authentication by a Zoo employee. The orgs are returned in order of creation, with the most recently created orgs first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
List: List orgs. This endpoint requires authentication by a Zoo employee. The orgs are returned in order of creation, with the most recently created orgs first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.List(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) ListDatasetConversions ¶ added in v0.2.42
func (s *OrgService) ListDatasetConversions(id UUID, limit int, pageToken string, sortBy ConversionSortMode) (*OrgDatasetFileConversionSummaryResultsPage, error)
ListDatasetConversions: List the file conversions that have been processed for a given dataset owned by the caller's org. Parameters
- `id`: A UUID usually v4 or v7
- `limit`
- `pageToken`
- `sortBy`: Supported sort modes for org dataset conversions.
Example ¶
ListDatasetConversions: List the file conversions that have been processed for a given dataset owned by the caller's org. Parameters
- `id`: A UUID usually v4 or v7
- `limit`
- `pageToken`
- `sortBy`: Supported sort modes for org dataset conversions.
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", "")
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, sortBy CreatedAtSortMode) (*OrgDatasetResultsPage, error)
ListDatasets: List every dataset that belongs to the caller's organization. Parameters
`limit`
`pageToken`
`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`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.ListDatasets(123, "some-string", "")
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.
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) RescanDataset ¶ added in v0.2.42
func (s *OrgService) RescanDataset(id UUID) (*OrgDataset, error)
RescanDataset: Request a rescan of a dataset that belongs to the caller's org. Parameters
- `id`: A UUID usually v4 or v7
Example ¶
RescanDataset: Request a rescan of a dataset that belongs to the caller's org. Parameters
- `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.RescanDataset(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*OrgService) RetryDatasetConversion ¶ added in v0.2.42
func (s *OrgService) RetryDatasetConversion(conversionId UUID, id UUID) (*OrgDatasetFileConversion, error)
RetryDatasetConversion: Retry a specific dataset conversion that failed previously for the caller's org. Parameters
- `conversionId`: A UUID usually v4 or v7
- `id`: A UUID usually v4 or v7
Example ¶
RetryDatasetConversion: Retry a specific dataset conversion that failed previously for the caller's org. Parameters
- `conversionId`: A UUID usually v4 or v7
- `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.RetryDatasetConversion(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) Update ¶ added in v0.2.32
func (s *OrgService) Update(body OrgDetails) (*Org, error)
Update: Update an org. This endpoint requires authentication by an org admin. It updates the authenticated user's org.
Parameters
- `body`: The user-modifiable parts of an organization.
Example ¶
Update: Update an org. This endpoint requires authentication by an org admin. It updates the authenticated user's org.
Parameters
- `body`: The user-modifiable parts of an organization.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.Update(kittycad.OrgDetails{AllowUsersInDomainToAutoJoin: true, BillingEmail: "[email protected]", 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.
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{Name: "some-string", 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.
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.
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
func (s *OrgService) UpdateSamlIdp(body SamlIdentityProviderCreate) (*SamlIdentityProvider, error)
UpdateSamlIdp: Update the SAML identity provider. This endpoint requires authentication by an org admin.
Parameters
- `body`: Parameters for creating a SAML identity provider.
Example ¶
UpdateSamlIdp: Update the SAML identity provider. This endpoint requires authentication by an org admin.
Parameters
- `body`: Parameters for creating a SAML identity provider.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Org.UpdateSamlIdp(kittycad.SamlIdentityProviderCreate{IdpEntityID: "some-string", IdpMetadataSource: "", SigningKeypair: kittycad.DerEncodedKeyPair{PrivateKey: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}, PublicCert: kittycad.Base64{Inner: []byte("aGVsbG8gd29ybGQK")}}, TechnicalContactEmail: "[email protected]"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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 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).
type OriginTypeLocal ¶ added in v0.2.38
type OriginTypeLocal struct {
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
OriginTypeLocal: Local Origin (center of object bounding box).
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).
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,required"`
// 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 OutputFormat3Dgltf ¶ added in v0.2.40
type OutputFormat3Dgltf 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"`
}
OutputFormat3Dgltf: *ST**ereo**L**ithography 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,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"`
}
OutputFormat3Dpresentation: The PLY Polygon File 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"`
// Created: Timestamp override.
Created Time `json:"created" yaml:"created" schema:"created"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
OutputFormat3Dstorage: ISO 10303-21 (STEP) 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 PaymentMethodType ¶ added in v0.1.4
type PaymentMethodType string
PaymentMethodType: An enum representing the possible values of an `PaymentMethod`'s `type` field.
const ( // PaymentMethodTypeCard: A card payment method. PaymentMethodTypeCard PaymentMethodType = "card" )
type PaymentService ¶ added in v0.1.4
type PaymentService service
PaymentService: Operations around payments and billing.
func (*PaymentService) CreateInformationForOrg ¶ added in v0.2.32
func (s *PaymentService) CreateInformationForOrg(body BillingInfo) (*Customer, error)
CreateInformationForOrg: Create payment info for your org. This includes billing address, phone, and name.
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.
Parameters
- `body`: The billing information for payments.
Example ¶
CreateInformationForOrg: Create payment info for your org. This includes billing address, phone, and name.
This endpoint requires authentication by the org admin. It creates the payment information for the authenticated user's org.
Parameters
- `body`: The billing information for payments.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.CreateInformationForOrg(kittycad.BillingInfo{Address: kittycad.AddressDetails{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) CreateInformationForUser ¶ added in v0.1.4
func (s *PaymentService) CreateInformationForUser(body BillingInfo) (*Customer, error)
CreateInformationForUser: Create payment info for your user. This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.
Parameters
- `body`: The billing information for payments.
Example ¶
CreateInformationForUser: Create payment info for your user. This includes billing address, phone, and name.
This endpoint requires authentication by any Zoo user. It creates the payment information for the authenticated user.
Parameters
- `body`: The billing information for payments.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.CreateInformationForUser(kittycad.BillingInfo{Address: kittycad.AddressDetails{City: "some-string", Country: "some-string", State: "some-string", Street1: "some-string", Street2: "some-string", Zip: "some-string"}, Name: "some-string", Phone: "+1-555-555-555"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) CreateIntentForOrg ¶ added in v0.2.32
func (s *PaymentService) CreateIntentForOrg() (*PaymentIntent, error)
CreateIntentForOrg: Create a payment intent for your org. This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.
Example ¶
CreateIntentForOrg: Create a payment intent for your org. This endpoint requires authentication by the org admin. It creates a new payment intent for the authenticated user's org's org.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.CreateIntentForOrg()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) CreateIntentForUser ¶ added in v0.1.4
func (s *PaymentService) CreateIntentForUser() (*PaymentIntent, error)
CreateIntentForUser: Create a payment intent for your user. This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.
Example ¶
CreateIntentForUser: Create a payment intent for your user. This endpoint requires authentication by any Zoo user. It creates a new payment intent for the authenticated user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.CreateIntentForUser()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) CreateOrgSubscription ¶ added in v0.2.33
func (s *PaymentService) CreateOrgSubscription(body ZooProductSubscriptionsOrgRequest) (*ZooProductSubscriptions, error)
CreateOrgSubscription: Create the subscription for an org. This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.
Parameters
- `body`: A struct of Zoo product subscriptions an organization can request.
Example ¶
CreateOrgSubscription: Create the subscription for an org. This endpoint requires authentication by an org admin. It creates the subscription for the authenticated user's org.
Parameters
- `body`: A struct of Zoo product subscriptions an organization can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.CreateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: "some-string", PayAnnually: true})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) CreateUserSubscription ¶ added in v0.2.33
func (s *PaymentService) CreateUserSubscription(body ZooProductSubscriptionsUserRequest) (*ZooProductSubscriptions, error)
CreateUserSubscription: Create the subscription for a user. This endpoint requires authentication by any Zoo user. It creates the subscription for the user.
Parameters
- `body`: A struct of Zoo product subscriptions a user can request.
Example ¶
CreateUserSubscription: Create the subscription for a user. This endpoint requires authentication by any Zoo user. It creates the subscription for the user.
Parameters
- `body`: A struct of Zoo product subscriptions a user can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.CreateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: "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.
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.
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`
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, force bool) 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`
- `force`
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`
- `force`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.Payment.DeleteMethodForUser("some-string", true); err != nil {
panic(err)
}
func (*PaymentService) GetBalanceForAnyOrg ¶ added in v0.2.33
func (s *PaymentService) GetBalanceForAnyOrg(includeTotalDue bool, id UUID) (*CustomerBalance, error)
GetBalanceForAnyOrg: Get balance for an org. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.
Parameters
- `includeTotalDue`
- `id`: A UUID usually v4 or v7
Example ¶
GetBalanceForAnyOrg: Get balance for an org. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified org.
Parameters
- `includeTotalDue`
- `id`: A UUID usually v4 or v7
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.GetBalanceForAnyOrg(true, kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"))
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) GetBalanceForAnyUser ¶ added in v0.2.33
func (s *PaymentService) GetBalanceForAnyUser(id string, includeTotalDue bool) (*CustomerBalance, error)
GetBalanceForAnyUser: Get balance for an user. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.
Parameters
- `id`
- `includeTotalDue`
Example ¶
GetBalanceForAnyUser: Get balance for an user. This endpoint requires authentication by a Zoo employee. It gets the balance information for the specified user.
Parameters
- `id`
- `includeTotalDue`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.GetBalanceForAnyUser("some-string", true)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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`
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`
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.
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.
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.
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) GetUserSubscription ¶ added in v0.2.33
func (s *PaymentService) GetUserSubscription() (*ZooProductSubscriptions, error)
GetUserSubscription: Get the subscription for a user. This endpoint requires authentication by any Zoo user. It gets the subscription for the user.
Example ¶
GetUserSubscription: Get the subscription for a user. This endpoint requires authentication by any Zoo user. It gets the subscription for the user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.GetUserSubscription()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) ListInvoicesForOrg ¶ added in v0.2.32
func (s *PaymentService) ListInvoicesForOrg() (*[]Invoice, error)
ListInvoicesForOrg: List invoices for your org. This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.
Example ¶
ListInvoicesForOrg: List invoices for your org. This endpoint requires authentication by an org admin. It lists invoices for the authenticated user's org.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.ListInvoicesForOrg()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) ListInvoicesForUser ¶ added in v0.1.4
func (s *PaymentService) ListInvoicesForUser() (*[]Invoice, error)
ListInvoicesForUser: List invoices for your user. This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.
Example ¶
ListInvoicesForUser: List invoices for your user. This endpoint requires authentication by any Zoo user. It lists invoices for the authenticated user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.ListInvoicesForUser()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) ListMethodsForOrg ¶ added in v0.2.32
func (s *PaymentService) ListMethodsForOrg() (*[]PaymentMethod, error)
ListMethodsForOrg: List payment methods for your org. This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.
Example ¶
ListMethodsForOrg: List payment methods for your org. This endpoint requires authentication by an org admin. It lists payment methods for the authenticated user's org.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.ListMethodsForOrg()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) ListMethodsForUser ¶ added in v0.1.4
func (s *PaymentService) ListMethodsForUser() (*[]PaymentMethod, error)
ListMethodsForUser: List payment methods for your user. This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.
Example ¶
ListMethodsForUser: List payment methods for your user. This endpoint requires authentication by any Zoo user. It lists payment methods for the authenticated user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.ListMethodsForUser()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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`
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) UpdateBalanceForAnyOrg ¶ added in v0.2.33
func (s *PaymentService) UpdateBalanceForAnyOrg(id UUID, includeTotalDue bool, body UpdatePaymentBalance) (*CustomerBalance, error)
UpdateBalanceForAnyOrg: Update balance for an org. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.
Parameters
- `id`: A UUID usually v4 or v7
- `includeTotalDue`
- `body`: Payload for updating a user's balance.
Example ¶
UpdateBalanceForAnyOrg: Update balance for an org. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified org.
Parameters
- `id`: A UUID usually v4 or v7
- `includeTotalDue`
- `body`: Payload for updating a user's balance.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.UpdateBalanceForAnyOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), true, kittycad.UpdatePaymentBalance{MonthlyAPICreditsRemainingMonetaryValue: 123.45, StableAPICreditsRemainingMonetaryValue: 123.45})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) UpdateBalanceForAnyUser ¶ added in v0.2.33
func (s *PaymentService) UpdateBalanceForAnyUser(id string, includeTotalDue bool, body UpdatePaymentBalance) (*CustomerBalance, error)
UpdateBalanceForAnyUser: Update balance for an user. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.
Parameters
- `id`
- `includeTotalDue`
- `body`: Payload for updating a user's balance.
Example ¶
UpdateBalanceForAnyUser: Update balance for an user. This endpoint requires authentication by a Zoo employee. It updates the balance information for the specified user.
Parameters
- `id`
- `includeTotalDue`
- `body`: Payload for updating a user's balance.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.UpdateBalanceForAnyUser("some-string", true, kittycad.UpdatePaymentBalance{MonthlyAPICreditsRemainingMonetaryValue: 123.45, StableAPICreditsRemainingMonetaryValue: 123.45})
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.
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.
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
func (s *PaymentService) UpdateOrgSubscription(body ZooProductSubscriptionsOrgRequest) (*ZooProductSubscriptions, error)
UpdateOrgSubscription: Update the subscription for an org. This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.
Parameters
- `body`: A struct of Zoo product subscriptions an organization can request.
Example ¶
UpdateOrgSubscription: Update the subscription for an org. This endpoint requires authentication by an org admin. It updates the subscription for the authenticated user's org.
Parameters
- `body`: A struct of Zoo product subscriptions an organization can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.UpdateOrgSubscription(kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: "some-string", PayAnnually: true})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) UpdateOrgSubscriptionForAnyOrg ¶ added in v0.2.42
func (s *PaymentService) UpdateOrgSubscriptionForAnyOrg(id UUID, body ZooProductSubscriptionsOrgRequest) (*ZooProductSubscriptions, error)
UpdateOrgSubscriptionForAnyOrg: Update the subscription for any org (admin override). This endpoint requires authentication by a Zoo admin. It updates the subscription for the specified org.
Parameters
- `id`: A UUID usually v4 or v7
- `body`: A struct of Zoo product subscriptions an organization can request.
Example ¶
UpdateOrgSubscriptionForAnyOrg: Update the subscription for any org (admin override). This endpoint requires authentication by a Zoo admin. It updates the subscription for the specified org.
Parameters
- `id`: A UUID usually v4 or v7
- `body`: A struct of Zoo product subscriptions an organization can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.UpdateOrgSubscriptionForAnyOrg(kittycad.ParseUUID("6ba7b810-9dad-11d1-80b4-00c04fd430c8"), kittycad.ZooProductSubscriptionsOrgRequest{ModelingApp: "some-string", PayAnnually: true})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) UpdateUserSubscription ¶ added in v0.2.33
func (s *PaymentService) UpdateUserSubscription(body ZooProductSubscriptionsUserRequest) (*ZooProductSubscriptions, error)
UpdateUserSubscription: Update the user's subscription. This endpoint requires authentication by any Zoo user. It updates the subscription for the user.
Parameters
- `body`: A struct of Zoo product subscriptions a user can request.
Example ¶
UpdateUserSubscription: Update the user's subscription. This endpoint requires authentication by any Zoo user. It updates the subscription for the user.
Parameters
- `body`: A struct of Zoo product subscriptions a user can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.UpdateUserSubscription(kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: "some-string", PayAnnually: true})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*PaymentService) UpsertSubscriptionPlanPrice ¶ added in v0.2.42
func (s *PaymentService) UpsertSubscriptionPlanPrice(slug string, body PriceUpsertRequest) (*SubscriptionPlanPriceRecord, error)
UpsertSubscriptionPlanPrice: Create or update a price for a subscription plan. You must be a Zoo admin to perform this request.
Parameters
- `slug`
- `body`: Create or update a price row for a subscription plan.
Example ¶
UpsertSubscriptionPlanPrice: Create or update a price for a subscription plan. You must be a Zoo admin to perform this request.
Parameters
- `slug`
- `body`: Create or update a price row for a subscription plan.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Payment.UpsertSubscriptionPlanPrice("some-string", kittycad.PriceUpsertRequest{Active: true, BillingModel: "", Cadence: "", UnitAmount: 123.45})
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.
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.
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 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 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 PriceUpsertRequest ¶ added in v0.2.42
type PriceUpsertRequest struct {
// Active: Whether the price should be active.
Active bool `json:"active" yaml:"active" schema:"active"`
// BillingModel: Billing model (flat or per-user).
BillingModel SubscriptionPlanBillingModel `json:"billing_model" yaml:"billing_model" schema:"billing_model,required"`
// Cadence: Cadence for billing (day, week, month, year).
Cadence PlanInterval `json:"cadence" yaml:"cadence" schema:"cadence,required"`
// UnitAmount: Amount in USD.
UnitAmount float64 `json:"unit_amount" yaml:"unit_amount" schema:"unit_amount,required"`
}
PriceUpsertRequest: Create or update a price row for a subscription plan.
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 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 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 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 RawFile ¶ added in v0.2.23
type RawFile struct {
// Contents: The contents of the file.
Contents []int `json:"contents" yaml:"contents" schema:"contents,required"`
// Name: The name of the file.
Name string `json:"name" yaml:"name" schema:"name,required"`
}
RawFile: A raw file with unencoded contents to be passed over binary websockets. When raw files come back for exports it is sent as binary/bson, not text/json.
type ReasoningMessage ¶ added in v0.2.42
type ReasoningMessage any
ReasoningMessage: ReasoningMessage: A message containing reasoning information.
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 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 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 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 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 {
}
Revolve: The response from the `Revolve` endpoint.
type RevolveAboutEdge ¶ added in v0.2.38
type RevolveAboutEdge struct {
}
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 SamlIdentityProvider ¶ added in v0.2.33
type SamlIdentityProvider struct {
// AcsUrl: The ACS (Assertion Consumer Service) URL.
AcsUrl URL `json:"acs_url" yaml:"acs_url" schema:"acs_url,required"`
// CreatedAt: The date and time the SAML identity provider was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// ID: The unique identifier for the SAML identity provider.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// IdpEntityID: The entity ID of the SAML identity provider.
IdpEntityID string `json:"idp_entity_id" yaml:"idp_entity_id" schema:"idp_entity_id"`
// IdpMetadataDocumentString: The metadata document as a string.
IdpMetadataDocumentString string `json:"idp_metadata_document_string" yaml:"idp_metadata_document_string" schema:"idp_metadata_document_string"`
// OrgID: The organization ID the SAML identity provider belongs to.
OrgID UUID `json:"org_id" yaml:"org_id" schema:"org_id,required"`
// PrivateKey: The private key for the SAML identity provider. This is the PEM corresponding to the X509 pair.
PrivateKey Base64 `json:"private_key" yaml:"private_key" schema:"private_key"`
// PublicCert: The public certificate for the SAML identity provider. This is the PEM corresponding to the X509 pair.
PublicCert Base64 `json:"public_cert" yaml:"public_cert" schema:"public_cert"`
// SloUrl: The SLO (Single Logout) URL.
SloUrl URL `json:"slo_url" yaml:"slo_url" schema:"slo_url,required"`
// TechnicalContactEmail: The technical contact email address for the SAML identity provider.
TechnicalContactEmail string `json:"technical_contact_email" yaml:"technical_contact_email" schema:"technical_contact_email"`
// UpdatedAt: The date and time the SAML identity provider was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}
SamlIdentityProvider: A SAML identity provider.
type SamlIdentityProviderCreate ¶ added in v0.2.33
type SamlIdentityProviderCreate struct {
// IdpEntityID: The entity ID of the SAML identity provider.
IdpEntityID string `json:"idp_entity_id" yaml:"idp_entity_id" schema:"idp_entity_id"`
// IdpMetadataSource: The source of an identity provider metadata descriptor.
IdpMetadataSource any `json:"idp_metadata_source" yaml:"idp_metadata_source" schema:"idp_metadata_source,required"`
// SigningKeypair: The request signing key pair.
SigningKeypair DerEncodedKeyPair `json:"signing_keypair" yaml:"signing_keypair" schema:"signing_keypair"`
// TechnicalContactEmail: The technical contact email address for the SAML identity provider.
TechnicalContactEmail string `json:"technical_contact_email" yaml:"technical_contact_email" schema:"technical_contact_email"`
}
SamlIdentityProviderCreate: Parameters for creating a SAML identity provider.
type 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 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 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 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 admin. It creates a new service account for the organization.
Parameters
- `label`
Example ¶
CreateForOrg: Create a new service account for your org. This endpoint requires authentication by an org admin. It creates a new service account for the organization.
Parameters
- `label`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.ServiceAccount.CreateForOrg("some-string")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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 admin. It deletes the requested service account for the organization.
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.
Parameters
- `token`: An auth token. A uuid with a prefix of svc-
Example ¶
DeleteForOrg: Delete an service account for your org. This endpoint requires authentication by an org admin. It deletes the requested service account for the organization.
This endpoint does not actually delete the service account from the database. It merely marks the token as invalid. We still want to keep the service account in the database for historical purposes.
Parameters
- `token`: An auth token. A uuid with a prefix of svc-
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 admin. 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 admin. It returns details of the requested service account for the organization.
Parameters
- `token`: An auth token. A uuid with a prefix of svc-
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 admin. It returns the service accounts for the organization.
The service accounts are returned in order of creation, with the most recently created service accounts first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
ListForOrg: List service accounts for your org. This endpoint requires authentication by an org admin. It returns the service accounts for the organization.
The service accounts are returned in order of creation, with the most recently created service accounts first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.ServiceAccount.ListForOrg(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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 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 ¶ added in v0.2.38
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 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 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 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 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 Solid3DGetExtrusionFaceInfo ¶ added in v0.2.33
type Solid3DGetExtrusionFaceInfo struct {
// Faces: Details of each face.
Faces []ExtrusionFaceInfo `json:"faces" yaml:"faces" schema:"faces,required"`
}
Solid3DGetExtrusionFaceInfo: Extrusion face info struct (useful for maintaining mappings between source path segment ids and extrusion faces)
type Solid3DGetNextAdjacentEdge ¶ added in v0.2.27
type Solid3DGetNextAdjacentEdge struct {
// Edge: The UUID of the edge.
Edge UUID `json:"edge" yaml:"edge" schema:"edge"`
}
Solid3DGetNextAdjacentEdge: The response from the `Solid3dGetNextAdjacentEdge` command.
type Solid3DGetOppositeEdge ¶ added in v0.2.27
type Solid3DGetOppositeEdge struct {
// Edge: The UUID of the edge.
Edge UUID `json:"edge" yaml:"edge" schema:"edge,required"`
}
Solid3DGetOppositeEdge: The response from the `Solid3dGetOppositeEdge` command.
type Solid3DGetPrevAdjacentEdge ¶ added in v0.2.27
type Solid3DGetPrevAdjacentEdge struct {
// Edge: The UUID of the edge.
Edge UUID `json:"edge" yaml:"edge" schema:"edge"`
}
Solid3DGetPrevAdjacentEdge: The response from the `Solid3dGetPrevAdjacentEdge` command.
type 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 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" )
type StoreCouponParams ¶ added in v0.2.33
type StoreCouponParams struct {
// PercentOff: The percentage off.
PercentOff int `json:"percent_off" yaml:"percent_off" schema:"percent_off,required"`
}
StoreCouponParams: The parameters for a new store coupon.
type StoreService ¶ added in v0.2.33
type StoreService service
StoreService: Operations involving our swag store.
func (*StoreService) CreateCoupon ¶ added in v0.2.33
func (s *StoreService) CreateCoupon(body StoreCouponParams) (*DiscountCode, error)
CreateCoupon: Create a new store coupon. This endpoint requires authentication by a Zoo employee. It creates a new store coupon.
Parameters
- `body`: The parameters for a new store coupon.
Example ¶
CreateCoupon: Create a new store coupon. This endpoint requires authentication by a Zoo employee. It creates a new store coupon.
Parameters
- `body`: The parameters for a new store coupon.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Store.CreateCoupon(kittycad.StoreCouponParams{PercentOff: 123})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
type Subscribe ¶ added in v0.2.41
type Subscribe struct {
// Email: The email
Email string `json:"email" yaml:"email" schema:"email,required"`
}
Subscribe: The data for subscribing a user to the newsletter.
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 SubscriptionPlanBillingModel ¶ added in v0.2.42
type SubscriptionPlanBillingModel string
SubscriptionPlanBillingModel: Billing model for a modeling-app plan price.
const ( // SubscriptionPlanBillingModelFlat: A flat amount charged every interval. SubscriptionPlanBillingModelFlat SubscriptionPlanBillingModel = "flat" // SubscriptionPlanBillingModelPerUser: A per-seat amount charged every interval. SubscriptionPlanBillingModelPerUser SubscriptionPlanBillingModel = "per_user" )
type SubscriptionPlanPriceRecord ¶ added in v0.2.42
type SubscriptionPlanPriceRecord struct {
// Active: Whether this price is currently active.
Active bool `json:"active" yaml:"active" schema:"active,required"`
// BillingModel: Billing model persisted in the database (`flat`, `per_user`, or `enterprise`).
BillingModel SubscriptionPlanBillingModel `json:"billing_model" yaml:"billing_model" schema:"billing_model,required"`
// Cadence: Billing cadence string (for example `month` or `year`).
Cadence PlanInterval `json:"cadence" yaml:"cadence" schema:"cadence,required"`
// CreatedAt: Timestamp when the price row was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// ID: Unique identifier for the plan price entry.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// StripePriceID: Stripe price identifier, when synchronized.
StripePriceID string `json:"stripe_price_id" yaml:"stripe_price_id" schema:"stripe_price_id"`
// SubscriptionPlanID: Foreign key referencing the parent plan.
SubscriptionPlanID UUID `json:"subscription_plan_id" yaml:"subscription_plan_id" schema:"subscription_plan_id,required"`
// UnitAmount: Optional monetary amount associated with the price row.
UnitAmount string `json:"unit_amount" yaml:"unit_amount" schema:"unit_amount"`
// UpdatedAt: Timestamp when the price row was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
}
SubscriptionPlanPriceRecord: Diesel model representing a row in `subscription_plan_prices`.
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: Enterprise: The price is not listed and the user needs to contact sales.
type SubscriptionTierPriceInterval ¶ added in v0.2.33
type SubscriptionTierPriceInterval struct {
// Interval: The interval the price is charged.
Interval PlanInterval `json:"interval" yaml:"interval" schema:"interval,required"`
// Price: The price.
Price float64 `json:"price" yaml:"price" schema:"price,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
SubscriptionTierPriceInterval: A flat price that we publicly list.
type SubscriptionTierPricePrice ¶ added in v0.2.33
type SubscriptionTierPricePrice struct {
// Interval: The interval the price is charged.
Interval PlanInterval `json:"interval" yaml:"interval" schema:"interval,required"`
// Price: The price.
Price float64 `json:"price" yaml:"price" schema:"price,required"`
// Type:
Type string `json:"type" yaml:"type" schema:"type,required"`
}
SubscriptionTierPricePrice: A per user price that we publicly list.
type 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 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 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.
type TakeSnapshot ¶ added in v0.2.27
type TakeSnapshot struct {
// Contents: Contents of the image.
Contents Base64 `json:"contents" yaml:"contents" schema:"contents,required"`
}
TakeSnapshot: The response from the `TakeSnapshot` command.
type TextToCad ¶ added in v0.2.29
type TextToCad struct {
// 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"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
TextToCad: A response from a text to CAD prompt.
type TextToCadCreateBody ¶ added in v0.2.29
type TextToCadCreateBody struct {
// 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"`
// 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"`
// 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 desired part.
Prompt string `json:"prompt" yaml:"prompt" schema:"prompt,required"`
}
TextToCadCreateBody: Body for generating parts from text.
type TextToCadIteration ¶ added in v0.2.37
type TextToCadIteration 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"`
// 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"`
}
TextToCadIteration: A response from a text to CAD iteration.
type TextToCadIterationBody ¶ added in v0.2.37
type TextToCadIterationBody struct {
// 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"`
// OriginalSourceCode: The source code for the model (in kcl) that is to be edited.
OriginalSourceCode string `json:"original_source_code" yaml:"original_source_code" schema:"original_source_code,required"`
// 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 model, if not using source ranges.
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,required"`
}
TextToCadIterationBody: Body for generating parts from text.
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 TextToCadMultiFileIteration ¶ added in v0.2.40
type TextToCadMultiFileIteration 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"`
// 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"`
}
TextToCadMultiFileIteration: A response from a text to CAD multi-file 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
Time is a wrapper around time.Time which marshals to and from empty strings.
func (Time) MarshalJSON ¶ added in v0.2.4
MarshalJSON implements the json.Marshaler interface.
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 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 {
// IsLocal: If true, the transform is applied in local space. If false, the transform is applied in global space.
//
// Deprecated: IsLocal is deprecated.
IsLocal bool `json:"is_local" yaml:"is_local" schema:"is_local,required"`
// Origin: What to use as the origin for the transformation. If not provided, will fall back to local or global origin, depending on whatever the `is_local` field was set to.
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 {
// IsLocal: If true, the transform is applied in local space. If false, the transform is applied in global space.
//
// Deprecated: IsLocal is deprecated.
IsLocal bool `json:"is_local" yaml:"is_local" schema:"is_local,required"`
// Origin: What to use as the origin for the transformation. If not provided, will fall back to local or global origin, depending on whatever the `is_local` field was set to.
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 {
}
TwistExtrude: The response from the `TwistExtrude` endpoint.
type URL ¶ added in v0.2.4
URL is a wrapper around url.URL which marshals to and from empty strings.
func (URL) MarshalJSON ¶ added in v0.2.4
MarshalJSON implements the json.Marshaler interface.
type UUID ¶ added in v0.2.4
UUID is a wrapper around uuid.UUID which marshals to and from empty strings.
func (UUID) MarshalJSON ¶ added in v0.2.4
MarshalJSON implements the json.Marshaler interface.
type UnitAngle ¶ added in v0.2.17
type UnitAngle string
UnitAngle: The valid types of angle formats.
const ( // UnitAngleDegrees: Degrees <https://en.wikipedia.org/wiki/Degree_(angle)> UnitAngleDegrees UnitAngle = "degrees" // UnitAngleRadians: Radians <https://en.wikipedia.org/wiki/Radian> UnitAngleRadians UnitAngle = "radians" )
type UnitAngleConversion ¶ added in v0.2.5
type UnitAngleConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitAngle `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitAngle `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitAngleConversion: Result of converting between units.
type UnitArea ¶ added in v0.2.17
type UnitArea string
UnitArea: The valid types of area units.
const ( // UnitAreaCm2: Square centimeters <https://en.wikipedia.org/wiki/Square_centimeter> UnitAreaCm2 UnitArea = "cm2" // UnitAreaDm2: Square decimeters <https://en.wikipedia.org/wiki/Square_decimeter> UnitAreaDm2 UnitArea = "dm2" // UnitAreaFt2: Square feet <https://en.wikipedia.org/wiki/Square_foot> UnitAreaFt2 UnitArea = "ft2" // UnitAreaIn2: Square inches <https://en.wikipedia.org/wiki/Square_inch> UnitAreaIn2 UnitArea = "in2" // UnitAreaKm2: Square kilometers <https://en.wikipedia.org/wiki/Square_kilometer> UnitAreaKm2 UnitArea = "km2" // UnitAreaM2: Square meters <https://en.wikipedia.org/wiki/Square_meter> UnitAreaM2 UnitArea = "m2" // UnitAreaMm2: Square millimeters <https://en.wikipedia.org/wiki/Square_millimeter> UnitAreaMm2 UnitArea = "mm2" // UnitAreaYd2: Square yards <https://en.wikipedia.org/wiki/Square_mile> UnitAreaYd2 UnitArea = "yd2" )
type UnitAreaConversion ¶ added in v0.2.5
type UnitAreaConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitArea `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitArea `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitAreaConversion: Result of converting between units.
type UnitCurrent ¶ added in v0.2.17
type UnitCurrent string
UnitCurrent: The valid types of current units.
const ( // UnitCurrentAmperes: Amperes <https://en.wikipedia.org/wiki/Ampere> UnitCurrentAmperes UnitCurrent = "amperes" // UnitCurrentMicroamperes: Microamperes <https://en.wikipedia.org/wiki/Microampere> UnitCurrentMicroamperes UnitCurrent = "microamperes" // UnitCurrentMilliamperes: Milliamperes <https://en.wikipedia.org/wiki/Milliampere> UnitCurrentMilliamperes UnitCurrent = "milliamperes" // UnitCurrentNanoamperes: Nanoamperes <https://en.wikipedia.org/wiki/Nanoampere> UnitCurrentNanoamperes UnitCurrent = "nanoamperes" )
type UnitCurrentConversion ¶ added in v0.2.17
type UnitCurrentConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitCurrent `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitCurrent `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitCurrentConversion: Result of converting between units.
type UnitDensity ¶ added in v0.2.19
type UnitDensity string
UnitDensity: The valid types for density units.
const ( // UnitDensityLbft3: Pounds per cubic feet. UnitDensityLbft3 UnitDensity = "lb:ft3" // UnitDensityKgm3: Kilograms per cubic meter. UnitDensityKgm3 UnitDensity = "kg:m3" )
type UnitEnergy ¶ added in v0.2.17
type UnitEnergy string
UnitEnergy: The valid types of energy units.
const ( // UnitEnergyBtu: British Thermal Unit (BTU) <https://en.wikipedia.org/wiki/British_thermal_unit> UnitEnergyBtu UnitEnergy = "btu" // UnitEnergyElectronvolts: Electron Volts (eV) <https://en.wikipedia.org/wiki/Electronvolt> UnitEnergyElectronvolts UnitEnergy = "electronvolts" // UnitEnergyJoules: Joules (or watt-seconds) <https://en.wikipedia.org/wiki/Joule> UnitEnergyJoules UnitEnergy = "joules" // UnitEnergyKilocalories: Kilocalories (often just called calories) <https://en.wikipedia.org/wiki/Kilocalorie> UnitEnergyKilocalories UnitEnergy = "kilocalories" // UnitEnergyKilowattHours: Kilowatt hours (kWh) <https://en.wikipedia.org/wiki/Kilowatt-hour> UnitEnergyKilowattHours UnitEnergy = "kilowatt_hours" // UnitEnergyWattHours: Watt hours (Wh) <https://en.wikipedia.org/wiki/Kilowatt-hour> UnitEnergyWattHours UnitEnergy = "watt_hours" )
type UnitEnergyConversion ¶ added in v0.2.5
type UnitEnergyConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitEnergy `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitEnergy `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitEnergyConversion: Result of converting between units.
type UnitForce ¶ added in v0.2.17
type UnitForce string
UnitForce: The valid types of force units.
const ( // UnitForceDynes: Dynes <https://en.wikipedia.org/wiki/Dyne> UnitForceDynes UnitForce = "dynes" // UnitForceKiloponds: Kiloponds <https://en.wikipedia.org/wiki/Kilopond> UnitForceKiloponds UnitForce = "kiloponds" // UnitForceMicronewtons: Micronewtons <https://en.wikipedia.org/wiki/Newton_(unit)> UnitForceMicronewtons UnitForce = "micronewtons" // UnitForceMillinewtons: Millinewtons <https://en.wikipedia.org/wiki/Newton_(unit)> UnitForceMillinewtons UnitForce = "millinewtons" // UnitForceNewtons: Newtons <https://en.wikipedia.org/wiki/Newton_(unit)> UnitForceNewtons UnitForce = "newtons" // UnitForcePoundals: Poundals <https://en.wikipedia.org/wiki/Poundal> UnitForcePoundals UnitForce = "poundals" // UnitForcePounds: Pounds <https://en.wikipedia.org/wiki/Pound_(force)> UnitForcePounds UnitForce = "pounds" )
type UnitForceConversion ¶ added in v0.2.5
type UnitForceConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitForce `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitForce `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitForceConversion: Result of converting between units.
type UnitFrequency ¶ added in v0.2.17
type UnitFrequency string
UnitFrequency: The valid types of frequency units.
const ( // UnitFrequencyGigahertz: Gigahertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyGigahertz UnitFrequency = "gigahertz" // UnitFrequencyHertz: Hertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyHertz UnitFrequency = "hertz" // UnitFrequencyKilohertz: Kilohertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyKilohertz UnitFrequency = "kilohertz" // UnitFrequencyMegahertz: Megahertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyMegahertz UnitFrequency = "megahertz" // UnitFrequencyMicrohertz: Microhertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyMicrohertz UnitFrequency = "microhertz" // UnitFrequencyMillihertz: Millihertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyMillihertz UnitFrequency = "millihertz" // UnitFrequencyNanohertz: Nanohertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyNanohertz UnitFrequency = "nanohertz" // UnitFrequencyTerahertz: Terahertz <https://en.wikipedia.org/wiki/Hertz> UnitFrequencyTerahertz UnitFrequency = "terahertz" )
type UnitFrequencyConversion ¶ added in v0.2.17
type UnitFrequencyConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitFrequency `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitFrequency `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitFrequencyConversion: Result of converting between units.
type UnitLength ¶ added in v0.2.17
type UnitLength string
UnitLength: The valid types of length units.
const ( // UnitLengthCm: Centimeters <https://en.wikipedia.org/wiki/Centimeter> UnitLengthCm UnitLength = "cm" // UnitLengthFt: Feet <https://en.wikipedia.org/wiki/Foot_(unit)> UnitLengthFt UnitLength = "ft" // UnitLengthIn: Inches <https://en.wikipedia.org/wiki/Inch> UnitLengthIn UnitLength = "in" // UnitLengthM: Meters <https://en.wikipedia.org/wiki/Meter> UnitLengthM UnitLength = "m" // UnitLengthMm: Millimeters <https://en.wikipedia.org/wiki/Millimeter> UnitLengthMm UnitLength = "mm" // UnitLengthYd: Yards <https://en.wikipedia.org/wiki/Yard> UnitLengthYd UnitLength = "yd" )
type UnitLengthConversion ¶ added in v0.2.5
type UnitLengthConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitLength `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitLength `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitLengthConversion: Result of converting between units.
type UnitMas ¶ added in v0.2.17
type UnitMas string
UnitMas: The valid types of mass units.
const ( // UnitMasG: Grams <https://en.wikipedia.org/wiki/Gram> UnitMasG UnitMas = "g" // UnitMasKg: Kilograms <https://en.wikipedia.org/wiki/Kilogram> UnitMasKg UnitMas = "kg" // UnitMasLb: Pounds <https://en.wikipedia.org/wiki/Pound_(mass)> UnitMasLb UnitMas = "lb" )
type UnitMassConversion ¶ added in v0.2.5
type UnitMassConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitMas `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitMas `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitMassConversion: Result of converting between units.
type UnitPower ¶ added in v0.2.17
type UnitPower string
UnitPower: The valid types of power units.
const ( // UnitPowerBtuPerMinute: British thermal units (BTU) per minute <https://en.wikipedia.org/wiki/British_thermal_unit> UnitPowerBtuPerMinute UnitPower = "btu_per_minute" // UnitPowerHorsepower: Horsepower (hp) <https://en.wikipedia.org/wiki/Horsepower> UnitPowerHorsepower UnitPower = "horsepower" // UnitPowerKilowatts: Kilowatts <https://en.wikipedia.org/wiki/Kilowatt> UnitPowerKilowatts UnitPower = "kilowatts" // UnitPowerMetricHorsepower: Metric horsepower (PS) <https://en.wikipedia.org/wiki/Horsepower#Metric_horsepower> UnitPowerMetricHorsepower UnitPower = "metric_horsepower" // UnitPowerMicrowatts: Microwatts <https://en.wikipedia.org/wiki/Microwatt> UnitPowerMicrowatts UnitPower = "microwatts" // UnitPowerMilliwatts: Millwatts <https://en.wikipedia.org/wiki/Milliwatt> UnitPowerMilliwatts UnitPower = "milliwatts" // UnitPowerWatts: Watts <https://en.wikipedia.org/wiki/Watt> UnitPowerWatts UnitPower = "watts" )
type UnitPowerConversion ¶ added in v0.2.5
type UnitPowerConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitPower `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitPower `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitPowerConversion: Result of converting between units.
type UnitPressure ¶ added in v0.2.17
type UnitPressure string
UnitPressure: The valid types of pressure units.
const ( // UnitPressureAtmospheres: Atmospheres <https://en.wikipedia.org/wiki/Standard_atmosphere_(unit)> UnitPressureAtmospheres UnitPressure = "atmospheres" // UnitPressureBars: Bars <https://en.wikipedia.org/wiki/Bar_(unit)> UnitPressureBars UnitPressure = "bars" // UnitPressureHectopascals: Hectopascals <https://en.wikipedia.org/wiki/Hectopascal> UnitPressureHectopascals UnitPressure = "hectopascals" // UnitPressureKilopascals: Kilopascals <https://en.wikipedia.org/wiki/Kilopascal> UnitPressureKilopascals UnitPressure = "kilopascals" // UnitPressureMillibars: Millibars <https://en.wikipedia.org/wiki/Bar_(unit)> UnitPressureMillibars UnitPressure = "millibars" // UnitPressurePascals: Pascals <https://en.wikipedia.org/wiki/Pascal_(unit)> UnitPressurePascals UnitPressure = "pascals" // UnitPressurePsi: Pounds per square inch (PSI) - <https://en.wikipedia.org/wiki/Pound_per_square_inch> UnitPressurePsi UnitPressure = "psi" )
type UnitPressureConversion ¶ added in v0.2.5
type UnitPressureConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitPressure `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitPressure `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitPressureConversion: Result of converting between units.
type UnitService ¶ added in v0.1.7
type UnitService service
UnitService: Unit conversion operations.
func (*UnitService) GetAngleConversion ¶ added in v0.2.5
func (s *UnitService) GetAngleConversion(inputUnit UnitAngle, outputUnit UnitAngle, value float64) (*UnitAngleConversion, error)
GetAngleConversion: Convert angle units. Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of angle formats.
- `outputUnit`: The valid types of angle formats.
- `value`
Example ¶
GetAngleConversion: Convert angle units. Convert an angle unit value to another angle unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of angle formats.
- `outputUnit`: The valid types of angle formats.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetAngleConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetAreaConversion ¶ added in v0.2.5
func (s *UnitService) GetAreaConversion(inputUnit UnitArea, outputUnit UnitArea, value float64) (*UnitAreaConversion, error)
GetAreaConversion: Convert area units. Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of area units.
- `outputUnit`: The valid types of area units.
- `value`
Example ¶
GetAreaConversion: Convert area units. Convert an area unit value to another area unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of area units.
- `outputUnit`: The valid types of area units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetAreaConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetCurrentConversion ¶ added in v0.2.17
func (s *UnitService) GetCurrentConversion(inputUnit UnitCurrent, outputUnit UnitCurrent, value float64) (*UnitCurrentConversion, error)
GetCurrentConversion: Convert current units. Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of current units.
- `outputUnit`: The valid types of current units.
- `value`
Example ¶
GetCurrentConversion: Convert current units. Convert a current unit value to another current unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of current units.
- `outputUnit`: The valid types of current units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetCurrentConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetEnergyConversion ¶ added in v0.2.5
func (s *UnitService) GetEnergyConversion(inputUnit UnitEnergy, outputUnit UnitEnergy, value float64) (*UnitEnergyConversion, error)
GetEnergyConversion: Convert energy units. Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of energy units.
- `outputUnit`: The valid types of energy units.
- `value`
Example ¶
GetEnergyConversion: Convert energy units. Convert a energy unit value to another energy unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of energy units.
- `outputUnit`: The valid types of energy units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetEnergyConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetForceConversion ¶ added in v0.2.5
func (s *UnitService) GetForceConversion(inputUnit UnitForce, outputUnit UnitForce, value float64) (*UnitForceConversion, error)
GetForceConversion: Convert force units. Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of force units.
- `outputUnit`: The valid types of force units.
- `value`
Example ¶
GetForceConversion: Convert force units. Convert a force unit value to another force unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of force units.
- `outputUnit`: The valid types of force units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetForceConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetFrequencyConversion ¶ added in v0.2.17
func (s *UnitService) GetFrequencyConversion(inputUnit UnitFrequency, outputUnit UnitFrequency, value float64) (*UnitFrequencyConversion, error)
GetFrequencyConversion: Convert frequency units. Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of frequency units.
- `outputUnit`: The valid types of frequency units.
- `value`
Example ¶
GetFrequencyConversion: Convert frequency units. Convert a frequency unit value to another frequency unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of frequency units.
- `outputUnit`: The valid types of frequency units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetFrequencyConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetLengthConversion ¶ added in v0.2.5
func (s *UnitService) GetLengthConversion(inputUnit UnitLength, outputUnit UnitLength, value float64) (*UnitLengthConversion, error)
GetLengthConversion: Convert length units. Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of length units.
- `outputUnit`: The valid types of length units.
- `value`
Example ¶
GetLengthConversion: Convert length units. Convert a length unit value to another length unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of length units.
- `outputUnit`: The valid types of length units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetLengthConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetMassConversion ¶ added in v0.2.5
func (s *UnitService) GetMassConversion(inputUnit UnitMas, outputUnit UnitMas, value float64) (*UnitMassConversion, error)
GetMassConversion: Convert mass units. Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of mass units.
- `outputUnit`: The valid types of mass units.
- `value`
Example ¶
GetMassConversion: Convert mass units. Convert a mass unit value to another mass unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of mass units.
- `outputUnit`: The valid types of mass units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetMassConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetPowerConversion ¶ added in v0.2.5
func (s *UnitService) GetPowerConversion(inputUnit UnitPower, outputUnit UnitPower, value float64) (*UnitPowerConversion, error)
GetPowerConversion: Convert power units. Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of power units.
- `outputUnit`: The valid types of power units.
- `value`
Example ¶
GetPowerConversion: Convert power units. Convert a power unit value to another power unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of power units.
- `outputUnit`: The valid types of power units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetPowerConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetPressureConversion ¶ added in v0.2.5
func (s *UnitService) GetPressureConversion(inputUnit UnitPressure, outputUnit UnitPressure, value float64) (*UnitPressureConversion, error)
GetPressureConversion: Convert pressure units. Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of pressure units.
- `outputUnit`: The valid types of pressure units.
- `value`
Example ¶
GetPressureConversion: Convert pressure units. Convert a pressure unit value to another pressure unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of pressure units.
- `outputUnit`: The valid types of pressure units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetPressureConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetTemperatureConversion ¶ added in v0.2.5
func (s *UnitService) GetTemperatureConversion(inputUnit UnitTemperature, outputUnit UnitTemperature, value float64) (*UnitTemperatureConversion, error)
GetTemperatureConversion: Convert temperature units. Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of temperature units.
- `outputUnit`: The valid types of temperature units.
- `value`
Example ¶
GetTemperatureConversion: Convert temperature units. Convert a temperature unit value to another temperature unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of temperature units.
- `outputUnit`: The valid types of temperature units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetTemperatureConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetTorqueConversion ¶ added in v0.2.17
func (s *UnitService) GetTorqueConversion(inputUnit UnitTorque, outputUnit UnitTorque, value float64) (*UnitTorqueConversion, error)
GetTorqueConversion: Convert torque units. Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of torque units.
- `outputUnit`: The valid types of torque units.
- `value`
Example ¶
GetTorqueConversion: Convert torque units. Convert a torque unit value to another torque unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of torque units.
- `outputUnit`: The valid types of torque units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetTorqueConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UnitService) GetVolumeConversion ¶ added in v0.2.5
func (s *UnitService) GetVolumeConversion(inputUnit UnitVolume, outputUnit UnitVolume, value float64) (*UnitVolumeConversion, error)
GetVolumeConversion: Convert volume units. Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of volume units.
- `outputUnit`: The valid types of volume units.
- `value`
Example ¶
GetVolumeConversion: Convert volume units. Convert a volume unit value to another volume unit value. This is a nice endpoint to use for helper functions.
Parameters
- `inputUnit`: The valid types of volume units.
- `outputUnit`: The valid types of volume units.
- `value`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.Unit.GetVolumeConversion("", "", 123.45)
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
type UnitTemperature ¶ added in v0.2.17
type UnitTemperature string
UnitTemperature: The valid types of temperature units.
const ( // UnitTemperatureCelsius: Celsius <https://en.wikipedia.org/wiki/Celsius> UnitTemperatureCelsius UnitTemperature = "celsius" // UnitTemperatureFahrenheit: Fahrenheit <https://en.wikipedia.org/wiki/Fahrenheit> UnitTemperatureFahrenheit UnitTemperature = "fahrenheit" // UnitTemperatureKelvin: Kelvin <https://en.wikipedia.org/wiki/Kelvin> UnitTemperatureKelvin UnitTemperature = "kelvin" // UnitTemperatureRankine: Rankine <https://en.wikipedia.org/wiki/Rankine_scale> UnitTemperatureRankine UnitTemperature = "rankine" )
type UnitTemperatureConversion ¶ added in v0.2.5
type UnitTemperatureConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitTemperature `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitTemperature `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitTemperatureConversion: Result of converting between units.
type UnitTorque ¶ added in v0.2.17
type UnitTorque string
UnitTorque: The valid types of torque units.
const ( // UnitTorqueNewtonMetres: Newton metres <https://en.wikipedia.org/wiki/Newton_metre> UnitTorqueNewtonMetres UnitTorque = "newton_metres" // UnitTorquePoundFoot: Pound foot <https://en.wikipedia.org/wiki/Pound-foot_(torque)> UnitTorquePoundFoot UnitTorque = "pound_foot" )
type UnitTorqueConversion ¶ added in v0.2.17
type UnitTorqueConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitTorque `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitTorque `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitTorqueConversion: Result of converting between units.
type UnitVolume ¶ added in v0.2.17
type UnitVolume string
UnitVolume: The valid types of volume units.
const ( // UnitVolumeCm3: Cubic centimeters (cc or cm³) <https://en.wikipedia.org/wiki/Cubic_centimeter> UnitVolumeCm3 UnitVolume = "cm3" // UnitVolumeFt3: Cubic feet (ft³) <https://en.wikipedia.org/wiki/Cubic_foot> UnitVolumeFt3 UnitVolume = "ft3" // UnitVolumeIn3: Cubic inches (cu in or in³) <https://en.wikipedia.org/wiki/Cubic_inch> UnitVolumeIn3 UnitVolume = "in3" // UnitVolumeM3: Cubic meters (m³) <https://en.wikipedia.org/wiki/Cubic_meter> UnitVolumeM3 UnitVolume = "m3" // UnitVolumeYd3: Cubic yards (yd³) <https://en.wikipedia.org/wiki/Cubic_yard> UnitVolumeYd3 UnitVolume = "yd3" // UnitVolumeUsfloz: US Fluid Ounces (fl oz) <https://en.wikipedia.org/wiki/Fluid_ounce> UnitVolumeUsfloz UnitVolume = "usfloz" // UnitVolumeUsgal: US Gallons (gal US) <https://en.wikipedia.org/wiki/Gallon> UnitVolumeUsgal UnitVolume = "usgal" // UnitVolumeL: Liters (l) <https://en.wikipedia.org/wiki/Litre> UnitVolumeL UnitVolume = "l" // UnitVolumeMl: Milliliters (ml) <https://en.wikipedia.org/wiki/Litre> UnitVolumeMl UnitVolume = "ml" )
type UnitVolumeConversion ¶ added in v0.2.5
type UnitVolumeConversion struct {
// CompletedAt: The time and date the API call was completed.
CompletedAt Time `json:"completed_at" yaml:"completed_at" schema:"completed_at"`
// CreatedAt: The time and date the API call was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// Error: The error the function returned, if any.
Error string `json:"error" yaml:"error" schema:"error"`
// ID: The unique identifier of the API call.
//
// This is the same as the API call ID.
ID UUID `json:"id" yaml:"id" schema:"id,required"`
// Input: The input value.
Input float64 `json:"input" yaml:"input" schema:"input"`
// InputUnit: The source format of the unit conversion.
InputUnit UnitVolume `json:"input_unit" yaml:"input_unit" schema:"input_unit,required"`
// Output: The resulting value.
Output float64 `json:"output" yaml:"output" schema:"output"`
// OutputUnit: The output format of the unit conversion.
OutputUnit UnitVolume `json:"output_unit" yaml:"output_unit" schema:"output_unit,required"`
// StartedAt: The time and date the API call was started.
StartedAt Time `json:"started_at" yaml:"started_at" schema:"started_at"`
// Status: The status of the API call.
Status APICallStatus `json:"status" yaml:"status" schema:"status,required"`
// UpdatedAt: The time and date the API call was last updated.
UpdatedAt Time `json:"updated_at" yaml:"updated_at" schema:"updated_at,required"`
// UserID: The user ID of the user who created the API call.
UserID UUID `json:"user_id" yaml:"user_id" schema:"user_id,required"`
}
UnitVolumeConversion: Result of converting between units.
type 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 UpdateOrgDataset ¶ added in v0.2.42
type UpdateOrgDataset struct {
// Name: Optional new display name.
Name string `json:"name" yaml:"name" schema:"name"`
// 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 UpdatePaymentBalance ¶ added in v0.2.33
type UpdatePaymentBalance struct {
// MonthlyAPICreditsRemainingMonetaryValue: The monetary value of the monthy API credits remaining in the balance. This gets re-upped every month,
MonthlyAPICreditsRemainingMonetaryValue float64 `` /* 157-byte string literal not displayed */
// 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.
StableAPICreditsRemainingMonetaryValue float64 `` /* 154-byte string literal not displayed */
}
UpdatePaymentBalance: Payload for updating a user's balance.
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 {
// 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"`
}
UpdateUser: The user-modifiable parts of a User.
type User ¶ added in v0.0.9
type User struct {
// Block: If the user should be blocked and the reason why.
Block BlockReason `json:"block" yaml:"block" schema:"block"`
// CanTrainOnData: If we can train on the user's data. If the user is a member of an organization, the organization's setting will override this.
CanTrainOnData bool `json:"can_train_on_data" yaml:"can_train_on_data" schema:"can_train_on_data"`
// Company: The user's company.
Company string `json:"company" yaml:"company" schema:"company"`
// CreatedAt: The date and time the user was created.
CreatedAt Time `json:"created_at" yaml:"created_at" schema:"created_at,required"`
// 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"`
}
User: A user.
type UserAdminDetails ¶ added in v0.2.42
type UserAdminDetails struct {
// Address: Latest billing address stored for the user.
Address Address `json:"address" yaml:"address" schema:"address"`
// AddressSummary: Readable billing address summary.
AddressSummary string `json:"address_summary" yaml:"address_summary" schema:"address_summary"`
// Block: Block reason when the user is blocked.
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"`
// HubspotContactUrl: Direct or search link to the HubSpot contact record.
HubspotContactUrl string `json:"hubspot_contact_url" yaml:"hubspot_contact_url" schema:"hubspot_contact_url"`
// PaymentMethods: Known payment methods on file.
PaymentMethods []PaymentMethod `json:"payment_methods" yaml:"payment_methods" schema:"payment_methods,required"`
// PaymentMethodsSummary: Summaries of the known payment methods.
PaymentMethodsSummary []string `json:"payment_methods_summary" yaml:"payment_methods_summary" schema:"payment_methods_summary,required"`
// StripeCustomerID: Stripe customer identifier if one exists.
StripeCustomerID string `json:"stripe_customer_id" yaml:"stripe_customer_id" schema:"stripe_customer_id"`
// StripeDashboardUrl: Direct link to the Stripe customer dashboard.
StripeDashboardUrl string `json:"stripe_dashboard_url" yaml:"stripe_dashboard_url" schema:"stripe_dashboard_url"`
}
UserAdminDetails: Extra admin-only details for a user.
type UserFeature ¶ added in v0.2.42
type UserFeature string
UserFeature is the type definition for a UserFeature.
const ( // UserFeatureProprietaryToKclConversionBeta represents the UserFeature `"proprietary_to_kcl_conversion_beta"`. UserFeatureProprietaryToKclConversionBeta UserFeature = "proprietary_to_kcl_conversion_beta" // UserFeatureNewSketchMode represents the UserFeature `"new_sketch_mode"`. UserFeatureNewSketchMode UserFeature = "new_sketch_mode" )
type UserFeatureEntry ¶ added in v0.2.42
type UserFeatureEntry struct {
// ID: Stable identifier for the feature flag (snake_case).
ID UserFeature `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 UserResultsPage ¶ added in v0.1.0
type UserResultsPage struct {
// Items: list of items on this page of results
Items []User `json:"items" yaml:"items" schema:"items,required"`
// NextPage: token used to fetch the next page of results (if any)
NextPage string `json:"next_page" yaml:"next_page" schema:"next_page"`
}
UserResultsPage: A single page of results
type UserService ¶ added in v0.0.9
type UserService service
UserService: A user is someone who uses the Zoo API. Here, we can create, delete, and list users. We can also get information about a user. Operations will only be authorized if the user is requesting information about themselves.
func (*UserService) AdminDetailsList ¶ added in v0.2.42
func (s *UserService) AdminDetailsList(id string) (*UserAdminDetails, error)
AdminDetailsList: Get admin-only details for a user. Zoo admins can retrieve extended information about any user, while non-admins receive a 404 to avoid leaking the existence of the resource.
Parameters
- `id`
Example ¶
AdminDetailsList: Get admin-only details for a user. Zoo admins can retrieve extended information about any user, while non-admins receive a 404 to avoid leaking the existence of the resource.
Parameters
- `id`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.AdminDetailsList("some-string")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) CreateShortlink ¶ added in v0.2.38
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.
Example ¶
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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.CreateShortlink(kittycad.CreateShortlinkRequest{Password: "some-string", RestrictToOrg: true, Url: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) DeleteSelf ¶ added in v0.2.2
func (s *UserService) DeleteSelf() error
DeleteSelf: Delete your user. This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
Example ¶
DeleteSelf: Delete your user. This endpoint requires authentication by any Zoo user. It deletes the authenticated user from Zoo's database.
This call will only succeed if all invoices associated with the user have been paid in full and there is no outstanding balance.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.DeleteSelf(); err != nil {
panic(err)
}
func (*UserService) DeleteShortlink ¶ added in v0.2.38
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`
Example ¶
DeleteShortlink: Delete a shortlink for a user. This endpoint requires authentication by any Zoo user. It deletes a shortlink for the user.
Parameters
- `key`
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.DeleteShortlink("some-string"); 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).
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) (*User, error)
Get: Get a user. To get information about yourself, use `/users/me` as the endpoint. By doing so you will get the user information for the authenticated user.
Alternatively, to get information about the authenticated user, use `/user` endpoint.
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`
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) 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`
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.
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.
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() (*User, error)
GetSelf: Get your user. Get the user information for the authenticated user.
Alternatively, you can also use the `/users/me` endpoint.
Example ¶
GetSelf: Get your user. Get the user information for the authenticated user.
Alternatively, you can also use the `/users/me` endpoint.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.GetSelf()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) GetSelfExtended ¶ added in v0.0.9
func (s *UserService) GetSelfExtended() (*ExtendedUser, error)
GetSelfExtended: Get extended information about your user. Get the user information for the authenticated user.
Alternatively, you can also use the `/users-extended/me` endpoint.
Example ¶
GetSelfExtended: Get extended information about your user. Get the user information for the authenticated user.
Alternatively, you can also use the `/users-extended/me` endpoint.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.GetSelfExtended()
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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-
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 (*UserService) GetShortlinks ¶ added in v0.2.38
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.
Example ¶
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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.GetShortlinks(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) List ¶ added in v0.0.9
func (s *UserService) List(limit int, pageToken string, sortBy CreatedAtSortMode) (*UserResultsPage, error)
List: List users. This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
List: List users. This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.List(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) ListExtended ¶ added in v0.0.9
func (s *UserService) ListExtended(limit int, pageToken string, sortBy CreatedAtSortMode) (*ExtendedUserResultsPage, error)
ListExtended: List users with extended information. This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
Example ¶
ListExtended: List users with extended information. This endpoint requires authentication by a Zoo employee. The users are returned in order of creation, with the most recently created users first.
Parameters
`limit`
`pageToken`
`sortBy`: Supported set of sort modes for scanning by created_at only.
Currently, we only support scanning in ascending order.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.ListExtended(123, "some-string", "")
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) PatchCrm ¶ added in v0.2.41
func (s *UserService) PatchCrm(body CrmData) error
PatchCrm: Update properties in the CRM Parameters
- `body`: The data for subscribing a user to the newsletter.
Example ¶
PatchCrm: Update properties in the CRM Parameters
- `body`: The data for subscribing a user to the newsletter.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.PatchCrm(kittycad.CrmData{CadIndustry: "some-string", CadUserType: "some-string", NumberOfCadUsers: "some-string"}); err != nil {
panic(err)
}
func (*UserService) PutFormSelf ¶ added in v0.2.41
func (s *UserService) PutFormSelf(body InquiryForm) error
PutFormSelf: Create a new support/sales ticket from the website contact form. This endpoint is authenticated. It gets attached to the user's account.
Parameters
- `body`: The form for a public inquiry submission.
Example ¶
PutFormSelf: Create a new support/sales ticket from the website contact form. This endpoint is authenticated. It gets attached to the user's account.
Parameters
- `body`: The form for a public inquiry submission.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.PutFormSelf(kittycad.InquiryForm{CadPlatforms: []string{}, Company: "some-string", Email: "[email protected]", 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) PutPublicForm ¶ added in v0.2.41
func (s *UserService) PutPublicForm(body InquiryForm) error
PutPublicForm: Creates a new support/sales ticket from the website contact form. This endpoint is for untrusted users and is not authenticated.
Parameters
- `body`: The form for a public inquiry submission.
Example ¶
PutPublicForm: Creates a new support/sales ticket from the website contact form. This endpoint is for untrusted users and is not authenticated.
Parameters
- `body`: The form for a public inquiry submission.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.PutPublicForm(kittycad.InquiryForm{CadPlatforms: []string{}, Company: "some-string", Email: "[email protected]", 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) PutPublicSubscribe ¶ added in v0.2.41
func (s *UserService) PutPublicSubscribe(body Subscribe) error
PutPublicSubscribe: Subscribes a user to the newsletter. Parameters
- `body`: The data for subscribing a user to the newsletter.
Example ¶
PutPublicSubscribe: Subscribes a user to the newsletter. Parameters
- `body`: The data for subscribing a user to the newsletter.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.PutPublicSubscribe(kittycad.Subscribe{Email: "[email protected]"}); err != nil {
panic(err)
}
func (*UserService) UpdatePrivacySettings ¶ added in v0.2.33
func (s *UserService) UpdatePrivacySettings(body PrivacySettings) (*PrivacySettings, error)
UpdatePrivacySettings: Update the user's privacy settings. This endpoint requires authentication by any Zoo user. It updates the privacy settings for the user.
Parameters
- `body`: Privacy settings for an org or user.
Example ¶
UpdatePrivacySettings: Update the user's privacy settings. This endpoint requires authentication by any Zoo user. It updates the privacy settings for the user.
Parameters
- `body`: Privacy settings for an org or user.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.UpdatePrivacySettings(kittycad.PrivacySettings{CanTrainOnData: true})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) UpdateSelf ¶ added in v0.1.4
func (s *UserService) UpdateSelf(body UpdateUser) (*User, error)
UpdateSelf: Update your user. This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.
Parameters
- `body`: The user-modifiable parts of a User.
Example ¶
UpdateSelf: Update your user. This endpoint requires authentication by any Zoo user. It updates information about the authenticated user.
Parameters
- `body`: The user-modifiable parts of a User.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.UpdateSelf(kittycad.UpdateUser{Company: "some-string", Discord: "some-string", FirstName: "some-string", Github: "some-string", Image: kittycad.URL{&url.URL{Scheme: "https", Host: "example.com"}}, IsOnboarded: true, LastName: "some-string", Phone: "+1-555-555-555"})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
func (*UserService) UpdateShortlink ¶ added in v0.2.38
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.
Example ¶
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.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
if err := client.User.UpdateShortlink("some-string", kittycad.UpdateShortlinkRequest{Password: "some-string", RestrictToOrg: true}); err != nil {
panic(err)
}
func (*UserService) UpdateSubscriptionFor ¶ added in v0.2.42
func (s *UserService) UpdateSubscriptionFor(id string, body ZooProductSubscriptionsUserRequest) (*ZooProductSubscriptions, error)
UpdateSubscriptionFor: Update a subscription for a user. You must be a Zoo admin to perform this request.
Parameters
- `id`
- `body`: A struct of Zoo product subscriptions a user can request.
Example ¶
UpdateSubscriptionFor: Update a subscription for a user. You must be a Zoo admin to perform this request.
Parameters
- `id`
- `body`: A struct of Zoo product subscriptions a user can request.
client, err := kittycad.NewClientFromEnv("your apps user agent")
if err != nil {
panic(err)
}
result, err := client.User.UpdateSubscriptionFor("some-string", kittycad.ZooProductSubscriptionsUserRequest{ModelingApp: "some-string", PayAnnually: true})
if err != nil {
panic(err)
}
fmt.Printf("%#v", result)
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 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"`
// 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"`
// IsCustomQuote: Indicates whether this plan uses custom-quoted pricing.
IsCustomQuote bool `json:"is_custom_quote" yaml:"is_custom_quote" schema:"is_custom_quote"`
// 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 per month. This re-ups on the 1st of each month. 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 per month. This re-ups on the 1st of each month.
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 (meaning 1 credit = 1 second of API usage).
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 []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 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 {
// 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 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.