Documentation
¶
Index ¶
- func Bool(value bool) param.Field[bool]
- func DefaultClientOptions() []option.RequestOption
- func F[T any](value T) param.Field[T]
- func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]
- func Float(value float64) param.Field[float64]
- func Int(value int64) param.Field[int64]
- func Null[T any]() param.Field[T]
- func Raw[T any](value any) param.Field[T]
- func String(value string) param.Field[string]
- type AgentService
- type AgentV1AgentDeleteResponse
- type AgentV1AgentGetResponse
- type AgentV1AgentListResponse
- type AgentV1AgentListResponseAgent
- type AgentV1AgentNewParams
- type AgentV1AgentNewParamsSandbox
- type AgentV1AgentNewResponse
- type AgentV1AgentService
- func (r *AgentV1AgentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1AgentDeleteResponse, err error)
- func (r *AgentV1AgentService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1AgentGetResponse, err error)
- func (r *AgentV1AgentService) List(ctx context.Context, opts ...option.RequestOption) (res *AgentV1AgentListResponse, err error)
- func (r *AgentV1AgentService) New(ctx context.Context, body AgentV1AgentNewParams, opts ...option.RequestOption) (res *AgentV1AgentNewResponse, err error)
- func (r *AgentV1AgentService) Update(ctx context.Context, id string, body AgentV1AgentUpdateParams, ...) (res *AgentV1AgentUpdateResponse, err error)
- type AgentV1AgentUpdateParams
- type AgentV1AgentUpdateResponse
- type AgentV1RunCancelResponse
- type AgentV1RunCancelResponseStatus
- type AgentV1RunExecResponse
- type AgentV1RunExecResponseStatus
- type AgentV1RunGetDetailsResponse
- type AgentV1RunGetDetailsResponseResult
- type AgentV1RunGetDetailsResponseResultLogs
- type AgentV1RunGetDetailsResponseStatus
- type AgentV1RunGetDetailsResponseStep
- type AgentV1RunGetDetailsResponseStepsType
- type AgentV1RunGetDetailsResponseUsage
- type AgentV1RunGetStatusResponse
- type AgentV1RunGetStatusResponseStatus
- type AgentV1RunNewParams
- type AgentV1RunNewResponse
- type AgentV1RunNewResponseStatus
- type AgentV1RunService
- func (r *AgentV1RunService) Cancel(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunCancelResponse, err error)
- func (r *AgentV1RunService) Exec(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunExecResponse, err error)
- func (r *AgentV1RunService) GetDetails(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunGetDetailsResponse, err error)
- func (r *AgentV1RunService) GetStatus(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunGetStatusResponse, err error)
- func (r *AgentV1RunService) New(ctx context.Context, body AgentV1RunNewParams, opts ...option.RequestOption) (res *AgentV1RunNewResponse, err error)
- func (r *AgentV1RunService) Watch(ctx context.Context, id string, body AgentV1RunWatchParams, ...) (res *AgentV1RunWatchResponse, err error)
- type AgentV1RunWatchParams
- type AgentV1RunWatchResponse
- type AgentV1Service
- type ApplicationService
- type ApplicationV1DeploymentCancelParams
- type ApplicationV1DeploymentGetLogsParams
- type ApplicationV1DeploymentGetParams
- type ApplicationV1DeploymentListParams
- type ApplicationV1DeploymentListParamsTarget
- type ApplicationV1DeploymentNewParams
- type ApplicationV1DeploymentNewParamsTarget
- type ApplicationV1DeploymentService
- func (r *ApplicationV1DeploymentService) Cancel(ctx context.Context, id string, body ApplicationV1DeploymentCancelParams, ...) (err error)
- func (r *ApplicationV1DeploymentService) Get(ctx context.Context, id string, query ApplicationV1DeploymentGetParams, ...) (err error)
- func (r *ApplicationV1DeploymentService) GetLogs(ctx context.Context, id string, query ApplicationV1DeploymentGetLogsParams, ...) (err error)
- func (r *ApplicationV1DeploymentService) GetStatus(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *ApplicationV1DeploymentService) List(ctx context.Context, query ApplicationV1DeploymentListParams, ...) (err error)
- func (r *ApplicationV1DeploymentService) New(ctx context.Context, body ApplicationV1DeploymentNewParams, ...) (err error)
- func (r *ApplicationV1DeploymentService) NewFromFiles(ctx context.Context, opts ...option.RequestOption) (err error)
- func (r *ApplicationV1DeploymentService) Stream(ctx context.Context, id string, query ApplicationV1DeploymentStreamParams, ...) (err error)
- type ApplicationV1DeploymentStreamParams
- type ApplicationV1ProjectDeleteParams
- type ApplicationV1ProjectGetRuntimeLogsParams
- type ApplicationV1ProjectListDeploymentsParams
- type ApplicationV1ProjectListDeploymentsParamsTarget
- type ApplicationV1ProjectListEnvParams
- type ApplicationV1ProjectListResponse
- type ApplicationV1ProjectListResponseProject
- type ApplicationV1ProjectListResponseProjectsDomain
- type ApplicationV1ProjectNewDeploymentParams
- type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariable
- type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget
- type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType
- type ApplicationV1ProjectNewDomainParams
- type ApplicationV1ProjectNewEnvParams
- type ApplicationV1ProjectNewEnvParamsTarget
- type ApplicationV1ProjectNewEnvParamsType
- type ApplicationV1ProjectNewParams
- type ApplicationV1ProjectNewParamsEnvironmentVariable
- type ApplicationV1ProjectNewParamsEnvironmentVariablesTarget
- type ApplicationV1ProjectNewParamsEnvironmentVariablesType
- type ApplicationV1ProjectService
- func (r *ApplicationV1ProjectService) Delete(ctx context.Context, id string, body ApplicationV1ProjectDeleteParams, ...) (err error)
- func (r *ApplicationV1ProjectService) DeleteDomain(ctx context.Context, id string, domain string, opts ...option.RequestOption) (err error)
- func (r *ApplicationV1ProjectService) DeleteEnv(ctx context.Context, id string, envID string, opts ...option.RequestOption) (err error)
- func (r *ApplicationV1ProjectService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *ApplicationV1ProjectService) GetRuntimeLogs(ctx context.Context, id string, query ApplicationV1ProjectGetRuntimeLogsParams, ...) (err error)
- func (r *ApplicationV1ProjectService) List(ctx context.Context, opts ...option.RequestOption) (res *ApplicationV1ProjectListResponse, err error)
- func (r *ApplicationV1ProjectService) ListDeployments(ctx context.Context, id string, ...) (err error)
- func (r *ApplicationV1ProjectService) ListDomains(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *ApplicationV1ProjectService) ListEnv(ctx context.Context, id string, query ApplicationV1ProjectListEnvParams, ...) (err error)
- func (r *ApplicationV1ProjectService) New(ctx context.Context, body ApplicationV1ProjectNewParams, ...) (err error)
- func (r *ApplicationV1ProjectService) NewDeployment(ctx context.Context, id string, body ApplicationV1ProjectNewDeploymentParams, ...) (err error)
- func (r *ApplicationV1ProjectService) NewDomain(ctx context.Context, id string, body ApplicationV1ProjectNewDomainParams, ...) (err error)
- func (r *ApplicationV1ProjectService) NewEnv(ctx context.Context, id string, body ApplicationV1ProjectNewEnvParams, ...) (err error)
- type ApplicationV1Service
- type ApplicationV1WorkflowGetStatusParams
- type ApplicationV1WorkflowService
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, ...) error
- func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, ...) error
- type ComputeService
- type ComputeV1EnvironmentDeleteResponse
- type ComputeV1EnvironmentGetResponse
- type ComputeV1EnvironmentListResponse
- type ComputeV1EnvironmentListResponseEnvironment
- type ComputeV1EnvironmentNewParams
- type ComputeV1EnvironmentNewResponse
- type ComputeV1EnvironmentNewResponseStatus
- type ComputeV1EnvironmentService
- func (r *ComputeV1EnvironmentService) Delete(ctx context.Context, name string, opts ...option.RequestOption) (res *ComputeV1EnvironmentDeleteResponse, err error)
- func (r *ComputeV1EnvironmentService) Get(ctx context.Context, name string, opts ...option.RequestOption) (res *ComputeV1EnvironmentGetResponse, err error)
- func (r *ComputeV1EnvironmentService) List(ctx context.Context, opts ...option.RequestOption) (res *ComputeV1EnvironmentListResponse, err error)
- func (r *ComputeV1EnvironmentService) New(ctx context.Context, body ComputeV1EnvironmentNewParams, ...) (res *ComputeV1EnvironmentNewResponse, err error)
- func (r *ComputeV1EnvironmentService) SetDefault(ctx context.Context, name string, opts ...option.RequestOption) (res *ComputeV1EnvironmentSetDefaultResponse, err error)
- type ComputeV1EnvironmentSetDefaultResponse
- type ComputeV1GetUsageParams
- type ComputeV1GetUsageResponse
- type ComputeV1GetUsageResponseByEnvironment
- type ComputeV1GetUsageResponsePeriod
- type ComputeV1GetUsageResponseSummary
- type ComputeV1InstanceDeleteResponse
- type ComputeV1InstanceGetResponse
- type ComputeV1InstanceGetResponseSSH
- type ComputeV1InstanceListResponse
- type ComputeV1InstanceListResponseInstance
- type ComputeV1InstanceListResponseInstancesStatus
- type ComputeV1InstanceNewParams
- type ComputeV1InstanceNewResponse
- type ComputeV1InstanceService
- func (r *ComputeV1InstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *ComputeV1InstanceDeleteResponse, err error)
- func (r *ComputeV1InstanceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ComputeV1InstanceGetResponse, err error)
- func (r *ComputeV1InstanceService) List(ctx context.Context, opts ...option.RequestOption) (res *ComputeV1InstanceListResponse, err error)
- func (r *ComputeV1InstanceService) New(ctx context.Context, body ComputeV1InstanceNewParams, ...) (res *ComputeV1InstanceNewResponse, err error)
- type ComputeV1InstanceTypeListResponse
- type ComputeV1InstanceTypeListResponseInstanceType
- type ComputeV1InstanceTypeListResponseInstanceTypesSpecs
- type ComputeV1InstanceTypeService
- type ComputeV1SecretDeleteGroupParams
- type ComputeV1SecretDeleteGroupResponse
- type ComputeV1SecretGetGroupParams
- type ComputeV1SecretGetGroupResponse
- type ComputeV1SecretGetGroupResponseGroup
- type ComputeV1SecretGetGroupResponseKey
- type ComputeV1SecretListParams
- type ComputeV1SecretListResponse
- type ComputeV1SecretListResponseGroup
- type ComputeV1SecretNewParams
- type ComputeV1SecretNewResponse
- type ComputeV1SecretService
- func (r *ComputeV1SecretService) DeleteGroup(ctx context.Context, group string, body ComputeV1SecretDeleteGroupParams, ...) (res *ComputeV1SecretDeleteGroupResponse, err error)
- func (r *ComputeV1SecretService) GetGroup(ctx context.Context, group string, query ComputeV1SecretGetGroupParams, ...) (res *ComputeV1SecretGetGroupResponse, err error)
- func (r *ComputeV1SecretService) List(ctx context.Context, query ComputeV1SecretListParams, ...) (res *ComputeV1SecretListResponse, err error)
- func (r *ComputeV1SecretService) New(ctx context.Context, body ComputeV1SecretNewParams, ...) (res *ComputeV1SecretNewResponse, err error)
- func (r *ComputeV1SecretService) UpdateGroup(ctx context.Context, group string, body ComputeV1SecretUpdateGroupParams, ...) (res *ComputeV1SecretUpdateGroupResponse, err error)
- type ComputeV1SecretUpdateGroupParams
- type ComputeV1SecretUpdateGroupResponse
- type ComputeV1Service
- type DatabaseService
- type DatabaseV1GetUsageResponse
- type DatabaseV1GetUsageResponsePeriod
- type DatabaseV1GetUsageResponsePricing
- type DatabaseV1GetUsageResponseProject
- type DatabaseV1GetUsageResponseProjectsCosts
- type DatabaseV1GetUsageResponseTotals
- type DatabaseV1ProjectDeleteResponse
- type DatabaseV1ProjectGetConnectionParams
- type DatabaseV1ProjectGetConnectionResponse
- type DatabaseV1ProjectGetResponse
- type DatabaseV1ProjectGetResponseBranch
- type DatabaseV1ProjectGetResponseDatabase
- type DatabaseV1ProjectGetResponseLinkedDeployment
- type DatabaseV1ProjectGetResponseLinkedDeploymentsType
- type DatabaseV1ProjectGetResponseStatus
- type DatabaseV1ProjectListBranchesResponse
- type DatabaseV1ProjectListBranchesResponseBranch
- type DatabaseV1ProjectListResponse
- type DatabaseV1ProjectListResponseProject
- type DatabaseV1ProjectListResponseProjectsLinkedDeployment
- type DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType
- type DatabaseV1ProjectListResponseProjectsStatus
- type DatabaseV1ProjectNewBranchParams
- type DatabaseV1ProjectNewBranchResponse
- type DatabaseV1ProjectNewParams
- type DatabaseV1ProjectNewParamsRegion
- type DatabaseV1ProjectNewResponse
- type DatabaseV1ProjectNewResponseDefaultBranch
- type DatabaseV1ProjectNewResponseStatus
- type DatabaseV1ProjectService
- func (r *DatabaseV1ProjectService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *DatabaseV1ProjectDeleteResponse, err error)
- func (r *DatabaseV1ProjectService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *DatabaseV1ProjectGetResponse, err error)
- func (r *DatabaseV1ProjectService) GetConnection(ctx context.Context, id string, query DatabaseV1ProjectGetConnectionParams, ...) (res *DatabaseV1ProjectGetConnectionResponse, err error)
- func (r *DatabaseV1ProjectService) List(ctx context.Context, opts ...option.RequestOption) (res *DatabaseV1ProjectListResponse, err error)
- func (r *DatabaseV1ProjectService) ListBranches(ctx context.Context, id string, opts ...option.RequestOption) (res *DatabaseV1ProjectListBranchesResponse, err error)
- func (r *DatabaseV1ProjectService) New(ctx context.Context, body DatabaseV1ProjectNewParams, ...) (res *DatabaseV1ProjectNewResponse, err error)
- func (r *DatabaseV1ProjectService) NewBranch(ctx context.Context, id string, body DatabaseV1ProjectNewBranchParams, ...) (res *DatabaseV1ProjectNewBranchResponse, err error)
- type DatabaseV1Service
- type Error
- type FormatService
- type FormatV1NewDocumentParams
- type FormatV1NewDocumentParamsInputFormat
- type FormatV1NewDocumentParamsOptions
- type FormatV1NewDocumentParamsOptionsComponent
- type FormatV1NewDocumentParamsOutputFormat
- type FormatV1Service
- type FormatV1TemplateGetResponse
- type FormatV1TemplateListParams
- type FormatV1TemplateListResponse
- type FormatV1TemplateListResponseTemplate
- type FormatV1TemplateNewParams
- type FormatV1TemplateNewParamsType
- type FormatV1TemplateNewResponse
- type FormatV1TemplateService
- func (r *FormatV1TemplateService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *FormatV1TemplateGetResponse, err error)
- func (r *FormatV1TemplateService) List(ctx context.Context, query FormatV1TemplateListParams, ...) (res *FormatV1TemplateListResponse, err error)
- func (r *FormatV1TemplateService) New(ctx context.Context, body FormatV1TemplateNewParams, ...) (res *FormatV1TemplateNewResponse, err error)
- type LegalService
- type LegalV1FindParams
- type LegalV1FindResponse
- type LegalV1FindResponseCandidate
- type LegalV1GetCitationsFromURLParams
- type LegalV1GetCitationsFromURLResponse
- type LegalV1GetCitationsFromURLResponseCitations
- type LegalV1GetCitationsFromURLResponseCitationsCase
- type LegalV1GetCitationsFromURLResponseCitationsRegulation
- type LegalV1GetCitationsFromURLResponseCitationsStatute
- type LegalV1GetCitationsParams
- type LegalV1GetCitationsResponse
- type LegalV1GetCitationsResponseCitation
- type LegalV1GetCitationsResponseCitationsComponents
- type LegalV1GetCitationsResponseCitationsSpan
- type LegalV1GetFullTextParams
- type LegalV1GetFullTextResponse
- type LegalV1ListJurisdictionsParams
- type LegalV1ListJurisdictionsResponse
- type LegalV1ListJurisdictionsResponseJurisdiction
- type LegalV1ListJurisdictionsResponseJurisdictionsLevel
- type LegalV1PatentSearchParams
- type LegalV1PatentSearchParamsApplicationType
- type LegalV1PatentSearchParamsSortBy
- type LegalV1PatentSearchParamsSortOrder
- type LegalV1PatentSearchResponse
- type LegalV1PatentSearchResponseResult
- type LegalV1ResearchParams
- type LegalV1ResearchResponse
- type LegalV1ResearchResponseCandidate
- type LegalV1Service
- func (r *LegalV1Service) Find(ctx context.Context, body LegalV1FindParams, opts ...option.RequestOption) (res *LegalV1FindResponse, err error)
- func (r *LegalV1Service) GetCitations(ctx context.Context, body LegalV1GetCitationsParams, ...) (res *LegalV1GetCitationsResponse, err error)
- func (r *LegalV1Service) GetCitationsFromURL(ctx context.Context, body LegalV1GetCitationsFromURLParams, ...) (res *LegalV1GetCitationsFromURLResponse, err error)
- func (r *LegalV1Service) GetFullText(ctx context.Context, body LegalV1GetFullTextParams, ...) (res *LegalV1GetFullTextResponse, err error)
- func (r *LegalV1Service) ListJurisdictions(ctx context.Context, body LegalV1ListJurisdictionsParams, ...) (res *LegalV1ListJurisdictionsResponse, err error)
- func (r *LegalV1Service) PatentSearch(ctx context.Context, body LegalV1PatentSearchParams, ...) (res *LegalV1PatentSearchResponse, err error)
- func (r *LegalV1Service) Research(ctx context.Context, body LegalV1ResearchParams, opts ...option.RequestOption) (res *LegalV1ResearchResponse, err error)
- func (r *LegalV1Service) Similar(ctx context.Context, body LegalV1SimilarParams, opts ...option.RequestOption) (res *LegalV1SimilarResponse, err error)
- func (r *LegalV1Service) TrademarkSearch(ctx context.Context, body LegalV1TrademarkSearchParams, ...) (res *LegalV1TrademarkSearchResponse, err error)
- func (r *LegalV1Service) Verify(ctx context.Context, body LegalV1VerifyParams, opts ...option.RequestOption) (res *LegalV1VerifyResponse, err error)
- type LegalV1SimilarParams
- type LegalV1SimilarResponse
- type LegalV1SimilarResponseSimilarSource
- type LegalV1TrademarkSearchParams
- type LegalV1TrademarkSearchResponse
- type LegalV1TrademarkSearchResponseGoodsAndService
- type LegalV1TrademarkSearchResponseOwner
- type LegalV1VerifyParams
- type LegalV1VerifyResponse
- type LegalV1VerifyResponseCitation
- type LegalV1VerifyResponseCitationsCandidate
- type LegalV1VerifyResponseCitationsCase
- type LegalV1VerifyResponseCitationsSpan
- type LegalV1VerifyResponseCitationsStatus
- type LegalV1VerifyResponseCitationsVerificationSource
- type LegalV1VerifyResponseSummary
- type LlmGetConfigResponse
- type LlmGetConfigResponseModel
- type LlmService
- type LlmV1ChatNewCompletionParams
- type LlmV1ChatNewCompletionParamsMessage
- type LlmV1ChatNewCompletionParamsMessagesRole
- type LlmV1ChatNewCompletionResponse
- type LlmV1ChatNewCompletionResponseChoice
- type LlmV1ChatNewCompletionResponseChoicesMessage
- type LlmV1ChatNewCompletionResponseUsage
- type LlmV1ChatService
- type LlmV1ListModelsResponse
- type LlmV1ListModelsResponseData
- type LlmV1ListModelsResponseDataPricing
- type LlmV1NewEmbeddingParams
- type LlmV1NewEmbeddingParamsEncodingFormat
- type LlmV1NewEmbeddingParamsInputArray
- type LlmV1NewEmbeddingParamsInputUnion
- type LlmV1NewEmbeddingResponse
- type LlmV1NewEmbeddingResponseData
- type LlmV1NewEmbeddingResponseUsage
- type LlmV1Service
- type MemoryService
- type MemoryV1DeleteAllParams
- type MemoryV1DeleteAllResponse
- type MemoryV1DeleteResponse
- type MemoryV1GetResponse
- type MemoryV1ListParams
- type MemoryV1ListResponse
- type MemoryV1ListResponseResult
- type MemoryV1NewParams
- type MemoryV1NewParamsMessage
- type MemoryV1NewParamsMessagesRole
- type MemoryV1NewResponse
- type MemoryV1NewResponseResult
- type MemoryV1NewResponseResultsEvent
- type MemoryV1SearchParams
- type MemoryV1SearchResponse
- type MemoryV1SearchResponseResult
- type MemoryV1SearchResponseResultsTags
- type MemoryV1Service
- func (r *MemoryV1Service) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MemoryV1DeleteResponse, err error)
- func (r *MemoryV1Service) DeleteAll(ctx context.Context, body MemoryV1DeleteAllParams, ...) (res *MemoryV1DeleteAllResponse, err error)
- func (r *MemoryV1Service) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MemoryV1GetResponse, err error)
- func (r *MemoryV1Service) List(ctx context.Context, query MemoryV1ListParams, opts ...option.RequestOption) (res *MemoryV1ListResponse, err error)
- func (r *MemoryV1Service) New(ctx context.Context, body MemoryV1NewParams, opts ...option.RequestOption) (res *MemoryV1NewResponse, err error)
- func (r *MemoryV1Service) Search(ctx context.Context, body MemoryV1SearchParams, opts ...option.RequestOption) (res *MemoryV1SearchResponse, err error)
- type OcrService
- type OcrV1DownloadParamsType
- type OcrV1GetResponse
- type OcrV1GetResponseStatus
- type OcrV1ProcessParams
- type OcrV1ProcessParamsEngine
- type OcrV1ProcessParamsFeatures
- type OcrV1ProcessParamsFeaturesTables
- type OcrV1ProcessParamsFeaturesTablesFormat
- type OcrV1ProcessResponse
- type OcrV1ProcessResponseStatus
- type OcrV1Service
- func (r *OcrV1Service) Download(ctx context.Context, id string, type_ OcrV1DownloadParamsType, ...) (res *http.Response, err error)
- func (r *OcrV1Service) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OcrV1GetResponse, err error)
- func (r *OcrV1Service) Process(ctx context.Context, body OcrV1ProcessParams, opts ...option.RequestOption) (res *OcrV1ProcessResponse, err error)
- type PrivilegeService
- type PrivilegeV1DetectParams
- type PrivilegeV1DetectParamsCategory
- type PrivilegeV1DetectParamsJurisdiction
- type PrivilegeV1DetectResponse
- type PrivilegeV1DetectResponseCategory
- type PrivilegeV1DetectResponseRecommendation
- type PrivilegeV1Service
- type SearchService
- type SearchV1AnswerParams
- type SearchV1AnswerParamsSearchType
- type SearchV1AnswerResponse
- type SearchV1AnswerResponseCitation
- type SearchV1ContentsParams
- type SearchV1ContentsResponse
- type SearchV1ContentsResponseResult
- type SearchV1GetResearchParams
- type SearchV1GetResearchResponse
- type SearchV1GetResearchResponseModel
- type SearchV1GetResearchResponseResults
- type SearchV1GetResearchResponseResultsSection
- type SearchV1GetResearchResponseResultsSectionsSource
- type SearchV1GetResearchResponseResultsSource
- type SearchV1GetResearchResponseStatus
- type SearchV1ResearchParams
- type SearchV1ResearchParamsModel
- type SearchV1ResearchResponse
- type SearchV1SearchParams
- type SearchV1SearchParamsType
- type SearchV1SearchResponse
- type SearchV1SearchResponseResult
- type SearchV1Service
- func (r *SearchV1Service) Answer(ctx context.Context, body SearchV1AnswerParams, opts ...option.RequestOption) (res *SearchV1AnswerResponse, err error)
- func (r *SearchV1Service) Contents(ctx context.Context, body SearchV1ContentsParams, opts ...option.RequestOption) (res *SearchV1ContentsResponse, err error)
- func (r *SearchV1Service) GetResearch(ctx context.Context, id string, query SearchV1GetResearchParams, ...) (res *SearchV1GetResearchResponse, err error)
- func (r *SearchV1Service) Research(ctx context.Context, body SearchV1ResearchParams, opts ...option.RequestOption) (res *SearchV1ResearchResponse, err error)
- func (r *SearchV1Service) Search(ctx context.Context, body SearchV1SearchParams, opts ...option.RequestOption) (res *SearchV1SearchResponse, err error)
- func (r *SearchV1Service) Similar(ctx context.Context, body SearchV1SimilarParams, opts ...option.RequestOption) (res *SearchV1SimilarResponse, err error)
- type SearchV1SimilarParams
- type SearchV1SimilarResponse
- type SearchV1SimilarResponseResult
- type SuperdocService
- type SuperdocV1AnnotateParams
- type SuperdocV1AnnotateParamsDocument
- type SuperdocV1AnnotateParamsField
- type SuperdocV1AnnotateParamsFieldsOptions
- type SuperdocV1AnnotateParamsFieldsType
- type SuperdocV1AnnotateParamsFieldsValueUnion
- type SuperdocV1AnnotateParamsOutputFormat
- type SuperdocV1ConvertParams
- type SuperdocV1ConvertParamsFrom
- type SuperdocV1ConvertParamsTo
- type SuperdocV1Service
- type SystemListServicesResponse
- type SystemListServicesResponseService
- type SystemService
- type TranslateService
- type TranslateV1DetectParams
- type TranslateV1DetectParamsQArray
- type TranslateV1DetectParamsQUnion
- type TranslateV1DetectResponse
- type TranslateV1DetectResponseData
- type TranslateV1DetectResponseDataDetection
- type TranslateV1ListLanguagesParams
- type TranslateV1ListLanguagesParamsModel
- type TranslateV1ListLanguagesResponse
- type TranslateV1ListLanguagesResponseData
- type TranslateV1ListLanguagesResponseDataLanguage
- type TranslateV1Service
- func (r *TranslateV1Service) Detect(ctx context.Context, body TranslateV1DetectParams, ...) (res *TranslateV1DetectResponse, err error)
- func (r *TranslateV1Service) ListLanguages(ctx context.Context, query TranslateV1ListLanguagesParams, ...) (res *TranslateV1ListLanguagesResponse, err error)
- func (r *TranslateV1Service) Translate(ctx context.Context, body TranslateV1TranslateParams, ...) (res *TranslateV1TranslateResponse, err error)
- type TranslateV1TranslateParams
- type TranslateV1TranslateParamsFormat
- type TranslateV1TranslateParamsModel
- type TranslateV1TranslateParamsQArray
- type TranslateV1TranslateParamsQUnion
- type TranslateV1TranslateResponse
- type TranslateV1TranslateResponseData
- type TranslateV1TranslateResponseDataTranslation
- type VaultConfirmUploadParams
- type VaultConfirmUploadParamsBody
- type VaultConfirmUploadParamsBodySuccess
- type VaultConfirmUploadParamsBodyUnion
- type VaultConfirmUploadParamsBodyVaultConfirmUploadFailure
- type VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess
- type VaultConfirmUploadParamsBodyVaultConfirmUploadSuccess
- type VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess
- type VaultConfirmUploadResponse
- type VaultConfirmUploadResponseStatus
- type VaultDeleteParams
- type VaultDeleteResponse
- type VaultDeleteResponseDeletedVault
- type VaultEventService
- type VaultEventSubscriptionNewParams
- type VaultEventSubscriptionService
- func (r *VaultEventSubscriptionService) Delete(ctx context.Context, id string, subscriptionID string, ...) (err error)
- func (r *VaultEventSubscriptionService) List(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *VaultEventSubscriptionService) New(ctx context.Context, id string, body VaultEventSubscriptionNewParams, ...) (err error)
- func (r *VaultEventSubscriptionService) Test(ctx context.Context, id string, subscriptionID string, ...) (err error)
- func (r *VaultEventSubscriptionService) Update(ctx context.Context, id string, subscriptionID string, ...) (err error)
- type VaultEventSubscriptionTestParams
- type VaultEventSubscriptionUpdateParams
- type VaultGetResponse
- type VaultGetResponseChunkStrategy
- type VaultGraphragGetStatsResponse
- type VaultGraphragGetStatsResponseStatus
- type VaultGraphragInitResponse
- type VaultGraphragProcessObjectResponse
- type VaultGraphragProcessObjectResponseStats
- type VaultGraphragService
- func (r *VaultGraphragService) GetStats(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultGraphragGetStatsResponse, err error)
- func (r *VaultGraphragService) Init(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultGraphragInitResponse, err error)
- func (r *VaultGraphragService) ProcessObject(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultGraphragProcessObjectResponse, err error)
- type VaultGroupService
- func (r *VaultGroupService) Delete(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)
- func (r *VaultGroupService) List(ctx context.Context, opts ...option.RequestOption) (err error)
- func (r *VaultGroupService) New(ctx context.Context, opts ...option.RequestOption) (err error)
- func (r *VaultGroupService) Update(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)
- type VaultIngestResponse
- type VaultIngestResponseStatus
- type VaultListResponse
- type VaultListResponseVault
- type VaultMultipartAbortParams
- type VaultMultipartGetPartURLsParams
- type VaultMultipartGetPartURLsParamsPart
- type VaultMultipartGetPartURLsResponse
- type VaultMultipartGetPartURLsResponseURL
- type VaultMultipartService
- type VaultNewParams
- type VaultNewResponse
- type VaultObjectDeleteParams
- type VaultObjectDeleteParamsForce
- type VaultObjectDeleteResponse
- type VaultObjectDeleteResponseDeletedObject
- type VaultObjectGetOcrWordsParams
- type VaultObjectGetOcrWordsResponse
- type VaultObjectGetOcrWordsResponsePage
- type VaultObjectGetOcrWordsResponsePagesWord
- type VaultObjectGetResponse
- type VaultObjectGetSummarizeJobResponse
- type VaultObjectGetSummarizeJobResponseStatus
- type VaultObjectGetTextResponse
- type VaultObjectGetTextResponseMetadata
- type VaultObjectListResponse
- type VaultObjectListResponseObject
- type VaultObjectNewPresignedURLParams
- type VaultObjectNewPresignedURLParamsOperation
- type VaultObjectNewPresignedURLResponse
- type VaultObjectNewPresignedURLResponseMetadata
- type VaultObjectService
- func (r *VaultObjectService) Delete(ctx context.Context, id string, objectID string, body VaultObjectDeleteParams, ...) (res *VaultObjectDeleteResponse, err error)
- func (r *VaultObjectService) Download(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *http.Response, err error)
- func (r *VaultObjectService) Get(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultObjectGetResponse, err error)
- func (r *VaultObjectService) GetOcrWords(ctx context.Context, id string, objectID string, ...) (res *VaultObjectGetOcrWordsResponse, err error)
- func (r *VaultObjectService) GetSummarizeJob(ctx context.Context, id string, objectID string, jobID string, ...) (res *VaultObjectGetSummarizeJobResponse, err error)
- func (r *VaultObjectService) GetText(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultObjectGetTextResponse, err error)
- func (r *VaultObjectService) List(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultObjectListResponse, err error)
- func (r *VaultObjectService) NewPresignedURL(ctx context.Context, id string, objectID string, ...) (res *VaultObjectNewPresignedURLResponse, err error)
- func (r *VaultObjectService) Update(ctx context.Context, id string, objectID string, body VaultObjectUpdateParams, ...) (res *VaultObjectUpdateResponse, err error)
- type VaultObjectUpdateParams
- type VaultObjectUpdateResponse
- type VaultSearchParams
- type VaultSearchParamsFilters
- type VaultSearchParamsFiltersObjectIDArray
- type VaultSearchParamsFiltersObjectIDUnion
- type VaultSearchParamsMethod
- type VaultSearchResponse
- type VaultSearchResponseChunk
- type VaultSearchResponseSource
- type VaultService
- func (r *VaultService) ConfirmUpload(ctx context.Context, id string, objectID string, body VaultConfirmUploadParams, ...) (res *VaultConfirmUploadResponse, err error)
- func (r *VaultService) Delete(ctx context.Context, id string, body VaultDeleteParams, ...) (res *VaultDeleteResponse, err error)
- func (r *VaultService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultGetResponse, err error)
- func (r *VaultService) Ingest(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultIngestResponse, err error)
- func (r *VaultService) List(ctx context.Context, opts ...option.RequestOption) (res *VaultListResponse, err error)
- func (r *VaultService) New(ctx context.Context, body VaultNewParams, opts ...option.RequestOption) (res *VaultNewResponse, err error)
- func (r *VaultService) Search(ctx context.Context, id string, body VaultSearchParams, ...) (res *VaultSearchResponse, err error)
- func (r *VaultService) Update(ctx context.Context, id string, body VaultUpdateParams, ...) (res *VaultUpdateResponse, err error)
- func (r *VaultService) Upload(ctx context.Context, id string, body VaultUploadParams, ...) (res *VaultUploadResponse, err error)
- type VaultUpdateParams
- type VaultUpdateResponse
- type VaultUploadParams
- type VaultUploadResponse
- type VaultUploadResponseInstructions
- type VoiceService
- type VoiceStreamingGetURLResponse
- type VoiceStreamingGetURLResponseAudioFormat
- type VoiceStreamingGetURLResponsePricing
- type VoiceStreamingService
- type VoiceTranscriptionGetResponse
- type VoiceTranscriptionGetResponseStatus
- type VoiceTranscriptionNewParams
- type VoiceTranscriptionNewParamsBoostParam
- type VoiceTranscriptionNewParamsFormat
- type VoiceTranscriptionNewResponse
- type VoiceTranscriptionNewResponseStatus
- type VoiceTranscriptionService
- func (r *VoiceTranscriptionService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
- func (r *VoiceTranscriptionService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *VoiceTranscriptionGetResponse, err error)
- func (r *VoiceTranscriptionService) New(ctx context.Context, body VoiceTranscriptionNewParams, ...) (res *VoiceTranscriptionNewResponse, err error)
- type VoiceV1ListVoicesParams
- type VoiceV1ListVoicesParamsSort
- type VoiceV1ListVoicesParamsSortDirection
- type VoiceV1ListVoicesParamsVoiceType
- type VoiceV1ListVoicesResponse
- type VoiceV1ListVoicesResponseVoice
- type VoiceV1Service
- type VoiceV1SpeakNewParams
- type VoiceV1SpeakNewParamsModelID
- type VoiceV1SpeakNewParamsOutputFormat
- type VoiceV1SpeakNewParamsVoiceSettings
- type VoiceV1SpeakService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (CASEDEV_API_KEY, CASEDEV_BASE_URL). This should be used to initialize new clients.
func F ¶
F is a param field helper used to initialize a param.Field generic struct. This helps specify null, zero values, and overrides, as well as normal values. You can read more about this in our README.
func Int ¶
Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.
func Raw ¶
Raw is a param field helper for specifying values for fields when the type you are looking to send is different from the type that is specified in the SDK. For example, if the type of the field is an integer, but you want to send a float, you could do that by setting the corresponding field with Raw[int](0.5).
Types ¶
type AgentService ¶ added in v0.2.0
type AgentService struct {
Options []option.RequestOption
V1 *AgentV1Service
}
AgentService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentService method instead.
func NewAgentService ¶ added in v0.2.0
func NewAgentService(opts ...option.RequestOption) (r *AgentService)
NewAgentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type AgentV1AgentDeleteResponse ¶ added in v0.2.0
type AgentV1AgentDeleteResponse struct {
Ok bool `json:"ok"`
JSON agentV1AgentDeleteResponseJSON `json:"-"`
}
func (*AgentV1AgentDeleteResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1AgentDeleteResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1AgentGetResponse ¶ added in v0.2.0
type AgentV1AgentGetResponse struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Description string `json:"description,nullable"`
DisabledTools []string `json:"disabledTools,nullable"`
EnabledTools []string `json:"enabledTools,nullable"`
Instructions string `json:"instructions"`
IsActive bool `json:"isActive"`
Model string `json:"model"`
Name string `json:"name"`
Sandbox interface{} `json:"sandbox,nullable"`
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
VaultIDs []string `json:"vaultIds,nullable"`
JSON agentV1AgentGetResponseJSON `json:"-"`
}
func (*AgentV1AgentGetResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1AgentGetResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1AgentListResponse ¶ added in v0.2.0
type AgentV1AgentListResponse struct {
Agents []AgentV1AgentListResponseAgent `json:"agents"`
JSON agentV1AgentListResponseJSON `json:"-"`
}
func (*AgentV1AgentListResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1AgentListResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1AgentListResponseAgent ¶ added in v0.2.0
type AgentV1AgentListResponseAgent struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Description string `json:"description,nullable"`
IsActive bool `json:"isActive"`
Model string `json:"model"`
Name string `json:"name"`
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
VaultIDs []string `json:"vaultIds,nullable"`
JSON agentV1AgentListResponseAgentJSON `json:"-"`
}
func (*AgentV1AgentListResponseAgent) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1AgentListResponseAgent) UnmarshalJSON(data []byte) (err error)
type AgentV1AgentNewParams ¶ added in v0.2.0
type AgentV1AgentNewParams struct {
// System instructions that define agent behavior
Instructions param.Field[string] `json:"instructions,required"`
// Display name for the agent
Name param.Field[string] `json:"name,required"`
// Optional description of the agent
Description param.Field[string] `json:"description"`
// Denylist of tools the agent cannot use
DisabledTools param.Field[[]string] `json:"disabledTools"`
// Allowlist of tools the agent can use
EnabledTools param.Field[[]string] `json:"enabledTools"`
// LLM model identifier (e.g. anthropic/claude-sonnet-4.6). Defaults to
// anthropic/claude-sonnet-4.6
Model param.Field[string] `json:"model"`
// Custom sandbox configuration (cpu, memoryMiB)
Sandbox param.Field[AgentV1AgentNewParamsSandbox] `json:"sandbox"`
// Restrict agent to specific vault IDs
VaultIDs param.Field[[]string] `json:"vaultIds"`
}
func (AgentV1AgentNewParams) MarshalJSON ¶ added in v0.2.0
func (r AgentV1AgentNewParams) MarshalJSON() (data []byte, err error)
type AgentV1AgentNewParamsSandbox ¶ added in v0.2.0
type AgentV1AgentNewParamsSandbox struct {
// Number of CPUs
CPU param.Field[int64] `json:"cpu"`
// Memory in MiB
MemoryMiB param.Field[int64] `json:"memoryMiB"`
}
Custom sandbox configuration (cpu, memoryMiB)
func (AgentV1AgentNewParamsSandbox) MarshalJSON ¶ added in v0.2.0
func (r AgentV1AgentNewParamsSandbox) MarshalJSON() (data []byte, err error)
type AgentV1AgentNewResponse ¶ added in v0.2.0
type AgentV1AgentNewResponse struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Description string `json:"description,nullable"`
DisabledTools []string `json:"disabledTools,nullable"`
EnabledTools []string `json:"enabledTools,nullable"`
Instructions string `json:"instructions"`
Model string `json:"model"`
Name string `json:"name"`
Sandbox interface{} `json:"sandbox,nullable"`
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
VaultIDs []string `json:"vaultIds,nullable"`
JSON agentV1AgentNewResponseJSON `json:"-"`
}
func (*AgentV1AgentNewResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1AgentNewResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1AgentService ¶ added in v0.2.0
type AgentV1AgentService struct {
Options []option.RequestOption
}
AgentV1AgentService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentV1AgentService method instead.
func NewAgentV1AgentService ¶ added in v0.2.0
func NewAgentV1AgentService(opts ...option.RequestOption) (r *AgentV1AgentService)
NewAgentV1AgentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AgentV1AgentService) Delete ¶ added in v0.2.0
func (r *AgentV1AgentService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1AgentDeleteResponse, err error)
Soft-deletes an agent and revokes its scoped API key.
func (*AgentV1AgentService) Get ¶ added in v0.2.0
func (r *AgentV1AgentService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1AgentGetResponse, err error)
Retrieves a single agent definition by ID.
func (*AgentV1AgentService) List ¶ added in v0.2.0
func (r *AgentV1AgentService) List(ctx context.Context, opts ...option.RequestOption) (res *AgentV1AgentListResponse, err error)
Lists all active agents for the authenticated organization.
func (*AgentV1AgentService) New ¶ added in v0.2.0
func (r *AgentV1AgentService) New(ctx context.Context, body AgentV1AgentNewParams, opts ...option.RequestOption) (res *AgentV1AgentNewResponse, err error)
Creates a new agent definition with a scoped API key. The agent can then be used to create and execute runs.
func (*AgentV1AgentService) Update ¶ added in v0.2.0
func (r *AgentV1AgentService) Update(ctx context.Context, id string, body AgentV1AgentUpdateParams, opts ...option.RequestOption) (res *AgentV1AgentUpdateResponse, err error)
Updates an agent definition. Only provided fields are changed.
type AgentV1AgentUpdateParams ¶ added in v0.2.0
type AgentV1AgentUpdateParams struct {
Description param.Field[string] `json:"description"`
DisabledTools param.Field[[]string] `json:"disabledTools"`
EnabledTools param.Field[[]string] `json:"enabledTools"`
Instructions param.Field[string] `json:"instructions"`
Model param.Field[string] `json:"model"`
Name param.Field[string] `json:"name"`
Sandbox param.Field[interface{}] `json:"sandbox"`
VaultIDs param.Field[[]string] `json:"vaultIds"`
}
func (AgentV1AgentUpdateParams) MarshalJSON ¶ added in v0.2.0
func (r AgentV1AgentUpdateParams) MarshalJSON() (data []byte, err error)
type AgentV1AgentUpdateResponse ¶ added in v0.2.0
type AgentV1AgentUpdateResponse struct {
ID string `json:"id"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Description string `json:"description,nullable"`
DisabledTools []string `json:"disabledTools,nullable"`
EnabledTools []string `json:"enabledTools,nullable"`
Instructions string `json:"instructions"`
IsActive bool `json:"isActive"`
Model string `json:"model"`
Name string `json:"name"`
Sandbox interface{} `json:"sandbox,nullable"`
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
VaultIDs []string `json:"vaultIds,nullable"`
JSON agentV1AgentUpdateResponseJSON `json:"-"`
}
func (*AgentV1AgentUpdateResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1AgentUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1RunCancelResponse ¶ added in v0.2.0
type AgentV1RunCancelResponse struct {
ID string `json:"id"`
// Present if run was already finished
Message string `json:"message"`
Status AgentV1RunCancelResponseStatus `json:"status"`
JSON agentV1RunCancelResponseJSON `json:"-"`
}
func (*AgentV1RunCancelResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunCancelResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1RunCancelResponseStatus ¶ added in v0.2.0
type AgentV1RunCancelResponseStatus string
const ( AgentV1RunCancelResponseStatusCancelled AgentV1RunCancelResponseStatus = "cancelled" AgentV1RunCancelResponseStatusCompleted AgentV1RunCancelResponseStatus = "completed" AgentV1RunCancelResponseStatusFailed AgentV1RunCancelResponseStatus = "failed" )
func (AgentV1RunCancelResponseStatus) IsKnown ¶ added in v0.2.0
func (r AgentV1RunCancelResponseStatus) IsKnown() bool
type AgentV1RunExecResponse ¶ added in v0.2.0
type AgentV1RunExecResponse struct {
ID string `json:"id"`
Message string `json:"message"`
Status AgentV1RunExecResponseStatus `json:"status"`
// Durable workflow run ID
WorkflowID string `json:"workflowId"`
JSON agentV1RunExecResponseJSON `json:"-"`
}
func (*AgentV1RunExecResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunExecResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1RunExecResponseStatus ¶ added in v0.2.0
type AgentV1RunExecResponseStatus string
const (
AgentV1RunExecResponseStatusRunning AgentV1RunExecResponseStatus = "running"
)
func (AgentV1RunExecResponseStatus) IsKnown ¶ added in v0.2.0
func (r AgentV1RunExecResponseStatus) IsKnown() bool
type AgentV1RunGetDetailsResponse ¶ added in v0.2.0
type AgentV1RunGetDetailsResponse struct {
ID string `json:"id"`
AgentID string `json:"agentId"`
CompletedAt time.Time `json:"completedAt,nullable" format:"date-time"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Guidance string `json:"guidance,nullable"`
Model string `json:"model,nullable"`
Prompt string `json:"prompt"`
// Final output from the agent
Result AgentV1RunGetDetailsResponseResult `json:"result,nullable"`
StartedAt time.Time `json:"startedAt,nullable" format:"date-time"`
Status AgentV1RunGetDetailsResponseStatus `json:"status"`
Steps []AgentV1RunGetDetailsResponseStep `json:"steps"`
// Token usage statistics
Usage AgentV1RunGetDetailsResponseUsage `json:"usage,nullable"`
JSON agentV1RunGetDetailsResponseJSON `json:"-"`
}
func (*AgentV1RunGetDetailsResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunGetDetailsResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1RunGetDetailsResponseResult ¶ added in v0.2.0
type AgentV1RunGetDetailsResponseResult struct {
// Sandbox execution logs (OpenCode server + runner script)
Logs AgentV1RunGetDetailsResponseResultLogs `json:"logs,nullable"`
Output string `json:"output"`
JSON agentV1RunGetDetailsResponseResultJSON `json:"-"`
}
Final output from the agent
func (*AgentV1RunGetDetailsResponseResult) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunGetDetailsResponseResult) UnmarshalJSON(data []byte) (err error)
type AgentV1RunGetDetailsResponseResultLogs ¶ added in v0.2.0
type AgentV1RunGetDetailsResponseResultLogs struct {
// OpenCode server stdout/stderr
Opencode string `json:"opencode"`
// Runner script stdout/stderr
Runner string `json:"runner"`
JSON agentV1RunGetDetailsResponseResultLogsJSON `json:"-"`
}
Sandbox execution logs (OpenCode server + runner script)
func (*AgentV1RunGetDetailsResponseResultLogs) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunGetDetailsResponseResultLogs) UnmarshalJSON(data []byte) (err error)
type AgentV1RunGetDetailsResponseStatus ¶ added in v0.2.0
type AgentV1RunGetDetailsResponseStatus string
const ( AgentV1RunGetDetailsResponseStatusQueued AgentV1RunGetDetailsResponseStatus = "queued" AgentV1RunGetDetailsResponseStatusRunning AgentV1RunGetDetailsResponseStatus = "running" AgentV1RunGetDetailsResponseStatusCompleted AgentV1RunGetDetailsResponseStatus = "completed" AgentV1RunGetDetailsResponseStatusFailed AgentV1RunGetDetailsResponseStatus = "failed" AgentV1RunGetDetailsResponseStatusCancelled AgentV1RunGetDetailsResponseStatus = "cancelled" )
func (AgentV1RunGetDetailsResponseStatus) IsKnown ¶ added in v0.2.0
func (r AgentV1RunGetDetailsResponseStatus) IsKnown() bool
type AgentV1RunGetDetailsResponseStep ¶ added in v0.2.0
type AgentV1RunGetDetailsResponseStep struct {
ID string `json:"id"`
Content string `json:"content,nullable"`
DurationMs int64 `json:"durationMs,nullable"`
Timestamp time.Time `json:"timestamp" format:"date-time"`
ToolInput interface{} `json:"toolInput"`
ToolName string `json:"toolName,nullable"`
ToolOutput interface{} `json:"toolOutput"`
Type AgentV1RunGetDetailsResponseStepsType `json:"type"`
JSON agentV1RunGetDetailsResponseStepJSON `json:"-"`
}
func (*AgentV1RunGetDetailsResponseStep) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunGetDetailsResponseStep) UnmarshalJSON(data []byte) (err error)
type AgentV1RunGetDetailsResponseStepsType ¶ added in v0.2.0
type AgentV1RunGetDetailsResponseStepsType string
const ( AgentV1RunGetDetailsResponseStepsTypeOutput AgentV1RunGetDetailsResponseStepsType = "output" AgentV1RunGetDetailsResponseStepsTypeThinking AgentV1RunGetDetailsResponseStepsType = "thinking" AgentV1RunGetDetailsResponseStepsTypeToolCall AgentV1RunGetDetailsResponseStepsType = "tool_call" AgentV1RunGetDetailsResponseStepsTypeToolResult AgentV1RunGetDetailsResponseStepsType = "tool_result" )
func (AgentV1RunGetDetailsResponseStepsType) IsKnown ¶ added in v0.2.0
func (r AgentV1RunGetDetailsResponseStepsType) IsKnown() bool
type AgentV1RunGetDetailsResponseUsage ¶ added in v0.2.0
type AgentV1RunGetDetailsResponseUsage struct {
DurationMs int64 `json:"durationMs"`
InputTokens int64 `json:"inputTokens"`
Model string `json:"model"`
OutputTokens int64 `json:"outputTokens"`
ToolCalls int64 `json:"toolCalls"`
JSON agentV1RunGetDetailsResponseUsageJSON `json:"-"`
}
Token usage statistics
func (*AgentV1RunGetDetailsResponseUsage) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunGetDetailsResponseUsage) UnmarshalJSON(data []byte) (err error)
type AgentV1RunGetStatusResponse ¶ added in v0.2.0
type AgentV1RunGetStatusResponse struct {
ID string `json:"id"`
CompletedAt time.Time `json:"completedAt,nullable" format:"date-time"`
// Elapsed time in milliseconds
DurationMs int64 `json:"durationMs,nullable"`
StartedAt time.Time `json:"startedAt,nullable" format:"date-time"`
Status AgentV1RunGetStatusResponseStatus `json:"status"`
JSON agentV1RunGetStatusResponseJSON `json:"-"`
}
func (*AgentV1RunGetStatusResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunGetStatusResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1RunGetStatusResponseStatus ¶ added in v0.2.0
type AgentV1RunGetStatusResponseStatus string
const ( AgentV1RunGetStatusResponseStatusQueued AgentV1RunGetStatusResponseStatus = "queued" AgentV1RunGetStatusResponseStatusRunning AgentV1RunGetStatusResponseStatus = "running" AgentV1RunGetStatusResponseStatusCompleted AgentV1RunGetStatusResponseStatus = "completed" AgentV1RunGetStatusResponseStatusFailed AgentV1RunGetStatusResponseStatus = "failed" AgentV1RunGetStatusResponseStatusCancelled AgentV1RunGetStatusResponseStatus = "cancelled" )
func (AgentV1RunGetStatusResponseStatus) IsKnown ¶ added in v0.2.0
func (r AgentV1RunGetStatusResponseStatus) IsKnown() bool
type AgentV1RunNewParams ¶ added in v0.2.0
type AgentV1RunNewParams struct {
// ID of the agent to run
AgentID param.Field[string] `json:"agentId,required"`
// Task prompt for the agent
Prompt param.Field[string] `json:"prompt,required"`
// Additional guidance for this run
Guidance param.Field[string] `json:"guidance"`
// Override the agent default model for this run
Model param.Field[string] `json:"model"`
}
func (AgentV1RunNewParams) MarshalJSON ¶ added in v0.2.0
func (r AgentV1RunNewParams) MarshalJSON() (data []byte, err error)
type AgentV1RunNewResponse ¶ added in v0.2.0
type AgentV1RunNewResponse struct {
ID string `json:"id"`
AgentID string `json:"agentId"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Status AgentV1RunNewResponseStatus `json:"status"`
JSON agentV1RunNewResponseJSON `json:"-"`
}
func (*AgentV1RunNewResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunNewResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1RunNewResponseStatus ¶ added in v0.2.0
type AgentV1RunNewResponseStatus string
const (
AgentV1RunNewResponseStatusQueued AgentV1RunNewResponseStatus = "queued"
)
func (AgentV1RunNewResponseStatus) IsKnown ¶ added in v0.2.0
func (r AgentV1RunNewResponseStatus) IsKnown() bool
type AgentV1RunService ¶ added in v0.2.0
type AgentV1RunService struct {
Options []option.RequestOption
}
AgentV1RunService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentV1RunService method instead.
func NewAgentV1RunService ¶ added in v0.2.0
func NewAgentV1RunService(opts ...option.RequestOption) (r *AgentV1RunService)
NewAgentV1RunService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*AgentV1RunService) Cancel ¶ added in v0.2.0
func (r *AgentV1RunService) Cancel(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunCancelResponse, err error)
Cancels a running or queued run. Idempotent — cancelling a finished run returns its current status.
func (*AgentV1RunService) Exec ¶ added in v0.2.0
func (r *AgentV1RunService) Exec(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunExecResponse, err error)
Starts execution of a queued run. The agent runs in a durable workflow — poll /run/:id/status for progress.
func (*AgentV1RunService) GetDetails ¶ added in v0.2.0
func (r *AgentV1RunService) GetDetails(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunGetDetailsResponse, err error)
Full audit trail for a run including output, steps (tool calls, text), and token usage.
func (*AgentV1RunService) GetStatus ¶ added in v0.2.0
func (r *AgentV1RunService) GetStatus(ctx context.Context, id string, opts ...option.RequestOption) (res *AgentV1RunGetStatusResponse, err error)
Lightweight status poll for a run. Use /run/:id/details for the full audit trail.
func (*AgentV1RunService) New ¶ added in v0.2.0
func (r *AgentV1RunService) New(ctx context.Context, body AgentV1RunNewParams, opts ...option.RequestOption) (res *AgentV1RunNewResponse, err error)
Creates a run in queued state. Call POST /agent/v1/run/:id/exec to start execution.
func (*AgentV1RunService) Watch ¶ added in v0.2.0
func (r *AgentV1RunService) Watch(ctx context.Context, id string, body AgentV1RunWatchParams, opts ...option.RequestOption) (res *AgentV1RunWatchResponse, err error)
Register a callback URL to receive notifications when the run completes. URL must use https and must not point to a private network.
type AgentV1RunWatchParams ¶ added in v0.2.0
type AgentV1RunWatchParams struct {
// HTTPS URL to receive completion callback
CallbackURL param.Field[string] `json:"callbackUrl,required" format:"uri"`
}
func (AgentV1RunWatchParams) MarshalJSON ¶ added in v0.2.0
func (r AgentV1RunWatchParams) MarshalJSON() (data []byte, err error)
type AgentV1RunWatchResponse ¶ added in v0.2.0
type AgentV1RunWatchResponse struct {
CallbackURL string `json:"callbackUrl"`
Ok bool `json:"ok"`
JSON agentV1RunWatchResponseJSON `json:"-"`
}
func (*AgentV1RunWatchResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AgentV1RunWatchResponse) UnmarshalJSON(data []byte) (err error)
type AgentV1Service ¶ added in v0.2.0
type AgentV1Service struct {
Options []option.RequestOption
Agents *AgentV1AgentService
Run *AgentV1RunService
}
AgentV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAgentV1Service method instead.
func NewAgentV1Service ¶ added in v0.2.0
func NewAgentV1Service(opts ...option.RequestOption) (r *AgentV1Service)
NewAgentV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ApplicationService ¶
type ApplicationService struct {
Options []option.RequestOption
V1 *ApplicationV1Service
}
ApplicationService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApplicationService method instead.
func NewApplicationService ¶
func NewApplicationService(opts ...option.RequestOption) (r *ApplicationService)
NewApplicationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ApplicationV1DeploymentCancelParams ¶
type ApplicationV1DeploymentCancelParams struct {
// Project ID (for authorization)
ProjectID param.Field[string] `json:"projectId,required"`
}
func (ApplicationV1DeploymentCancelParams) MarshalJSON ¶
func (r ApplicationV1DeploymentCancelParams) MarshalJSON() (data []byte, err error)
type ApplicationV1DeploymentGetLogsParams ¶
type ApplicationV1DeploymentGetLogsParams struct {
// Project ID (for authorization)
ProjectID param.Field[string] `query:"projectId,required"`
}
func (ApplicationV1DeploymentGetLogsParams) URLQuery ¶
func (r ApplicationV1DeploymentGetLogsParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1DeploymentGetLogsParams's query parameters as `url.Values`.
type ApplicationV1DeploymentGetParams ¶
type ApplicationV1DeploymentGetParams struct {
// Project ID (for authorization)
ProjectID param.Field[string] `query:"projectId,required"`
// Include build logs
IncludeLogs param.Field[bool] `query:"includeLogs"`
}
func (ApplicationV1DeploymentGetParams) URLQuery ¶
func (r ApplicationV1DeploymentGetParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1DeploymentGetParams's query parameters as `url.Values`.
type ApplicationV1DeploymentListParams ¶
type ApplicationV1DeploymentListParams struct {
// Project ID
ProjectID param.Field[string] `query:"projectId,required"`
// Maximum number of deployments to return
Limit param.Field[float64] `query:"limit"`
// Filter by deployment state
State param.Field[string] `query:"state"`
// Filter by deployment target
Target param.Field[ApplicationV1DeploymentListParamsTarget] `query:"target"`
}
func (ApplicationV1DeploymentListParams) URLQuery ¶
func (r ApplicationV1DeploymentListParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1DeploymentListParams's query parameters as `url.Values`.
type ApplicationV1DeploymentListParamsTarget ¶
type ApplicationV1DeploymentListParamsTarget string
Filter by deployment target
const ( ApplicationV1DeploymentListParamsTargetProduction ApplicationV1DeploymentListParamsTarget = "production" ApplicationV1DeploymentListParamsTargetStaging ApplicationV1DeploymentListParamsTarget = "staging" )
func (ApplicationV1DeploymentListParamsTarget) IsKnown ¶
func (r ApplicationV1DeploymentListParamsTarget) IsKnown() bool
type ApplicationV1DeploymentNewParams ¶
type ApplicationV1DeploymentNewParams struct {
// Project ID
ProjectID param.Field[string] `json:"projectId,required"`
// Git ref (branch, tag, or commit) to deploy
Ref param.Field[string] `json:"ref"`
// Deployment target
Target param.Field[ApplicationV1DeploymentNewParamsTarget] `json:"target"`
}
func (ApplicationV1DeploymentNewParams) MarshalJSON ¶
func (r ApplicationV1DeploymentNewParams) MarshalJSON() (data []byte, err error)
type ApplicationV1DeploymentNewParamsTarget ¶
type ApplicationV1DeploymentNewParamsTarget string
Deployment target
const ( ApplicationV1DeploymentNewParamsTargetProduction ApplicationV1DeploymentNewParamsTarget = "production" ApplicationV1DeploymentNewParamsTargetPreview ApplicationV1DeploymentNewParamsTarget = "preview" )
func (ApplicationV1DeploymentNewParamsTarget) IsKnown ¶
func (r ApplicationV1DeploymentNewParamsTarget) IsKnown() bool
type ApplicationV1DeploymentService ¶
type ApplicationV1DeploymentService struct {
Options []option.RequestOption
}
ApplicationV1DeploymentService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApplicationV1DeploymentService method instead.
func NewApplicationV1DeploymentService ¶
func NewApplicationV1DeploymentService(opts ...option.RequestOption) (r *ApplicationV1DeploymentService)
NewApplicationV1DeploymentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ApplicationV1DeploymentService) Cancel ¶
func (r *ApplicationV1DeploymentService) Cancel(ctx context.Context, id string, body ApplicationV1DeploymentCancelParams, opts ...option.RequestOption) (err error)
Cancel a running deployment
func (*ApplicationV1DeploymentService) Get ¶
func (r *ApplicationV1DeploymentService) Get(ctx context.Context, id string, query ApplicationV1DeploymentGetParams, opts ...option.RequestOption) (err error)
Get details of a specific deployment including build logs
func (*ApplicationV1DeploymentService) GetLogs ¶
func (r *ApplicationV1DeploymentService) GetLogs(ctx context.Context, id string, query ApplicationV1DeploymentGetLogsParams, opts ...option.RequestOption) (err error)
Get build logs for a specific deployment
func (*ApplicationV1DeploymentService) GetStatus ¶
func (r *ApplicationV1DeploymentService) GetStatus(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Get the current status of a deployment
func (*ApplicationV1DeploymentService) List ¶
func (r *ApplicationV1DeploymentService) List(ctx context.Context, query ApplicationV1DeploymentListParams, opts ...option.RequestOption) (err error)
List deployments for a project
func (*ApplicationV1DeploymentService) New ¶
func (r *ApplicationV1DeploymentService) New(ctx context.Context, body ApplicationV1DeploymentNewParams, opts ...option.RequestOption) (err error)
Trigger a new deployment for a project
func (*ApplicationV1DeploymentService) NewFromFiles ¶
func (r *ApplicationV1DeploymentService) NewFromFiles(ctx context.Context, opts ...option.RequestOption) (err error)
Create a deployment from raw file contents (for Thurgood sandbox deployments)
func (*ApplicationV1DeploymentService) Stream ¶
func (r *ApplicationV1DeploymentService) Stream(ctx context.Context, id string, query ApplicationV1DeploymentStreamParams, opts ...option.RequestOption) (err error)
Stream real-time deployment progress events via Server-Sent Events
type ApplicationV1DeploymentStreamParams ¶
type ApplicationV1DeploymentStreamParams struct {
// Project ID (for authorization)
ProjectID param.Field[string] `query:"projectId,required"`
// Resume stream from this index (for reconnection)
StartIndex param.Field[float64] `query:"startIndex"`
}
func (ApplicationV1DeploymentStreamParams) URLQuery ¶
func (r ApplicationV1DeploymentStreamParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1DeploymentStreamParams's query parameters as `url.Values`.
type ApplicationV1ProjectDeleteParams ¶
type ApplicationV1ProjectDeleteParams struct {
// Also delete the project from hosting (default: true)
DeleteFromHosting param.Field[bool] `query:"deleteFromHosting"`
}
func (ApplicationV1ProjectDeleteParams) URLQuery ¶
func (r ApplicationV1ProjectDeleteParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1ProjectDeleteParams's query parameters as `url.Values`.
type ApplicationV1ProjectGetRuntimeLogsParams ¶
type ApplicationV1ProjectGetRuntimeLogsParams struct {
// Maximum number of logs to return
Limit param.Field[float64] `query:"limit"`
}
func (ApplicationV1ProjectGetRuntimeLogsParams) URLQuery ¶
func (r ApplicationV1ProjectGetRuntimeLogsParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1ProjectGetRuntimeLogsParams's query parameters as `url.Values`.
type ApplicationV1ProjectListDeploymentsParams ¶
type ApplicationV1ProjectListDeploymentsParams struct {
// Maximum number of deployments to return
Limit param.Field[float64] `query:"limit"`
// Filter by deployment state
State param.Field[string] `query:"state"`
// Filter by deployment target
Target param.Field[ApplicationV1ProjectListDeploymentsParamsTarget] `query:"target"`
}
func (ApplicationV1ProjectListDeploymentsParams) URLQuery ¶
func (r ApplicationV1ProjectListDeploymentsParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1ProjectListDeploymentsParams's query parameters as `url.Values`.
type ApplicationV1ProjectListDeploymentsParamsTarget ¶
type ApplicationV1ProjectListDeploymentsParamsTarget string
Filter by deployment target
const ( ApplicationV1ProjectListDeploymentsParamsTargetProduction ApplicationV1ProjectListDeploymentsParamsTarget = "production" ApplicationV1ProjectListDeploymentsParamsTargetStaging ApplicationV1ProjectListDeploymentsParamsTarget = "staging" )
func (ApplicationV1ProjectListDeploymentsParamsTarget) IsKnown ¶
func (r ApplicationV1ProjectListDeploymentsParamsTarget) IsKnown() bool
type ApplicationV1ProjectListEnvParams ¶
type ApplicationV1ProjectListEnvParams struct {
// Whether to decrypt and return values (requires appropriate permissions)
Decrypt param.Field[bool] `query:"decrypt"`
}
func (ApplicationV1ProjectListEnvParams) URLQuery ¶
func (r ApplicationV1ProjectListEnvParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1ProjectListEnvParams's query parameters as `url.Values`.
type ApplicationV1ProjectListResponse ¶
type ApplicationV1ProjectListResponse struct {
Projects []ApplicationV1ProjectListResponseProject `json:"projects"`
JSON applicationV1ProjectListResponseJSON `json:"-"`
}
func (*ApplicationV1ProjectListResponse) UnmarshalJSON ¶
func (r *ApplicationV1ProjectListResponse) UnmarshalJSON(data []byte) (err error)
type ApplicationV1ProjectListResponseProject ¶
type ApplicationV1ProjectListResponseProject struct {
ID string `json:"id"`
CreatedAt string `json:"createdAt"`
Domains []ApplicationV1ProjectListResponseProjectsDomain `json:"domains"`
Framework string `json:"framework"`
GitBranch string `json:"gitBranch"`
GitRepo string `json:"gitRepo"`
Name string `json:"name"`
Status string `json:"status"`
UpdatedAt string `json:"updatedAt"`
VercelProjectID string `json:"vercelProjectId"`
JSON applicationV1ProjectListResponseProjectJSON `json:"-"`
}
func (*ApplicationV1ProjectListResponseProject) UnmarshalJSON ¶
func (r *ApplicationV1ProjectListResponseProject) UnmarshalJSON(data []byte) (err error)
type ApplicationV1ProjectListResponseProjectsDomain ¶
type ApplicationV1ProjectListResponseProjectsDomain struct {
ID string `json:"id"`
Domain string `json:"domain"`
IsPrimary bool `json:"isPrimary"`
IsVerified bool `json:"isVerified"`
JSON applicationV1ProjectListResponseProjectsDomainJSON `json:"-"`
}
func (*ApplicationV1ProjectListResponseProjectsDomain) UnmarshalJSON ¶
func (r *ApplicationV1ProjectListResponseProjectsDomain) UnmarshalJSON(data []byte) (err error)
type ApplicationV1ProjectNewDeploymentParams ¶
type ApplicationV1ProjectNewDeploymentParams struct {
// Additional environment variables to set or update before deployment
EnvironmentVariables param.Field[[]ApplicationV1ProjectNewDeploymentParamsEnvironmentVariable] `json:"environmentVariables"`
}
func (ApplicationV1ProjectNewDeploymentParams) MarshalJSON ¶
func (r ApplicationV1ProjectNewDeploymentParams) MarshalJSON() (data []byte, err error)
type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariable ¶
type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariable struct {
// Environment variable name
Key param.Field[string] `json:"key,required"`
// Deployment targets for this variable
Target param.Field[[]ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget] `json:"target,required"`
// Environment variable value
Value param.Field[string] `json:"value,required"`
// Variable type
Type param.Field[ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType] `json:"type"`
}
func (ApplicationV1ProjectNewDeploymentParamsEnvironmentVariable) MarshalJSON ¶
func (r ApplicationV1ProjectNewDeploymentParamsEnvironmentVariable) MarshalJSON() (data []byte, err error)
type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget ¶
type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget string
const ( ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTargetProduction ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget = "production" ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTargetPreview ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget = "preview" ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTargetDevelopment ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget = "development" )
func (ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget) IsKnown ¶
func (r ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTarget) IsKnown() bool
type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType ¶
type ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType string
Variable type
const ( ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTypePlain ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType = "plain" ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTypeEncrypted ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType = "encrypted" ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesTypeSecret ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType = "secret" )
func (ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType) IsKnown ¶
func (r ApplicationV1ProjectNewDeploymentParamsEnvironmentVariablesType) IsKnown() bool
type ApplicationV1ProjectNewDomainParams ¶
type ApplicationV1ProjectNewDomainParams struct {
// Domain name to add
Domain param.Field[string] `json:"domain,required"`
// Git branch to associate with this domain
GitBranch param.Field[string] `json:"gitBranch"`
}
func (ApplicationV1ProjectNewDomainParams) MarshalJSON ¶
func (r ApplicationV1ProjectNewDomainParams) MarshalJSON() (data []byte, err error)
type ApplicationV1ProjectNewEnvParams ¶
type ApplicationV1ProjectNewEnvParams struct {
// Environment variable name
Key param.Field[string] `json:"key,required"`
// Deployment targets for this variable
Target param.Field[[]ApplicationV1ProjectNewEnvParamsTarget] `json:"target,required"`
// Environment variable value
Value param.Field[string] `json:"value,required"`
// Specific git branch (for preview deployments)
GitBranch param.Field[string] `json:"gitBranch"`
// Variable type
Type param.Field[ApplicationV1ProjectNewEnvParamsType] `json:"type"`
}
func (ApplicationV1ProjectNewEnvParams) MarshalJSON ¶
func (r ApplicationV1ProjectNewEnvParams) MarshalJSON() (data []byte, err error)
type ApplicationV1ProjectNewEnvParamsTarget ¶
type ApplicationV1ProjectNewEnvParamsTarget string
const ( ApplicationV1ProjectNewEnvParamsTargetProduction ApplicationV1ProjectNewEnvParamsTarget = "production" ApplicationV1ProjectNewEnvParamsTargetPreview ApplicationV1ProjectNewEnvParamsTarget = "preview" ApplicationV1ProjectNewEnvParamsTargetDevelopment ApplicationV1ProjectNewEnvParamsTarget = "development" )
func (ApplicationV1ProjectNewEnvParamsTarget) IsKnown ¶
func (r ApplicationV1ProjectNewEnvParamsTarget) IsKnown() bool
type ApplicationV1ProjectNewEnvParamsType ¶
type ApplicationV1ProjectNewEnvParamsType string
Variable type
const ( ApplicationV1ProjectNewEnvParamsTypePlain ApplicationV1ProjectNewEnvParamsType = "plain" ApplicationV1ProjectNewEnvParamsTypeEncrypted ApplicationV1ProjectNewEnvParamsType = "encrypted" ApplicationV1ProjectNewEnvParamsTypeSecret ApplicationV1ProjectNewEnvParamsType = "secret" )
func (ApplicationV1ProjectNewEnvParamsType) IsKnown ¶
func (r ApplicationV1ProjectNewEnvParamsType) IsKnown() bool
type ApplicationV1ProjectNewParams ¶
type ApplicationV1ProjectNewParams struct {
// GitHub repository URL or "owner/repo"
GitRepo param.Field[string] `json:"gitRepo,required"`
// Project name
Name param.Field[string] `json:"name,required"`
// Custom build command
BuildCommand param.Field[string] `json:"buildCommand"`
// Environment variables to set on the project
EnvironmentVariables param.Field[[]ApplicationV1ProjectNewParamsEnvironmentVariable] `json:"environmentVariables"`
// Framework (e.g., "nextjs", "remix", "astro")
Framework param.Field[string] `json:"framework"`
// Git branch to deploy
GitBranch param.Field[string] `json:"gitBranch"`
// Custom install command
InstallCommand param.Field[string] `json:"installCommand"`
// Build output directory
OutputDirectory param.Field[string] `json:"outputDirectory"`
// Root directory of the project
RootDirectory param.Field[string] `json:"rootDirectory"`
}
func (ApplicationV1ProjectNewParams) MarshalJSON ¶
func (r ApplicationV1ProjectNewParams) MarshalJSON() (data []byte, err error)
type ApplicationV1ProjectNewParamsEnvironmentVariable ¶
type ApplicationV1ProjectNewParamsEnvironmentVariable struct {
// Environment variable name
Key param.Field[string] `json:"key,required"`
// Deployment targets for this variable
Target param.Field[[]ApplicationV1ProjectNewParamsEnvironmentVariablesTarget] `json:"target,required"`
// Environment variable value
Value param.Field[string] `json:"value,required"`
// Variable type
Type param.Field[ApplicationV1ProjectNewParamsEnvironmentVariablesType] `json:"type"`
}
func (ApplicationV1ProjectNewParamsEnvironmentVariable) MarshalJSON ¶
func (r ApplicationV1ProjectNewParamsEnvironmentVariable) MarshalJSON() (data []byte, err error)
type ApplicationV1ProjectNewParamsEnvironmentVariablesTarget ¶
type ApplicationV1ProjectNewParamsEnvironmentVariablesTarget string
const ( ApplicationV1ProjectNewParamsEnvironmentVariablesTargetProduction ApplicationV1ProjectNewParamsEnvironmentVariablesTarget = "production" ApplicationV1ProjectNewParamsEnvironmentVariablesTargetPreview ApplicationV1ProjectNewParamsEnvironmentVariablesTarget = "preview" ApplicationV1ProjectNewParamsEnvironmentVariablesTargetDevelopment ApplicationV1ProjectNewParamsEnvironmentVariablesTarget = "development" )
func (ApplicationV1ProjectNewParamsEnvironmentVariablesTarget) IsKnown ¶
func (r ApplicationV1ProjectNewParamsEnvironmentVariablesTarget) IsKnown() bool
type ApplicationV1ProjectNewParamsEnvironmentVariablesType ¶
type ApplicationV1ProjectNewParamsEnvironmentVariablesType string
Variable type
const ( ApplicationV1ProjectNewParamsEnvironmentVariablesTypePlain ApplicationV1ProjectNewParamsEnvironmentVariablesType = "plain" ApplicationV1ProjectNewParamsEnvironmentVariablesTypeEncrypted ApplicationV1ProjectNewParamsEnvironmentVariablesType = "encrypted" ApplicationV1ProjectNewParamsEnvironmentVariablesTypeSecret ApplicationV1ProjectNewParamsEnvironmentVariablesType = "secret" )
func (ApplicationV1ProjectNewParamsEnvironmentVariablesType) IsKnown ¶
func (r ApplicationV1ProjectNewParamsEnvironmentVariablesType) IsKnown() bool
type ApplicationV1ProjectService ¶
type ApplicationV1ProjectService struct {
Options []option.RequestOption
}
ApplicationV1ProjectService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApplicationV1ProjectService method instead.
func NewApplicationV1ProjectService ¶
func NewApplicationV1ProjectService(opts ...option.RequestOption) (r *ApplicationV1ProjectService)
NewApplicationV1ProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ApplicationV1ProjectService) Delete ¶
func (r *ApplicationV1ProjectService) Delete(ctx context.Context, id string, body ApplicationV1ProjectDeleteParams, opts ...option.RequestOption) (err error)
Delete a web application project
func (*ApplicationV1ProjectService) DeleteDomain ¶
func (r *ApplicationV1ProjectService) DeleteDomain(ctx context.Context, id string, domain string, opts ...option.RequestOption) (err error)
Remove a domain from a project
func (*ApplicationV1ProjectService) DeleteEnv ¶
func (r *ApplicationV1ProjectService) DeleteEnv(ctx context.Context, id string, envID string, opts ...option.RequestOption) (err error)
Delete an environment variable from a project
func (*ApplicationV1ProjectService) Get ¶
func (r *ApplicationV1ProjectService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Get details of a specific web application project
func (*ApplicationV1ProjectService) GetRuntimeLogs ¶
func (r *ApplicationV1ProjectService) GetRuntimeLogs(ctx context.Context, id string, query ApplicationV1ProjectGetRuntimeLogsParams, opts ...option.RequestOption) (err error)
Get runtime/function logs for a project
func (*ApplicationV1ProjectService) List ¶
func (r *ApplicationV1ProjectService) List(ctx context.Context, opts ...option.RequestOption) (res *ApplicationV1ProjectListResponse, err error)
List all web application projects
func (*ApplicationV1ProjectService) ListDeployments ¶
func (r *ApplicationV1ProjectService) ListDeployments(ctx context.Context, id string, query ApplicationV1ProjectListDeploymentsParams, opts ...option.RequestOption) (err error)
List deployments for a specific project
func (*ApplicationV1ProjectService) ListDomains ¶
func (r *ApplicationV1ProjectService) ListDomains(ctx context.Context, id string, opts ...option.RequestOption) (err error)
List all domains configured for a project
func (*ApplicationV1ProjectService) ListEnv ¶
func (r *ApplicationV1ProjectService) ListEnv(ctx context.Context, id string, query ApplicationV1ProjectListEnvParams, opts ...option.RequestOption) (err error)
List all environment variables for a project (values are hidden unless decrypt=true)
func (*ApplicationV1ProjectService) New ¶
func (r *ApplicationV1ProjectService) New(ctx context.Context, body ApplicationV1ProjectNewParams, opts ...option.RequestOption) (err error)
Create a new web application project
func (*ApplicationV1ProjectService) NewDeployment ¶
func (r *ApplicationV1ProjectService) NewDeployment(ctx context.Context, id string, body ApplicationV1ProjectNewDeploymentParams, opts ...option.RequestOption) (err error)
Trigger a new deployment for a project.
func (*ApplicationV1ProjectService) NewDomain ¶
func (r *ApplicationV1ProjectService) NewDomain(ctx context.Context, id string, body ApplicationV1ProjectNewDomainParams, opts ...option.RequestOption) (err error)
Add a custom domain to a project
func (*ApplicationV1ProjectService) NewEnv ¶
func (r *ApplicationV1ProjectService) NewEnv(ctx context.Context, id string, body ApplicationV1ProjectNewEnvParams, opts ...option.RequestOption) (err error)
Create a new environment variable for a project
type ApplicationV1Service ¶
type ApplicationV1Service struct {
Options []option.RequestOption
Deployments *ApplicationV1DeploymentService
Projects *ApplicationV1ProjectService
Workflows *ApplicationV1WorkflowService
}
ApplicationV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApplicationV1Service method instead.
func NewApplicationV1Service ¶
func NewApplicationV1Service(opts ...option.RequestOption) (r *ApplicationV1Service)
NewApplicationV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ApplicationV1WorkflowGetStatusParams ¶
type ApplicationV1WorkflowGetStatusParams struct {
// Project ID (for authorization)
ProjectID param.Field[string] `query:"projectId,required"`
}
func (ApplicationV1WorkflowGetStatusParams) URLQuery ¶
func (r ApplicationV1WorkflowGetStatusParams) URLQuery() (v url.Values)
URLQuery serializes ApplicationV1WorkflowGetStatusParams's query parameters as `url.Values`.
type ApplicationV1WorkflowService ¶
type ApplicationV1WorkflowService struct {
Options []option.RequestOption
}
ApplicationV1WorkflowService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewApplicationV1WorkflowService method instead.
func NewApplicationV1WorkflowService ¶
func NewApplicationV1WorkflowService(opts ...option.RequestOption) (r *ApplicationV1WorkflowService)
NewApplicationV1WorkflowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ApplicationV1WorkflowService) GetStatus ¶
func (r *ApplicationV1WorkflowService) GetStatus(ctx context.Context, id string, query ApplicationV1WorkflowGetStatusParams, opts ...option.RequestOption) (err error)
Get current deployment workflow status and accumulated events
type Client ¶
type Client struct {
Options []option.RequestOption
Agent *AgentService
System *SystemService
Applications *ApplicationService
Compute *ComputeService
Database *DatabaseService
Format *FormatService
Legal *LegalService
Llm *LlmService
Memory *MemoryService
Ocr *OcrService
Privilege *PrivilegeService
Search *SearchService
Superdoc *SuperdocService
Translate *TranslateService
Vault *VaultService
Voice *VoiceService
}
Client creates a struct with services and top level methods that help with interacting with the casedev API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r *Client)
NewClient generates a new client with the default option read from the environment (CASEDEV_API_KEY, CASEDEV_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Post ¶
func (r *Client) Post(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error
Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type ComputeService ¶
type ComputeService struct {
Options []option.RequestOption
V1 *ComputeV1Service
}
ComputeService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewComputeService method instead.
func NewComputeService ¶
func NewComputeService(opts ...option.RequestOption) (r *ComputeService)
NewComputeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type ComputeV1EnvironmentDeleteResponse ¶
type ComputeV1EnvironmentDeleteResponse struct {
Message string `json:"message,required"`
Success bool `json:"success,required"`
JSON computeV1EnvironmentDeleteResponseJSON `json:"-"`
}
func (*ComputeV1EnvironmentDeleteResponse) UnmarshalJSON ¶
func (r *ComputeV1EnvironmentDeleteResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1EnvironmentGetResponse ¶
type ComputeV1EnvironmentGetResponse struct {
// Unique environment identifier
ID string `json:"id"`
// Environment creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Environment domain URL
Domain string `json:"domain"`
// Whether this is the default environment
IsDefault bool `json:"isDefault"`
// Environment name
Name string `json:"name"`
// URL-safe environment slug
Slug string `json:"slug"`
// Environment status (active, inactive, etc.)
Status string `json:"status"`
// Environment last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON computeV1EnvironmentGetResponseJSON `json:"-"`
}
func (*ComputeV1EnvironmentGetResponse) UnmarshalJSON ¶
func (r *ComputeV1EnvironmentGetResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1EnvironmentListResponse ¶
type ComputeV1EnvironmentListResponse struct {
Environments []ComputeV1EnvironmentListResponseEnvironment `json:"environments"`
JSON computeV1EnvironmentListResponseJSON `json:"-"`
}
func (*ComputeV1EnvironmentListResponse) UnmarshalJSON ¶
func (r *ComputeV1EnvironmentListResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1EnvironmentListResponseEnvironment ¶
type ComputeV1EnvironmentListResponseEnvironment struct {
// Unique environment identifier
ID string `json:"id"`
// Environment creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Environment domain
Domain string `json:"domain"`
// Whether this is the default environment
IsDefault bool `json:"isDefault"`
// Human-readable environment name
Name string `json:"name"`
// URL-safe environment identifier
Slug string `json:"slug"`
// Environment status
Status string `json:"status"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON computeV1EnvironmentListResponseEnvironmentJSON `json:"-"`
}
func (*ComputeV1EnvironmentListResponseEnvironment) UnmarshalJSON ¶
func (r *ComputeV1EnvironmentListResponseEnvironment) UnmarshalJSON(data []byte) (err error)
type ComputeV1EnvironmentNewParams ¶
type ComputeV1EnvironmentNewParams struct {
// Environment name (alphanumeric, hyphens, and underscores only)
Name param.Field[string] `json:"name,required"`
}
func (ComputeV1EnvironmentNewParams) MarshalJSON ¶
func (r ComputeV1EnvironmentNewParams) MarshalJSON() (data []byte, err error)
type ComputeV1EnvironmentNewResponse ¶
type ComputeV1EnvironmentNewResponse struct {
// Unique environment identifier
ID string `json:"id"`
// Environment creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Unique domain for this environment
Domain string `json:"domain"`
// Whether this is the default environment
IsDefault bool `json:"isDefault"`
// Environment name
Name string `json:"name"`
// URL-friendly slug derived from name
Slug string `json:"slug"`
// Environment status
Status ComputeV1EnvironmentNewResponseStatus `json:"status"`
JSON computeV1EnvironmentNewResponseJSON `json:"-"`
}
func (*ComputeV1EnvironmentNewResponse) UnmarshalJSON ¶
func (r *ComputeV1EnvironmentNewResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1EnvironmentNewResponseStatus ¶
type ComputeV1EnvironmentNewResponseStatus string
Environment status
const ( ComputeV1EnvironmentNewResponseStatusActive ComputeV1EnvironmentNewResponseStatus = "active" ComputeV1EnvironmentNewResponseStatusInactive ComputeV1EnvironmentNewResponseStatus = "inactive" )
func (ComputeV1EnvironmentNewResponseStatus) IsKnown ¶
func (r ComputeV1EnvironmentNewResponseStatus) IsKnown() bool
type ComputeV1EnvironmentService ¶
type ComputeV1EnvironmentService struct {
Options []option.RequestOption
}
ComputeV1EnvironmentService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewComputeV1EnvironmentService method instead.
func NewComputeV1EnvironmentService ¶
func NewComputeV1EnvironmentService(opts ...option.RequestOption) (r *ComputeV1EnvironmentService)
NewComputeV1EnvironmentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ComputeV1EnvironmentService) Delete ¶
func (r *ComputeV1EnvironmentService) Delete(ctx context.Context, name string, opts ...option.RequestOption) (res *ComputeV1EnvironmentDeleteResponse, err error)
Permanently delete a compute environment and all its associated resources. This will stop all running deployments and clean up related configurations. The default environment cannot be deleted if other environments exist.
func (*ComputeV1EnvironmentService) Get ¶
func (r *ComputeV1EnvironmentService) Get(ctx context.Context, name string, opts ...option.RequestOption) (res *ComputeV1EnvironmentGetResponse, err error)
Retrieve a specific compute environment by name. Returns environment configuration including status, domain, and metadata for your serverless compute infrastructure.
func (*ComputeV1EnvironmentService) List ¶
func (r *ComputeV1EnvironmentService) List(ctx context.Context, opts ...option.RequestOption) (res *ComputeV1EnvironmentListResponse, err error)
Retrieve all compute environments for your organization. Environments provide isolated execution contexts for running code and workflows.
func (*ComputeV1EnvironmentService) New ¶
func (r *ComputeV1EnvironmentService) New(ctx context.Context, body ComputeV1EnvironmentNewParams, opts ...option.RequestOption) (res *ComputeV1EnvironmentNewResponse, err error)
Creates a new compute environment for running serverless workloads. Each environment gets its own isolated namespace with a unique domain for hosting applications and APIs. The first environment created becomes the default environment for the organization.
func (*ComputeV1EnvironmentService) SetDefault ¶
func (r *ComputeV1EnvironmentService) SetDefault(ctx context.Context, name string, opts ...option.RequestOption) (res *ComputeV1EnvironmentSetDefaultResponse, err error)
Sets a compute environment as the default for the organization. Only one environment can be default at a time - setting a new default will automatically unset the previous one.
type ComputeV1EnvironmentSetDefaultResponse ¶
type ComputeV1EnvironmentSetDefaultResponse struct {
// Unique environment identifier
ID string `json:"id"`
// Environment creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Environment domain
Domain string `json:"domain"`
// Whether this is the default environment
IsDefault bool `json:"isDefault"`
// Environment name
Name string `json:"name"`
// URL-friendly environment identifier
Slug string `json:"slug"`
// Current environment status
Status string `json:"status"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON computeV1EnvironmentSetDefaultResponseJSON `json:"-"`
}
func (*ComputeV1EnvironmentSetDefaultResponse) UnmarshalJSON ¶
func (r *ComputeV1EnvironmentSetDefaultResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1GetUsageParams ¶
type ComputeV1GetUsageParams struct {
// Month to filter usage data (1-12, defaults to current month)
Month param.Field[int64] `query:"month"`
// Year to filter usage data (defaults to current year)
Year param.Field[int64] `query:"year"`
}
func (ComputeV1GetUsageParams) URLQuery ¶
func (r ComputeV1GetUsageParams) URLQuery() (v url.Values)
URLQuery serializes ComputeV1GetUsageParams's query parameters as `url.Values`.
type ComputeV1GetUsageResponse ¶
type ComputeV1GetUsageResponse struct {
ByEnvironment []ComputeV1GetUsageResponseByEnvironment `json:"byEnvironment"`
Period ComputeV1GetUsageResponsePeriod `json:"period"`
Summary ComputeV1GetUsageResponseSummary `json:"summary"`
JSON computeV1GetUsageResponseJSON `json:"-"`
}
func (*ComputeV1GetUsageResponse) UnmarshalJSON ¶
func (r *ComputeV1GetUsageResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1GetUsageResponseByEnvironment ¶
type ComputeV1GetUsageResponseByEnvironment struct {
Environment string `json:"environment"`
TotalCostCents int64 `json:"totalCostCents"`
TotalCostFormatted string `json:"totalCostFormatted"`
TotalCPUSeconds int64 `json:"totalCpuSeconds"`
TotalGPUSeconds int64 `json:"totalGpuSeconds"`
TotalRuns int64 `json:"totalRuns"`
JSON computeV1GetUsageResponseByEnvironmentJSON `json:"-"`
}
func (*ComputeV1GetUsageResponseByEnvironment) UnmarshalJSON ¶
func (r *ComputeV1GetUsageResponseByEnvironment) UnmarshalJSON(data []byte) (err error)
type ComputeV1GetUsageResponsePeriod ¶
type ComputeV1GetUsageResponsePeriod struct {
Month int64 `json:"month"`
MonthName string `json:"monthName"`
Year int64 `json:"year"`
JSON computeV1GetUsageResponsePeriodJSON `json:"-"`
}
func (*ComputeV1GetUsageResponsePeriod) UnmarshalJSON ¶
func (r *ComputeV1GetUsageResponsePeriod) UnmarshalJSON(data []byte) (err error)
type ComputeV1GetUsageResponseSummary ¶
type ComputeV1GetUsageResponseSummary struct {
TotalCostCents int64 `json:"totalCostCents"`
TotalCostFormatted string `json:"totalCostFormatted"`
TotalCPUHours float64 `json:"totalCpuHours"`
TotalGPUHours float64 `json:"totalGpuHours"`
TotalRuns int64 `json:"totalRuns"`
JSON computeV1GetUsageResponseSummaryJSON `json:"-"`
}
func (*ComputeV1GetUsageResponseSummary) UnmarshalJSON ¶
func (r *ComputeV1GetUsageResponseSummary) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceDeleteResponse ¶
type ComputeV1InstanceDeleteResponse struct {
ID string `json:"id"`
Message string `json:"message"`
Name string `json:"name"`
Status string `json:"status"`
TotalCost string `json:"totalCost"`
TotalRuntimeSeconds int64 `json:"totalRuntimeSeconds"`
JSON computeV1InstanceDeleteResponseJSON `json:"-"`
}
func (*ComputeV1InstanceDeleteResponse) UnmarshalJSON ¶
func (r *ComputeV1InstanceDeleteResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceGetResponse ¶
type ComputeV1InstanceGetResponse struct {
ID string `json:"id"`
AutoShutdownMinutes int64 `json:"autoShutdownMinutes,nullable"`
CreatedAt string `json:"createdAt"`
CurrentCost string `json:"currentCost"`
CurrentRuntimeSeconds int64 `json:"currentRuntimeSeconds"`
GPU string `json:"gpu"`
InstanceType string `json:"instanceType"`
IP string `json:"ip,nullable"`
Name string `json:"name"`
PricePerHour string `json:"pricePerHour"`
Region string `json:"region"`
Specs interface{} `json:"specs"`
SSH ComputeV1InstanceGetResponseSSH `json:"ssh,nullable"`
StartedAt string `json:"startedAt,nullable"`
Status string `json:"status"`
VaultMounts interface{} `json:"vaultMounts,nullable"`
JSON computeV1InstanceGetResponseJSON `json:"-"`
}
func (*ComputeV1InstanceGetResponse) UnmarshalJSON ¶
func (r *ComputeV1InstanceGetResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceGetResponseSSH ¶
type ComputeV1InstanceGetResponseSSH struct {
Command string `json:"command"`
Host string `json:"host"`
Instructions []interface{} `json:"instructions"`
PrivateKey string `json:"privateKey"`
User string `json:"user"`
JSON computeV1InstanceGetResponseSSHJSON `json:"-"`
}
func (*ComputeV1InstanceGetResponseSSH) UnmarshalJSON ¶
func (r *ComputeV1InstanceGetResponseSSH) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceListResponse ¶
type ComputeV1InstanceListResponse struct {
Count int64 `json:"count"`
Instances []ComputeV1InstanceListResponseInstance `json:"instances"`
JSON computeV1InstanceListResponseJSON `json:"-"`
}
func (*ComputeV1InstanceListResponse) UnmarshalJSON ¶
func (r *ComputeV1InstanceListResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceListResponseInstance ¶
type ComputeV1InstanceListResponseInstance struct {
ID string `json:"id"`
AutoShutdownMinutes int64 `json:"autoShutdownMinutes,nullable"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
GPU string `json:"gpu"`
InstanceType string `json:"instanceType"`
IP string `json:"ip,nullable"`
Name string `json:"name"`
PricePerHour string `json:"pricePerHour"`
Region string `json:"region"`
StartedAt time.Time `json:"startedAt,nullable" format:"date-time"`
Status ComputeV1InstanceListResponseInstancesStatus `json:"status"`
TotalCost string `json:"totalCost"`
TotalRuntimeSeconds int64 `json:"totalRuntimeSeconds"`
JSON computeV1InstanceListResponseInstanceJSON `json:"-"`
}
func (*ComputeV1InstanceListResponseInstance) UnmarshalJSON ¶
func (r *ComputeV1InstanceListResponseInstance) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceListResponseInstancesStatus ¶
type ComputeV1InstanceListResponseInstancesStatus string
const ( ComputeV1InstanceListResponseInstancesStatusBooting ComputeV1InstanceListResponseInstancesStatus = "booting" ComputeV1InstanceListResponseInstancesStatusRunning ComputeV1InstanceListResponseInstancesStatus = "running" ComputeV1InstanceListResponseInstancesStatusStopping ComputeV1InstanceListResponseInstancesStatus = "stopping" ComputeV1InstanceListResponseInstancesStatusStopped ComputeV1InstanceListResponseInstancesStatus = "stopped" ComputeV1InstanceListResponseInstancesStatusTerminated ComputeV1InstanceListResponseInstancesStatus = "terminated" ComputeV1InstanceListResponseInstancesStatusFailed ComputeV1InstanceListResponseInstancesStatus = "failed" )
func (ComputeV1InstanceListResponseInstancesStatus) IsKnown ¶
func (r ComputeV1InstanceListResponseInstancesStatus) IsKnown() bool
type ComputeV1InstanceNewParams ¶
type ComputeV1InstanceNewParams struct {
// GPU type (e.g., 'gpu_1x_h100_sxm5')
InstanceType param.Field[string] `json:"instanceType,required"`
// Instance name
Name param.Field[string] `json:"name,required"`
// Region (e.g., 'us-west-1')
Region param.Field[string] `json:"region,required"`
// Auto-shutdown timer (null = never)
AutoShutdownMinutes param.Field[int64] `json:"autoShutdownMinutes"`
// Vault IDs to mount
VaultIDs param.Field[[]string] `json:"vaultIds"`
}
func (ComputeV1InstanceNewParams) MarshalJSON ¶
func (r ComputeV1InstanceNewParams) MarshalJSON() (data []byte, err error)
type ComputeV1InstanceNewResponse ¶
type ComputeV1InstanceNewResponse struct {
ID string `json:"id"`
AutoShutdownMinutes int64 `json:"autoShutdownMinutes,nullable"`
CreatedAt string `json:"createdAt"`
GPU string `json:"gpu"`
InstanceType string `json:"instanceType"`
Message string `json:"message"`
Name string `json:"name"`
PricePerHour string `json:"pricePerHour"`
Region string `json:"region"`
Specs interface{} `json:"specs"`
Status string `json:"status"`
Vaults []interface{} `json:"vaults"`
JSON computeV1InstanceNewResponseJSON `json:"-"`
}
func (*ComputeV1InstanceNewResponse) UnmarshalJSON ¶
func (r *ComputeV1InstanceNewResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceService ¶
type ComputeV1InstanceService struct {
Options []option.RequestOption
}
ComputeV1InstanceService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewComputeV1InstanceService method instead.
func NewComputeV1InstanceService ¶
func NewComputeV1InstanceService(opts ...option.RequestOption) (r *ComputeV1InstanceService)
NewComputeV1InstanceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ComputeV1InstanceService) Delete ¶
func (r *ComputeV1InstanceService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *ComputeV1InstanceDeleteResponse, err error)
Terminates a running GPU instance, calculates final cost, and cleans up SSH keys. This action is permanent and cannot be undone. All data on the instance will be lost.
func (*ComputeV1InstanceService) Get ¶
func (r *ComputeV1InstanceService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *ComputeV1InstanceGetResponse, err error)
Retrieves detailed information about a GPU instance including SSH connection details, vault mount scripts, real-time cost tracking, and current status. SSH private key included for secure access.
func (*ComputeV1InstanceService) List ¶
func (r *ComputeV1InstanceService) List(ctx context.Context, opts ...option.RequestOption) (res *ComputeV1InstanceListResponse, err error)
Retrieves all GPU compute instances for your organization with real-time status updates from Lambda Labs. Includes pricing, runtime metrics, and auto-shutdown configuration. Perfect for monitoring AI workloads, document processing jobs, and cost tracking.
func (*ComputeV1InstanceService) New ¶
func (r *ComputeV1InstanceService) New(ctx context.Context, body ComputeV1InstanceNewParams, opts ...option.RequestOption) (res *ComputeV1InstanceNewResponse, err error)
Launches a new GPU compute instance with automatic SSH key generation. Supports mounting Case.dev Vaults as filesystems and configurable auto-shutdown. Instance boots in ~2-5 minutes. Perfect for batch OCR processing, AI model training, and intensive document analysis workloads.
type ComputeV1InstanceTypeListResponse ¶
type ComputeV1InstanceTypeListResponse struct {
// Total number of instance types
Count int64 `json:"count,required"`
InstanceTypes []ComputeV1InstanceTypeListResponseInstanceType `json:"instanceTypes,required"`
JSON computeV1InstanceTypeListResponseJSON `json:"-"`
}
func (*ComputeV1InstanceTypeListResponse) UnmarshalJSON ¶
func (r *ComputeV1InstanceTypeListResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceTypeListResponseInstanceType ¶
type ComputeV1InstanceTypeListResponseInstanceType struct {
// Instance description
Description string `json:"description"`
// GPU model and count
GPU string `json:"gpu"`
// Instance type identifier
Name string `json:"name"`
// Price per hour (e.g. '$1.20')
PricePerHour string `json:"pricePerHour"`
// Available regions
RegionsAvailable []string `json:"regionsAvailable"`
Specs ComputeV1InstanceTypeListResponseInstanceTypesSpecs `json:"specs"`
JSON computeV1InstanceTypeListResponseInstanceTypeJSON `json:"-"`
}
func (*ComputeV1InstanceTypeListResponseInstanceType) UnmarshalJSON ¶
func (r *ComputeV1InstanceTypeListResponseInstanceType) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceTypeListResponseInstanceTypesSpecs ¶
type ComputeV1InstanceTypeListResponseInstanceTypesSpecs struct {
// RAM in GiB
MemoryGib int64 `json:"memoryGib"`
// Storage in GiB
StorageGib int64 `json:"storageGib"`
// Number of vCPUs
Vcpus int64 `json:"vcpus"`
JSON computeV1InstanceTypeListResponseInstanceTypesSpecsJSON `json:"-"`
}
func (*ComputeV1InstanceTypeListResponseInstanceTypesSpecs) UnmarshalJSON ¶
func (r *ComputeV1InstanceTypeListResponseInstanceTypesSpecs) UnmarshalJSON(data []byte) (err error)
type ComputeV1InstanceTypeService ¶
type ComputeV1InstanceTypeService struct {
Options []option.RequestOption
}
ComputeV1InstanceTypeService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewComputeV1InstanceTypeService method instead.
func NewComputeV1InstanceTypeService ¶
func NewComputeV1InstanceTypeService(opts ...option.RequestOption) (r *ComputeV1InstanceTypeService)
NewComputeV1InstanceTypeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ComputeV1InstanceTypeService) List ¶
func (r *ComputeV1InstanceTypeService) List(ctx context.Context, opts ...option.RequestOption) (res *ComputeV1InstanceTypeListResponse, err error)
Retrieves all available GPU instance types with pricing, specifications, and regional availability. Includes T4, A10, A100, H100, and H200 GPUs powered by Lambda Labs. Perfect for AI model training, inference workloads, and legal document OCR processing at scale.
type ComputeV1SecretDeleteGroupParams ¶
type ComputeV1SecretDeleteGroupParams struct {
// Environment name. If not provided, uses the default environment
Env param.Field[string] `query:"env"`
// Specific key to delete within the group. If not provided, the entire group is
// deleted
Key param.Field[string] `query:"key"`
}
func (ComputeV1SecretDeleteGroupParams) URLQuery ¶
func (r ComputeV1SecretDeleteGroupParams) URLQuery() (v url.Values)
URLQuery serializes ComputeV1SecretDeleteGroupParams's query parameters as `url.Values`.
type ComputeV1SecretDeleteGroupResponse ¶
type ComputeV1SecretDeleteGroupResponse struct {
Message string `json:"message"`
Success bool `json:"success"`
JSON computeV1SecretDeleteGroupResponseJSON `json:"-"`
}
func (*ComputeV1SecretDeleteGroupResponse) UnmarshalJSON ¶
func (r *ComputeV1SecretDeleteGroupResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretGetGroupParams ¶
type ComputeV1SecretGetGroupParams struct {
// Environment name. If not specified, uses the default environment
Env param.Field[string] `query:"env"`
}
func (ComputeV1SecretGetGroupParams) URLQuery ¶
func (r ComputeV1SecretGetGroupParams) URLQuery() (v url.Values)
URLQuery serializes ComputeV1SecretGetGroupParams's query parameters as `url.Values`.
type ComputeV1SecretGetGroupResponse ¶
type ComputeV1SecretGetGroupResponse struct {
Group ComputeV1SecretGetGroupResponseGroup `json:"group"`
Keys []ComputeV1SecretGetGroupResponseKey `json:"keys"`
JSON computeV1SecretGetGroupResponseJSON `json:"-"`
}
func (*ComputeV1SecretGetGroupResponse) UnmarshalJSON ¶
func (r *ComputeV1SecretGetGroupResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretGetGroupResponseGroup ¶
type ComputeV1SecretGetGroupResponseGroup struct {
// Unique identifier of the secret group
ID string `json:"id"`
// Description of the secret group
Description string `json:"description"`
// Name of the secret group
Name string `json:"name"`
JSON computeV1SecretGetGroupResponseGroupJSON `json:"-"`
}
func (*ComputeV1SecretGetGroupResponseGroup) UnmarshalJSON ¶
func (r *ComputeV1SecretGetGroupResponseGroup) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretGetGroupResponseKey ¶
type ComputeV1SecretGetGroupResponseKey struct {
// When the secret was created
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Name of the secret key
Key string `json:"key"`
// When the secret was last updated
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON computeV1SecretGetGroupResponseKeyJSON `json:"-"`
}
func (*ComputeV1SecretGetGroupResponseKey) UnmarshalJSON ¶
func (r *ComputeV1SecretGetGroupResponseKey) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretListParams ¶
type ComputeV1SecretListParams struct {
// Environment name to list secret groups for. If not specified, uses the default
// environment.
Env param.Field[string] `query:"env"`
}
func (ComputeV1SecretListParams) URLQuery ¶
func (r ComputeV1SecretListParams) URLQuery() (v url.Values)
URLQuery serializes ComputeV1SecretListParams's query parameters as `url.Values`.
type ComputeV1SecretListResponse ¶
type ComputeV1SecretListResponse struct {
Groups []ComputeV1SecretListResponseGroup `json:"groups"`
JSON computeV1SecretListResponseJSON `json:"-"`
}
func (*ComputeV1SecretListResponse) UnmarshalJSON ¶
func (r *ComputeV1SecretListResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretListResponseGroup ¶
type ComputeV1SecretListResponseGroup struct {
// Unique identifier for the secret group
ID string `json:"id"`
// When the secret group was created
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Description of the secret group
Description string `json:"description"`
// Name of the secret group
Name string `json:"name"`
// When the secret group was last updated
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON computeV1SecretListResponseGroupJSON `json:"-"`
}
func (*ComputeV1SecretListResponseGroup) UnmarshalJSON ¶
func (r *ComputeV1SecretListResponseGroup) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretNewParams ¶
type ComputeV1SecretNewParams struct {
// Unique name for the secret group. Must contain only letters, numbers, hyphens,
// and underscores.
Name param.Field[string] `json:"name,required"`
// Optional description of the secret group's purpose
Description param.Field[string] `json:"description"`
// Environment name where the secret group will be created. Uses default
// environment if not specified.
Env param.Field[string] `json:"env"`
}
func (ComputeV1SecretNewParams) MarshalJSON ¶
func (r ComputeV1SecretNewParams) MarshalJSON() (data []byte, err error)
type ComputeV1SecretNewResponse ¶
type ComputeV1SecretNewResponse struct {
// Unique identifier for the secret group
ID string `json:"id"`
// Creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Description of the secret group
Description string `json:"description"`
// Name of the secret group
Name string `json:"name"`
JSON computeV1SecretNewResponseJSON `json:"-"`
}
func (*ComputeV1SecretNewResponse) UnmarshalJSON ¶
func (r *ComputeV1SecretNewResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1SecretService ¶
type ComputeV1SecretService struct {
Options []option.RequestOption
}
ComputeV1SecretService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewComputeV1SecretService method instead.
func NewComputeV1SecretService ¶
func NewComputeV1SecretService(opts ...option.RequestOption) (r *ComputeV1SecretService)
NewComputeV1SecretService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ComputeV1SecretService) DeleteGroup ¶
func (r *ComputeV1SecretService) DeleteGroup(ctx context.Context, group string, body ComputeV1SecretDeleteGroupParams, opts ...option.RequestOption) (res *ComputeV1SecretDeleteGroupResponse, err error)
Delete an entire secret group or a specific key within a secret group. When deleting a specific key, the remaining secrets in the group are preserved. When deleting the entire group, all secrets and the group itself are removed.
func (*ComputeV1SecretService) GetGroup ¶
func (r *ComputeV1SecretService) GetGroup(ctx context.Context, group string, query ComputeV1SecretGetGroupParams, opts ...option.RequestOption) (res *ComputeV1SecretGetGroupResponse, err error)
Retrieve the keys (names) of secrets in a specified group within a compute environment. For security reasons, actual secret values are not returned - only the keys and metadata.
func (*ComputeV1SecretService) List ¶
func (r *ComputeV1SecretService) List(ctx context.Context, query ComputeV1SecretListParams, opts ...option.RequestOption) (res *ComputeV1SecretListResponse, err error)
Retrieve all secret groups for a compute environment. Secret groups organize related secrets (API keys, credentials, etc.) that can be securely accessed by compute jobs during execution.
func (*ComputeV1SecretService) New ¶
func (r *ComputeV1SecretService) New(ctx context.Context, body ComputeV1SecretNewParams, opts ...option.RequestOption) (res *ComputeV1SecretNewResponse, err error)
Creates a new secret group in a compute environment. Secret groups organize related secrets for use in serverless functions and workflows. If no environment is specified, the group is created in the default environment.
**Features:**
- Organize secrets by logical groups (e.g., database, APIs, third-party services)
- Environment-based isolation
- Validation of group names
- Conflict detection for existing groups
func (*ComputeV1SecretService) UpdateGroup ¶
func (r *ComputeV1SecretService) UpdateGroup(ctx context.Context, group string, body ComputeV1SecretUpdateGroupParams, opts ...option.RequestOption) (res *ComputeV1SecretUpdateGroupResponse, err error)
Set or update secrets in a compute secret group. Secrets are encrypted with AES-256-GCM. Use this to manage environment variables and API keys for your compute workloads.
type ComputeV1SecretUpdateGroupParams ¶
type ComputeV1SecretUpdateGroupParams struct {
// Key-value pairs of secrets to set
Secrets param.Field[map[string]string] `json:"secrets,required"`
// Environment name (optional, uses default if not specified)
Env param.Field[string] `json:"env"`
}
func (ComputeV1SecretUpdateGroupParams) MarshalJSON ¶
func (r ComputeV1SecretUpdateGroupParams) MarshalJSON() (data []byte, err error)
type ComputeV1SecretUpdateGroupResponse ¶
type ComputeV1SecretUpdateGroupResponse struct {
// Number of new secrets created
Created float64 `json:"created"`
// Name of the secret group
Group string `json:"group"`
Message string `json:"message"`
Success bool `json:"success"`
// Number of existing secrets updated
Updated float64 `json:"updated"`
JSON computeV1SecretUpdateGroupResponseJSON `json:"-"`
}
func (*ComputeV1SecretUpdateGroupResponse) UnmarshalJSON ¶
func (r *ComputeV1SecretUpdateGroupResponse) UnmarshalJSON(data []byte) (err error)
type ComputeV1Service ¶
type ComputeV1Service struct {
Options []option.RequestOption
Environments *ComputeV1EnvironmentService
InstanceTypes *ComputeV1InstanceTypeService
Instances *ComputeV1InstanceService
Secrets *ComputeV1SecretService
}
ComputeV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewComputeV1Service method instead.
func NewComputeV1Service ¶
func NewComputeV1Service(opts ...option.RequestOption) (r *ComputeV1Service)
NewComputeV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*ComputeV1Service) GetPricing ¶
func (r *ComputeV1Service) GetPricing(ctx context.Context, opts ...option.RequestOption) (err error)
Returns current pricing for GPU instances. Prices are fetched in real-time and include a 20% platform fee. For detailed instance types and availability, use GET /compute/v1/instance-types.
func (*ComputeV1Service) GetUsage ¶
func (r *ComputeV1Service) GetUsage(ctx context.Context, query ComputeV1GetUsageParams, opts ...option.RequestOption) (res *ComputeV1GetUsageResponse, err error)
Returns detailed compute usage statistics and billing information for your organization. Includes GPU and CPU hours, total runs, costs, and breakdowns by environment. Use optional query parameters to filter by specific year and month.
type DatabaseService ¶
type DatabaseService struct {
Options []option.RequestOption
V1 *DatabaseV1Service
}
DatabaseService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDatabaseService method instead.
func NewDatabaseService ¶
func NewDatabaseService(opts ...option.RequestOption) (r *DatabaseService)
NewDatabaseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type DatabaseV1GetUsageResponse ¶
type DatabaseV1GetUsageResponse struct {
Period DatabaseV1GetUsageResponsePeriod `json:"period"`
// Current pricing rates
Pricing DatabaseV1GetUsageResponsePricing `json:"pricing"`
// Total number of projects with usage
ProjectCount int64 `json:"projectCount"`
// Usage breakdown by project
Projects []DatabaseV1GetUsageResponseProject `json:"projects"`
// Aggregated totals across all projects
Totals DatabaseV1GetUsageResponseTotals `json:"totals"`
JSON databaseV1GetUsageResponseJSON `json:"-"`
}
func (*DatabaseV1GetUsageResponse) UnmarshalJSON ¶
func (r *DatabaseV1GetUsageResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1GetUsageResponsePeriod ¶
type DatabaseV1GetUsageResponsePeriod struct {
// End of the billing period
End time.Time `json:"end" format:"date-time"`
// Start of the billing period
Start time.Time `json:"start" format:"date-time"`
JSON databaseV1GetUsageResponsePeriodJSON `json:"-"`
}
func (*DatabaseV1GetUsageResponsePeriod) UnmarshalJSON ¶
func (r *DatabaseV1GetUsageResponsePeriod) UnmarshalJSON(data []byte) (err error)
type DatabaseV1GetUsageResponsePricing ¶
type DatabaseV1GetUsageResponsePricing struct {
// Cost per branch per month in dollars
BranchPerMonth float64 `json:"branchPerMonth"`
// Cost per compute unit hour in dollars
ComputePerCuHour float64 `json:"computePerCuHour"`
// Number of free branches included
FreeBranches int64 `json:"freeBranches"`
// Cost per GB of storage per month in dollars
StoragePerGBMonth float64 `json:"storagePerGbMonth"`
// Cost per GB of data transfer in dollars
TransferPerGB float64 `json:"transferPerGb"`
JSON databaseV1GetUsageResponsePricingJSON `json:"-"`
}
Current pricing rates
func (*DatabaseV1GetUsageResponsePricing) UnmarshalJSON ¶
func (r *DatabaseV1GetUsageResponsePricing) UnmarshalJSON(data []byte) (err error)
type DatabaseV1GetUsageResponseProject ¶
type DatabaseV1GetUsageResponseProject struct {
ID string `json:"id"`
BranchCount int64 `json:"branchCount"`
ComputeCuHours float64 `json:"computeCuHours"`
Costs DatabaseV1GetUsageResponseProjectsCosts `json:"costs"`
LastUpdated time.Time `json:"lastUpdated" format:"date-time"`
ProjectID string `json:"projectId"`
ProjectName string `json:"projectName,nullable"`
StorageGBMonths float64 `json:"storageGbMonths"`
TransferGB float64 `json:"transferGb"`
JSON databaseV1GetUsageResponseProjectJSON `json:"-"`
}
func (*DatabaseV1GetUsageResponseProject) UnmarshalJSON ¶
func (r *DatabaseV1GetUsageResponseProject) UnmarshalJSON(data []byte) (err error)
type DatabaseV1GetUsageResponseProjectsCosts ¶
type DatabaseV1GetUsageResponseProjectsCosts struct {
Branches string `json:"branches"`
Compute string `json:"compute"`
Storage string `json:"storage"`
Total string `json:"total"`
Transfer string `json:"transfer"`
JSON databaseV1GetUsageResponseProjectsCostsJSON `json:"-"`
}
func (*DatabaseV1GetUsageResponseProjectsCosts) UnmarshalJSON ¶
func (r *DatabaseV1GetUsageResponseProjectsCosts) UnmarshalJSON(data []byte) (err error)
type DatabaseV1GetUsageResponseTotals ¶
type DatabaseV1GetUsageResponseTotals struct {
// Total branch cost formatted as dollars
BranchCostDollars string `json:"branchCostDollars"`
// Total compute cost formatted as dollars
ComputeCostDollars string `json:"computeCostDollars"`
// Total compute unit hours
ComputeCuHours float64 `json:"computeCuHours"`
// Total storage cost formatted as dollars
StorageCostDollars string `json:"storageCostDollars"`
// Total storage in GB-months
StorageGBMonths float64 `json:"storageGbMonths"`
// Total number of branches
TotalBranches int64 `json:"totalBranches"`
// Total cost formatted as dollars
TotalCostDollars string `json:"totalCostDollars"`
// Total transfer cost formatted as dollars
TransferCostDollars string `json:"transferCostDollars"`
// Total data transfer in GB
TransferGB float64 `json:"transferGb"`
JSON databaseV1GetUsageResponseTotalsJSON `json:"-"`
}
Aggregated totals across all projects
func (*DatabaseV1GetUsageResponseTotals) UnmarshalJSON ¶
func (r *DatabaseV1GetUsageResponseTotals) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectDeleteResponse ¶
type DatabaseV1ProjectDeleteResponse struct {
// Confirmation message
Message string `json:"message,required"`
// Deletion success indicator
Success bool `json:"success,required"`
JSON databaseV1ProjectDeleteResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectDeleteResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectDeleteResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectGetConnectionParams ¶
type DatabaseV1ProjectGetConnectionParams struct {
// Branch name (defaults to 'main')
Branch param.Field[string] `query:"branch"`
// Use pooled connection (PgBouncer)
Pooled param.Field[bool] `query:"pooled"`
}
func (DatabaseV1ProjectGetConnectionParams) URLQuery ¶
func (r DatabaseV1ProjectGetConnectionParams) URLQuery() (v url.Values)
URLQuery serializes DatabaseV1ProjectGetConnectionParams's query parameters as `url.Values`.
type DatabaseV1ProjectGetConnectionResponse ¶
type DatabaseV1ProjectGetConnectionResponse struct {
// Branch name for this connection
Branch string `json:"branch,required"`
// PostgreSQL connection string (includes credentials)
ConnectionUri string `json:"connectionUri,required" format:"uri"`
// Whether this is a pooled connection
Pooled bool `json:"pooled,required"`
JSON databaseV1ProjectGetConnectionResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectGetConnectionResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectGetConnectionResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectGetResponse ¶
type DatabaseV1ProjectGetResponse struct {
// Project ID
ID string `json:"id,required"`
// All branches in this project
Branches []DatabaseV1ProjectGetResponseBranch `json:"branches,required"`
// Total compute time consumed in seconds
ComputeTimeSeconds float64 `json:"computeTimeSeconds,required"`
// Database connection hostname (masked for security)
ConnectionHost string `json:"connectionHost,required"`
// Project creation timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// Databases in the default branch
Databases []DatabaseV1ProjectGetResponseDatabase `json:"databases,required"`
// Linked deployments using this database
LinkedDeployments []DatabaseV1ProjectGetResponseLinkedDeployment `json:"linkedDeployments,required"`
// Project name
Name string `json:"name,required"`
// PostgreSQL major version
PgVersion int64 `json:"pgVersion,required"`
// AWS region
Region string `json:"region,required"`
// Project status
Status DatabaseV1ProjectGetResponseStatus `json:"status,required"`
// Current storage usage in bytes
StorageSizeBytes float64 `json:"storageSizeBytes,required"`
// Project last update timestamp
UpdatedAt time.Time `json:"updatedAt,required" format:"date-time"`
// Project description
Description string `json:"description,nullable"`
JSON databaseV1ProjectGetResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectGetResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectGetResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectGetResponseBranch ¶
type DatabaseV1ProjectGetResponseBranch struct {
// Branch ID
ID string `json:"id"`
// Branch creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Whether this is the default branch
IsDefault bool `json:"isDefault"`
// Branch name
Name string `json:"name"`
// Branch status
Status string `json:"status"`
JSON databaseV1ProjectGetResponseBranchJSON `json:"-"`
}
func (*DatabaseV1ProjectGetResponseBranch) UnmarshalJSON ¶
func (r *DatabaseV1ProjectGetResponseBranch) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectGetResponseDatabase ¶
type DatabaseV1ProjectGetResponseDatabase struct {
// Database ID
ID string `json:"id"`
// Database name
Name string `json:"name"`
// Database owner role name
OwnerName string `json:"ownerName"`
JSON databaseV1ProjectGetResponseDatabaseJSON `json:"-"`
}
func (*DatabaseV1ProjectGetResponseDatabase) UnmarshalJSON ¶
func (r *DatabaseV1ProjectGetResponseDatabase) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectGetResponseLinkedDeployment ¶
type DatabaseV1ProjectGetResponseLinkedDeployment struct {
// Deployment ID
ID string `json:"id"`
// Environment variable name for connection string
EnvVarName string `json:"envVarName"`
// Deployment name
Name string `json:"name"`
// Deployment type
Type DatabaseV1ProjectGetResponseLinkedDeploymentsType `json:"type"`
// Deployment URL
URL string `json:"url"`
JSON databaseV1ProjectGetResponseLinkedDeploymentJSON `json:"-"`
}
func (*DatabaseV1ProjectGetResponseLinkedDeployment) UnmarshalJSON ¶
func (r *DatabaseV1ProjectGetResponseLinkedDeployment) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectGetResponseLinkedDeploymentsType ¶
type DatabaseV1ProjectGetResponseLinkedDeploymentsType string
Deployment type
const ( DatabaseV1ProjectGetResponseLinkedDeploymentsTypeThurgood DatabaseV1ProjectGetResponseLinkedDeploymentsType = "thurgood" DatabaseV1ProjectGetResponseLinkedDeploymentsTypeCompute DatabaseV1ProjectGetResponseLinkedDeploymentsType = "compute" )
func (DatabaseV1ProjectGetResponseLinkedDeploymentsType) IsKnown ¶
func (r DatabaseV1ProjectGetResponseLinkedDeploymentsType) IsKnown() bool
type DatabaseV1ProjectGetResponseStatus ¶
type DatabaseV1ProjectGetResponseStatus string
Project status
const ( DatabaseV1ProjectGetResponseStatusActive DatabaseV1ProjectGetResponseStatus = "active" DatabaseV1ProjectGetResponseStatusSuspended DatabaseV1ProjectGetResponseStatus = "suspended" DatabaseV1ProjectGetResponseStatusDeleted DatabaseV1ProjectGetResponseStatus = "deleted" )
func (DatabaseV1ProjectGetResponseStatus) IsKnown ¶
func (r DatabaseV1ProjectGetResponseStatus) IsKnown() bool
type DatabaseV1ProjectListBranchesResponse ¶
type DatabaseV1ProjectListBranchesResponse struct {
Branches []DatabaseV1ProjectListBranchesResponseBranch `json:"branches,required"`
JSON databaseV1ProjectListBranchesResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectListBranchesResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectListBranchesResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectListBranchesResponseBranch ¶
type DatabaseV1ProjectListBranchesResponseBranch struct {
// Branch ID
ID string `json:"id"`
// Branch creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Whether this is the default branch
IsDefault bool `json:"isDefault"`
// Branch name
Name string `json:"name"`
// Parent branch ID (null for default branch)
ParentBranchID string `json:"parentBranchId,nullable"`
// Branch status
Status string `json:"status"`
// Branch last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON databaseV1ProjectListBranchesResponseBranchJSON `json:"-"`
}
func (*DatabaseV1ProjectListBranchesResponseBranch) UnmarshalJSON ¶
func (r *DatabaseV1ProjectListBranchesResponseBranch) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectListResponse ¶
type DatabaseV1ProjectListResponse struct {
Projects []DatabaseV1ProjectListResponseProject `json:"projects,required"`
JSON databaseV1ProjectListResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectListResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectListResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectListResponseProject ¶
type DatabaseV1ProjectListResponseProject struct {
// Project ID
ID string `json:"id"`
// Total compute time consumed in seconds
ComputeTimeSeconds float64 `json:"computeTimeSeconds"`
// Project creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Project description
Description string `json:"description,nullable"`
// Linked application deployments using this database
LinkedDeployments []DatabaseV1ProjectListResponseProjectsLinkedDeployment `json:"linkedDeployments"`
// Project name
Name string `json:"name"`
// PostgreSQL major version
PgVersion int64 `json:"pgVersion"`
// AWS region where database is deployed
Region string `json:"region"`
// Current project status
Status DatabaseV1ProjectListResponseProjectsStatus `json:"status"`
// Current storage usage in bytes
StorageSizeBytes float64 `json:"storageSizeBytes"`
// Project last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON databaseV1ProjectListResponseProjectJSON `json:"-"`
}
func (*DatabaseV1ProjectListResponseProject) UnmarshalJSON ¶
func (r *DatabaseV1ProjectListResponseProject) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectListResponseProjectsLinkedDeployment ¶
type DatabaseV1ProjectListResponseProjectsLinkedDeployment struct {
// Deployment ID
ID string `json:"id"`
// Deployment name
Name string `json:"name"`
// Type of deployment
Type DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType `json:"type"`
// Deployment URL (for Thurgood apps)
URL string `json:"url"`
JSON databaseV1ProjectListResponseProjectsLinkedDeploymentJSON `json:"-"`
}
func (*DatabaseV1ProjectListResponseProjectsLinkedDeployment) UnmarshalJSON ¶
func (r *DatabaseV1ProjectListResponseProjectsLinkedDeployment) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType ¶
type DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType string
Type of deployment
const ( DatabaseV1ProjectListResponseProjectsLinkedDeploymentsTypeThurgood DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType = "thurgood" DatabaseV1ProjectListResponseProjectsLinkedDeploymentsTypeCompute DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType = "compute" )
func (DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType) IsKnown ¶
func (r DatabaseV1ProjectListResponseProjectsLinkedDeploymentsType) IsKnown() bool
type DatabaseV1ProjectListResponseProjectsStatus ¶
type DatabaseV1ProjectListResponseProjectsStatus string
Current project status
const ( DatabaseV1ProjectListResponseProjectsStatusActive DatabaseV1ProjectListResponseProjectsStatus = "active" DatabaseV1ProjectListResponseProjectsStatusSuspended DatabaseV1ProjectListResponseProjectsStatus = "suspended" DatabaseV1ProjectListResponseProjectsStatusDeleted DatabaseV1ProjectListResponseProjectsStatus = "deleted" )
func (DatabaseV1ProjectListResponseProjectsStatus) IsKnown ¶
func (r DatabaseV1ProjectListResponseProjectsStatus) IsKnown() bool
type DatabaseV1ProjectNewBranchParams ¶
type DatabaseV1ProjectNewBranchParams struct {
// Branch name (letters, numbers, hyphens, underscores only)
Name param.Field[string] `json:"name,required"`
// Parent branch ID to clone from (defaults to main branch)
ParentBranchID param.Field[string] `json:"parentBranchId"`
}
func (DatabaseV1ProjectNewBranchParams) MarshalJSON ¶
func (r DatabaseV1ProjectNewBranchParams) MarshalJSON() (data []byte, err error)
type DatabaseV1ProjectNewBranchResponse ¶
type DatabaseV1ProjectNewBranchResponse struct {
// Branch ID
ID string `json:"id,required"`
// Branch creation timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// Whether this is the default branch (always false for new branches)
IsDefault bool `json:"isDefault,required"`
// Branch name
Name string `json:"name,required"`
// Parent branch ID
ParentBranchID string `json:"parentBranchId,required,nullable"`
// Branch status
Status string `json:"status,required"`
JSON databaseV1ProjectNewBranchResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectNewBranchResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectNewBranchResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectNewParams ¶
type DatabaseV1ProjectNewParams struct {
// Project name (letters, numbers, hyphens, underscores only)
Name param.Field[string] `json:"name,required"`
// Optional project description
Description param.Field[string] `json:"description"`
// AWS region for database deployment
Region param.Field[DatabaseV1ProjectNewParamsRegion] `json:"region"`
}
func (DatabaseV1ProjectNewParams) MarshalJSON ¶
func (r DatabaseV1ProjectNewParams) MarshalJSON() (data []byte, err error)
type DatabaseV1ProjectNewParamsRegion ¶
type DatabaseV1ProjectNewParamsRegion string
AWS region for database deployment
const ( DatabaseV1ProjectNewParamsRegionAwsUsEast1 DatabaseV1ProjectNewParamsRegion = "aws-us-east-1" DatabaseV1ProjectNewParamsRegionAwsUsEast2 DatabaseV1ProjectNewParamsRegion = "aws-us-east-2" DatabaseV1ProjectNewParamsRegionAwsUsWest2 DatabaseV1ProjectNewParamsRegion = "aws-us-west-2" DatabaseV1ProjectNewParamsRegionAwsEuCentral1 DatabaseV1ProjectNewParamsRegion = "aws-eu-central-1" DatabaseV1ProjectNewParamsRegionAwsEuWest1 DatabaseV1ProjectNewParamsRegion = "aws-eu-west-1" DatabaseV1ProjectNewParamsRegionAwsEuWest2 DatabaseV1ProjectNewParamsRegion = "aws-eu-west-2" DatabaseV1ProjectNewParamsRegionAwsApSoutheast1 DatabaseV1ProjectNewParamsRegion = "aws-ap-southeast-1" DatabaseV1ProjectNewParamsRegionAwsApSoutheast2 DatabaseV1ProjectNewParamsRegion = "aws-ap-southeast-2" )
func (DatabaseV1ProjectNewParamsRegion) IsKnown ¶
func (r DatabaseV1ProjectNewParamsRegion) IsKnown() bool
type DatabaseV1ProjectNewResponse ¶
type DatabaseV1ProjectNewResponse struct {
// Project ID
ID string `json:"id,required"`
// Project creation timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// Default 'main' branch details
DefaultBranch DatabaseV1ProjectNewResponseDefaultBranch `json:"defaultBranch,required"`
// Project name
Name string `json:"name,required"`
// PostgreSQL major version
PgVersion int64 `json:"pgVersion,required"`
// AWS region
Region string `json:"region,required"`
// Project status
Status DatabaseV1ProjectNewResponseStatus `json:"status,required"`
// Project description
Description string `json:"description,nullable"`
JSON databaseV1ProjectNewResponseJSON `json:"-"`
}
func (*DatabaseV1ProjectNewResponse) UnmarshalJSON ¶
func (r *DatabaseV1ProjectNewResponse) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectNewResponseDefaultBranch ¶
type DatabaseV1ProjectNewResponseDefaultBranch struct {
// Branch ID
ID string `json:"id"`
// Branch name
Name string `json:"name"`
JSON databaseV1ProjectNewResponseDefaultBranchJSON `json:"-"`
}
Default 'main' branch details
func (*DatabaseV1ProjectNewResponseDefaultBranch) UnmarshalJSON ¶
func (r *DatabaseV1ProjectNewResponseDefaultBranch) UnmarshalJSON(data []byte) (err error)
type DatabaseV1ProjectNewResponseStatus ¶
type DatabaseV1ProjectNewResponseStatus string
Project status
const ( DatabaseV1ProjectNewResponseStatusActive DatabaseV1ProjectNewResponseStatus = "active" DatabaseV1ProjectNewResponseStatusSuspended DatabaseV1ProjectNewResponseStatus = "suspended" DatabaseV1ProjectNewResponseStatusDeleted DatabaseV1ProjectNewResponseStatus = "deleted" )
func (DatabaseV1ProjectNewResponseStatus) IsKnown ¶
func (r DatabaseV1ProjectNewResponseStatus) IsKnown() bool
type DatabaseV1ProjectService ¶
type DatabaseV1ProjectService struct {
Options []option.RequestOption
}
DatabaseV1ProjectService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDatabaseV1ProjectService method instead.
func NewDatabaseV1ProjectService ¶
func NewDatabaseV1ProjectService(opts ...option.RequestOption) (r *DatabaseV1ProjectService)
NewDatabaseV1ProjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DatabaseV1ProjectService) Delete ¶
func (r *DatabaseV1ProjectService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *DatabaseV1ProjectDeleteResponse, err error)
Permanently deletes a database project from Neon and marks it as deleted in Case.dev. This action cannot be undone and will destroy all data including branches and databases. Use with caution.
func (*DatabaseV1ProjectService) Get ¶
func (r *DatabaseV1ProjectService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *DatabaseV1ProjectGetResponse, err error)
Retrieves detailed information about a specific database project including branches, databases, storage/compute metrics, connection host, and linked deployments. Fetches live usage statistics from Neon API.
func (*DatabaseV1ProjectService) GetConnection ¶
func (r *DatabaseV1ProjectService) GetConnection(ctx context.Context, id string, query DatabaseV1ProjectGetConnectionParams, opts ...option.RequestOption) (res *DatabaseV1ProjectGetConnectionResponse, err error)
Retrieves the PostgreSQL connection URI for a database project. Supports selecting specific branches and pooled vs direct connections. Connection strings include credentials and should be stored securely. Use for configuring applications and deployment environments.
func (*DatabaseV1ProjectService) List ¶
func (r *DatabaseV1ProjectService) List(ctx context.Context, opts ...option.RequestOption) (res *DatabaseV1ProjectListResponse, err error)
Retrieves all serverless Postgres database projects for the authenticated organization. Includes storage and compute metrics, plus linked deployments from Thurgood apps and Compute instances.
func (*DatabaseV1ProjectService) ListBranches ¶
func (r *DatabaseV1ProjectService) ListBranches(ctx context.Context, id string, opts ...option.RequestOption) (res *DatabaseV1ProjectListBranchesResponse, err error)
Retrieves all branches for a database project. Branches enable isolated development and testing environments with instant point-in-time cloning. Each branch includes the default branch and any custom branches created for staging, testing, or feature development.
func (*DatabaseV1ProjectService) New ¶
func (r *DatabaseV1ProjectService) New(ctx context.Context, body DatabaseV1ProjectNewParams, opts ...option.RequestOption) (res *DatabaseV1ProjectNewResponse, err error)
Creates a new serverless Postgres database project powered by Neon. Includes automatic scaling, connection pooling, and a default 'main' branch with 'neondb' database. Supports branching for isolated dev/staging environments. Perfect for case management applications, document workflows, and litigation support systems.
func (*DatabaseV1ProjectService) NewBranch ¶
func (r *DatabaseV1ProjectService) NewBranch(ctx context.Context, id string, body DatabaseV1ProjectNewBranchParams, opts ...option.RequestOption) (res *DatabaseV1ProjectNewBranchResponse, err error)
Creates a new branch from the specified parent branch (or default 'main' branch). Branches provide instant point-in-time clones of your database for isolated development, staging, testing, or feature work. Perfect for testing schema changes, running migrations safely, or creating ephemeral preview environments.
type DatabaseV1Service ¶
type DatabaseV1Service struct {
Options []option.RequestOption
Projects *DatabaseV1ProjectService
}
DatabaseV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewDatabaseV1Service method instead.
func NewDatabaseV1Service ¶
func NewDatabaseV1Service(opts ...option.RequestOption) (r *DatabaseV1Service)
NewDatabaseV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*DatabaseV1Service) GetUsage ¶
func (r *DatabaseV1Service) GetUsage(ctx context.Context, opts ...option.RequestOption) (res *DatabaseV1GetUsageResponse, err error)
Returns detailed database usage statistics and billing information for the current billing period. Includes compute hours, storage, data transfer, and branch counts with associated costs broken down by project.
type FormatService ¶
type FormatService struct {
Options []option.RequestOption
V1 *FormatV1Service
}
FormatService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFormatService method instead.
func NewFormatService ¶
func NewFormatService(opts ...option.RequestOption) (r *FormatService)
NewFormatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type FormatV1NewDocumentParams ¶
type FormatV1NewDocumentParams struct {
// The source content to format
Content param.Field[string] `json:"content,required"`
// Desired output format
OutputFormat param.Field[FormatV1NewDocumentParamsOutputFormat] `json:"output_format,required"`
// Format of the input content
InputFormat param.Field[FormatV1NewDocumentParamsInputFormat] `json:"input_format"`
Options param.Field[FormatV1NewDocumentParamsOptions] `json:"options"`
}
func (FormatV1NewDocumentParams) MarshalJSON ¶
func (r FormatV1NewDocumentParams) MarshalJSON() (data []byte, err error)
type FormatV1NewDocumentParamsInputFormat ¶
type FormatV1NewDocumentParamsInputFormat string
Format of the input content
const ( FormatV1NewDocumentParamsInputFormatMd FormatV1NewDocumentParamsInputFormat = "md" FormatV1NewDocumentParamsInputFormatJson FormatV1NewDocumentParamsInputFormat = "json" FormatV1NewDocumentParamsInputFormatText FormatV1NewDocumentParamsInputFormat = "text" )
func (FormatV1NewDocumentParamsInputFormat) IsKnown ¶
func (r FormatV1NewDocumentParamsInputFormat) IsKnown() bool
type FormatV1NewDocumentParamsOptions ¶
type FormatV1NewDocumentParamsOptions struct {
// Template components with variables
Components param.Field[[]FormatV1NewDocumentParamsOptionsComponent] `json:"components"`
}
func (FormatV1NewDocumentParamsOptions) MarshalJSON ¶
func (r FormatV1NewDocumentParamsOptions) MarshalJSON() (data []byte, err error)
type FormatV1NewDocumentParamsOptionsComponent ¶
type FormatV1NewDocumentParamsOptionsComponent struct {
// Inline template content
Content param.Field[string] `json:"content"`
// Custom styling options
Styles param.Field[interface{}] `json:"styles"`
// ID of saved template component
TemplateID param.Field[string] `json:"templateId"`
// Variables for template interpolation
Variables param.Field[interface{}] `json:"variables"`
}
func (FormatV1NewDocumentParamsOptionsComponent) MarshalJSON ¶
func (r FormatV1NewDocumentParamsOptionsComponent) MarshalJSON() (data []byte, err error)
type FormatV1NewDocumentParamsOutputFormat ¶
type FormatV1NewDocumentParamsOutputFormat string
Desired output format
const ( FormatV1NewDocumentParamsOutputFormatPdf FormatV1NewDocumentParamsOutputFormat = "pdf" FormatV1NewDocumentParamsOutputFormatDocx FormatV1NewDocumentParamsOutputFormat = "docx" FormatV1NewDocumentParamsOutputFormatHTMLPreview FormatV1NewDocumentParamsOutputFormat = "html_preview" )
func (FormatV1NewDocumentParamsOutputFormat) IsKnown ¶
func (r FormatV1NewDocumentParamsOutputFormat) IsKnown() bool
type FormatV1Service ¶
type FormatV1Service struct {
Options []option.RequestOption
Templates *FormatV1TemplateService
}
FormatV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFormatV1Service method instead.
func NewFormatV1Service ¶
func NewFormatV1Service(opts ...option.RequestOption) (r *FormatV1Service)
NewFormatV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FormatV1Service) NewDocument ¶
func (r *FormatV1Service) NewDocument(ctx context.Context, body FormatV1NewDocumentParams, opts ...option.RequestOption) (res *http.Response, err error)
Convert Markdown, JSON, or text content to professionally formatted PDF, DOCX, or HTML documents. Supports template components with variable interpolation for creating consistent legal documents like contracts, briefs, and reports.
type FormatV1TemplateGetResponse ¶
type FormatV1TemplateGetResponse struct {
// Unique template identifier
ID string `json:"id"`
// Template formatting rules and structure
Content interface{} `json:"content"`
// Template creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Template description
Description string `json:"description"`
// Template name
Name string `json:"name"`
// Organization ID that owns the template
OrganizationID string `json:"organizationId"`
// Template last modification timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
JSON formatV1TemplateGetResponseJSON `json:"-"`
}
func (*FormatV1TemplateGetResponse) UnmarshalJSON ¶
func (r *FormatV1TemplateGetResponse) UnmarshalJSON(data []byte) (err error)
type FormatV1TemplateListParams ¶
type FormatV1TemplateListParams struct {
// Filter templates by type (e.g., contract, pleading, letter)
Type param.Field[string] `query:"type"`
}
func (FormatV1TemplateListParams) URLQuery ¶
func (r FormatV1TemplateListParams) URLQuery() (v url.Values)
URLQuery serializes FormatV1TemplateListParams's query parameters as `url.Values`.
type FormatV1TemplateListResponse ¶
type FormatV1TemplateListResponse struct {
Templates []FormatV1TemplateListResponseTemplate `json:"templates"`
JSON formatV1TemplateListResponseJSON `json:"-"`
}
func (*FormatV1TemplateListResponse) UnmarshalJSON ¶
func (r *FormatV1TemplateListResponse) UnmarshalJSON(data []byte) (err error)
type FormatV1TemplateListResponseTemplate ¶
type FormatV1TemplateListResponseTemplate struct {
// Unique template identifier
ID string `json:"id"`
// Template creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Template description
Description string `json:"description"`
// Template name
Name string `json:"name"`
// Template tags for organization
Tags []interface{} `json:"tags"`
// Template type/category
Type string `json:"type"`
// Number of times template has been used
UsageCount int64 `json:"usageCount"`
// Template variables for customization
Variables []interface{} `json:"variables"`
JSON formatV1TemplateListResponseTemplateJSON `json:"-"`
}
func (*FormatV1TemplateListResponseTemplate) UnmarshalJSON ¶
func (r *FormatV1TemplateListResponseTemplate) UnmarshalJSON(data []byte) (err error)
type FormatV1TemplateNewParams ¶
type FormatV1TemplateNewParams struct {
// Template content with {{variable}} placeholders
Content param.Field[string] `json:"content,required"`
// Template name
Name param.Field[string] `json:"name,required"`
// Template type
Type param.Field[FormatV1TemplateNewParamsType] `json:"type,required"`
// Template description
Description param.Field[string] `json:"description"`
// CSS styles for the template
Styles param.Field[interface{}] `json:"styles"`
// Template tags for organization
Tags param.Field[[]string] `json:"tags"`
// Template variables (auto-detected if not provided)
Variables param.Field[[]string] `json:"variables"`
}
func (FormatV1TemplateNewParams) MarshalJSON ¶
func (r FormatV1TemplateNewParams) MarshalJSON() (data []byte, err error)
type FormatV1TemplateNewParamsType ¶
type FormatV1TemplateNewParamsType string
Template type
const ( FormatV1TemplateNewParamsTypeCaption FormatV1TemplateNewParamsType = "caption" FormatV1TemplateNewParamsTypeSignature FormatV1TemplateNewParamsType = "signature" FormatV1TemplateNewParamsTypeLetterhead FormatV1TemplateNewParamsType = "letterhead" FormatV1TemplateNewParamsTypeCertificate FormatV1TemplateNewParamsType = "certificate" FormatV1TemplateNewParamsTypeCustom FormatV1TemplateNewParamsType = "custom" )
func (FormatV1TemplateNewParamsType) IsKnown ¶
func (r FormatV1TemplateNewParamsType) IsKnown() bool
type FormatV1TemplateNewResponse ¶
type FormatV1TemplateNewResponse struct {
// Template ID
ID string `json:"id"`
// Creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Template name
Name string `json:"name"`
// Template type
Type string `json:"type"`
// Detected template variables
Variables []string `json:"variables"`
JSON formatV1TemplateNewResponseJSON `json:"-"`
}
func (*FormatV1TemplateNewResponse) UnmarshalJSON ¶
func (r *FormatV1TemplateNewResponse) UnmarshalJSON(data []byte) (err error)
type FormatV1TemplateService ¶
type FormatV1TemplateService struct {
Options []option.RequestOption
}
FormatV1TemplateService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewFormatV1TemplateService method instead.
func NewFormatV1TemplateService ¶
func NewFormatV1TemplateService(opts ...option.RequestOption) (r *FormatV1TemplateService)
NewFormatV1TemplateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*FormatV1TemplateService) Get ¶
func (r *FormatV1TemplateService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *FormatV1TemplateGetResponse, err error)
Retrieve a specific document format template by ID. Format templates define how documents should be structured and formatted for specific legal use cases such as contracts, briefs, or pleadings.
func (*FormatV1TemplateService) List ¶
func (r *FormatV1TemplateService) List(ctx context.Context, query FormatV1TemplateListParams, opts ...option.RequestOption) (res *FormatV1TemplateListResponse, err error)
Retrieve all format templates for the organization. Templates define reusable document formatting patterns with customizable variables for consistent legal document generation.
Filter by type to get specific template categories like contracts, pleadings, or correspondence.
func (*FormatV1TemplateService) New ¶
func (r *FormatV1TemplateService) New(ctx context.Context, body FormatV1TemplateNewParams, opts ...option.RequestOption) (res *FormatV1TemplateNewResponse, err error)
Create a new format template for document formatting. Templates support variables using `{{variable}}` syntax and can be used for captions, signatures, letterheads, certificates, footers, or custom formatting needs.
type LegalService ¶
type LegalService struct {
Options []option.RequestOption
V1 *LegalV1Service
}
LegalService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLegalService method instead.
func NewLegalService ¶
func NewLegalService(opts ...option.RequestOption) (r *LegalService)
NewLegalService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type LegalV1FindParams ¶
type LegalV1FindParams struct {
// Search query (e.g., "fair use copyright", "Miranda rights")
Query param.Field[string] `json:"query,required"`
// Optional jurisdiction ID from resolveJurisdiction (e.g., "california",
// "us-federal")
Jurisdiction param.Field[string] `json:"jurisdiction"`
// Number of results 1-25 (default: 10)
NumResults param.Field[int64] `json:"numResults"`
}
func (LegalV1FindParams) MarshalJSON ¶
func (r LegalV1FindParams) MarshalJSON() (data []byte, err error)
type LegalV1FindResponse ¶
type LegalV1FindResponse struct {
Candidates []LegalV1FindResponseCandidate `json:"candidates"`
// Number of candidates found
Found int64 `json:"found"`
// Usage guidance
Hint string `json:"hint"`
// Jurisdiction filter applied
Jurisdiction string `json:"jurisdiction"`
// Original search query
Query string `json:"query"`
JSON legalV1FindResponseJSON `json:"-"`
}
func (*LegalV1FindResponse) UnmarshalJSON ¶
func (r *LegalV1FindResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1FindResponseCandidate ¶
type LegalV1FindResponseCandidate struct {
// Text excerpt from the document
Snippet string `json:"snippet"`
// Domain of the source
Source string `json:"source"`
// Title of the document
Title string `json:"title"`
// URL of the legal source
URL string `json:"url"`
JSON legalV1FindResponseCandidateJSON `json:"-"`
}
func (*LegalV1FindResponseCandidate) UnmarshalJSON ¶
func (r *LegalV1FindResponseCandidate) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsFromURLParams ¶
type LegalV1GetCitationsFromURLParams struct {
// URL of the legal document to extract citations from
URL param.Field[string] `json:"url,required" format:"uri"`
}
func (LegalV1GetCitationsFromURLParams) MarshalJSON ¶
func (r LegalV1GetCitationsFromURLParams) MarshalJSON() (data []byte, err error)
type LegalV1GetCitationsFromURLResponse ¶
type LegalV1GetCitationsFromURLResponse struct {
Citations LegalV1GetCitationsFromURLResponseCitations `json:"citations"`
// External links found in the document
ExternalLinks []string `json:"externalLinks"`
// Usage guidance
Hint string `json:"hint"`
// Document title
Title string `json:"title"`
// Total citations found
TotalCitations int64 `json:"totalCitations"`
// Source document URL
URL string `json:"url"`
JSON legalV1GetCitationsFromURLResponseJSON `json:"-"`
}
func (*LegalV1GetCitationsFromURLResponse) UnmarshalJSON ¶
func (r *LegalV1GetCitationsFromURLResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsFromURLResponseCitations ¶
type LegalV1GetCitationsFromURLResponseCitations struct {
Cases []LegalV1GetCitationsFromURLResponseCitationsCase `json:"cases"`
Regulations []LegalV1GetCitationsFromURLResponseCitationsRegulation `json:"regulations"`
Statutes []LegalV1GetCitationsFromURLResponseCitationsStatute `json:"statutes"`
JSON legalV1GetCitationsFromURLResponseCitationsJSON `json:"-"`
}
func (*LegalV1GetCitationsFromURLResponseCitations) UnmarshalJSON ¶
func (r *LegalV1GetCitationsFromURLResponseCitations) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsFromURLResponseCitationsCase ¶
type LegalV1GetCitationsFromURLResponseCitationsCase struct {
// The citation string
Citation string `json:"citation"`
// Number of occurrences
Count int64 `json:"count"`
// Citation type (usReporter, federalReporter, etc.)
Type string `json:"type"`
JSON legalV1GetCitationsFromURLResponseCitationsCaseJSON `json:"-"`
}
func (*LegalV1GetCitationsFromURLResponseCitationsCase) UnmarshalJSON ¶
func (r *LegalV1GetCitationsFromURLResponseCitationsCase) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsFromURLResponseCitationsRegulation ¶
type LegalV1GetCitationsFromURLResponseCitationsRegulation struct {
// The citation string
Citation string `json:"citation"`
// Number of occurrences
Count int64 `json:"count"`
// Citation type (cfr)
Type string `json:"type"`
JSON legalV1GetCitationsFromURLResponseCitationsRegulationJSON `json:"-"`
}
func (*LegalV1GetCitationsFromURLResponseCitationsRegulation) UnmarshalJSON ¶
func (r *LegalV1GetCitationsFromURLResponseCitationsRegulation) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsFromURLResponseCitationsStatute ¶
type LegalV1GetCitationsFromURLResponseCitationsStatute struct {
// The citation string
Citation string `json:"citation"`
// Number of occurrences
Count int64 `json:"count"`
// Citation type (usc)
Type string `json:"type"`
JSON legalV1GetCitationsFromURLResponseCitationsStatuteJSON `json:"-"`
}
func (*LegalV1GetCitationsFromURLResponseCitationsStatute) UnmarshalJSON ¶
func (r *LegalV1GetCitationsFromURLResponseCitationsStatute) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsParams ¶
type LegalV1GetCitationsParams struct {
// Text containing citations to extract. Can be a single citation (e.g., "531 U.S.
// 98") or a full document with multiple citations.
Text param.Field[string] `json:"text,required"`
}
func (LegalV1GetCitationsParams) MarshalJSON ¶
func (r LegalV1GetCitationsParams) MarshalJSON() (data []byte, err error)
type LegalV1GetCitationsResponse ¶
type LegalV1GetCitationsResponse struct {
Citations []LegalV1GetCitationsResponseCitation `json:"citations"`
JSON legalV1GetCitationsResponseJSON `json:"-"`
}
func (*LegalV1GetCitationsResponse) UnmarshalJSON ¶
func (r *LegalV1GetCitationsResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsResponseCitation ¶
type LegalV1GetCitationsResponseCitation struct {
// Structured Bluebook components. Null if citation format is not recognized.
Components LegalV1GetCitationsResponseCitationsComponents `json:"components,nullable"`
// Whether citation was found in CourtListener database
Found bool `json:"found"`
// Normalized citation string
Normalized string `json:"normalized"`
// Original citation as found in text
Original string `json:"original"`
Span LegalV1GetCitationsResponseCitationsSpan `json:"span"`
JSON legalV1GetCitationsResponseCitationJSON `json:"-"`
}
func (*LegalV1GetCitationsResponseCitation) UnmarshalJSON ¶
func (r *LegalV1GetCitationsResponseCitation) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsResponseCitationsComponents ¶
type LegalV1GetCitationsResponseCitationsComponents struct {
// Case name, e.g., "Bush v. Gore"
CaseName string `json:"caseName"`
// Court identifier
Court string `json:"court"`
// Starting page number
Page int64 `json:"page"`
// Pin cite (specific page)
PinCite int64 `json:"pinCite"`
// Reporter abbreviation, e.g., "U.S."
Reporter string `json:"reporter"`
// Volume number
Volume int64 `json:"volume"`
// Decision year
Year int64 `json:"year"`
JSON legalV1GetCitationsResponseCitationsComponentsJSON `json:"-"`
}
Structured Bluebook components. Null if citation format is not recognized.
func (*LegalV1GetCitationsResponseCitationsComponents) UnmarshalJSON ¶
func (r *LegalV1GetCitationsResponseCitationsComponents) UnmarshalJSON(data []byte) (err error)
type LegalV1GetCitationsResponseCitationsSpan ¶
type LegalV1GetCitationsResponseCitationsSpan struct {
End int64 `json:"end"`
Start int64 `json:"start"`
JSON legalV1GetCitationsResponseCitationsSpanJSON `json:"-"`
}
func (*LegalV1GetCitationsResponseCitationsSpan) UnmarshalJSON ¶
func (r *LegalV1GetCitationsResponseCitationsSpan) UnmarshalJSON(data []byte) (err error)
type LegalV1GetFullTextParams ¶
type LegalV1GetFullTextParams struct {
// URL of the verified legal document
URL param.Field[string] `json:"url,required" format:"uri"`
// Optional query to extract relevant highlights (e.g., "What is the holding?")
HighlightQuery param.Field[string] `json:"highlightQuery"`
// Maximum characters to return (default: 10000, max: 50000)
MaxCharacters param.Field[int64] `json:"maxCharacters"`
// Optional query for generating a summary (e.g., "Summarize the key ruling")
SummaryQuery param.Field[string] `json:"summaryQuery"`
}
func (LegalV1GetFullTextParams) MarshalJSON ¶
func (r LegalV1GetFullTextParams) MarshalJSON() (data []byte, err error)
type LegalV1GetFullTextResponse ¶
type LegalV1GetFullTextResponse struct {
// Author or court
Author string `json:"author,nullable"`
// Total characters in text
CharacterCount int64 `json:"characterCount"`
// Highlighted relevant passages
Highlights []string `json:"highlights"`
// Publication date
PublishedDate string `json:"publishedDate,nullable"`
// AI-generated summary
Summary string `json:"summary,nullable"`
// Full document text
Text string `json:"text"`
// Document title
Title string `json:"title"`
// Document URL
URL string `json:"url"`
JSON legalV1GetFullTextResponseJSON `json:"-"`
}
func (*LegalV1GetFullTextResponse) UnmarshalJSON ¶
func (r *LegalV1GetFullTextResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1ListJurisdictionsParams ¶
type LegalV1ListJurisdictionsParams struct {
// Jurisdiction name (e.g., "California", "US Federal", "NY")
Name param.Field[string] `json:"name,required"`
}
func (LegalV1ListJurisdictionsParams) MarshalJSON ¶
func (r LegalV1ListJurisdictionsParams) MarshalJSON() (data []byte, err error)
type LegalV1ListJurisdictionsResponse ¶
type LegalV1ListJurisdictionsResponse struct {
// Number of matching jurisdictions
Found int64 `json:"found"`
// Usage guidance
Hint string `json:"hint"`
Jurisdictions []LegalV1ListJurisdictionsResponseJurisdiction `json:"jurisdictions"`
// Original search query
Query string `json:"query"`
JSON legalV1ListJurisdictionsResponseJSON `json:"-"`
}
func (*LegalV1ListJurisdictionsResponse) UnmarshalJSON ¶
func (r *LegalV1ListJurisdictionsResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1ListJurisdictionsResponseJurisdiction ¶
type LegalV1ListJurisdictionsResponseJurisdiction struct {
// Jurisdiction ID to use in other endpoints
ID string `json:"id"`
// Jurisdiction level
Level LegalV1ListJurisdictionsResponseJurisdictionsLevel `json:"level"`
// Full jurisdiction name
Name string `json:"name"`
// State abbreviation (if applicable)
State string `json:"state,nullable"`
JSON legalV1ListJurisdictionsResponseJurisdictionJSON `json:"-"`
}
func (*LegalV1ListJurisdictionsResponseJurisdiction) UnmarshalJSON ¶
func (r *LegalV1ListJurisdictionsResponseJurisdiction) UnmarshalJSON(data []byte) (err error)
type LegalV1ListJurisdictionsResponseJurisdictionsLevel ¶
type LegalV1ListJurisdictionsResponseJurisdictionsLevel string
Jurisdiction level
const ( LegalV1ListJurisdictionsResponseJurisdictionsLevelFederal LegalV1ListJurisdictionsResponseJurisdictionsLevel = "federal" LegalV1ListJurisdictionsResponseJurisdictionsLevelState LegalV1ListJurisdictionsResponseJurisdictionsLevel = "state" LegalV1ListJurisdictionsResponseJurisdictionsLevelCounty LegalV1ListJurisdictionsResponseJurisdictionsLevel = "county" LegalV1ListJurisdictionsResponseJurisdictionsLevelMunicipal LegalV1ListJurisdictionsResponseJurisdictionsLevel = "municipal" )
func (LegalV1ListJurisdictionsResponseJurisdictionsLevel) IsKnown ¶
func (r LegalV1ListJurisdictionsResponseJurisdictionsLevel) IsKnown() bool
type LegalV1PatentSearchParams ¶
type LegalV1PatentSearchParams struct {
// Free-text search across all patent fields, or field-specific query (e.g.
// "applicationMetaData.patentNumber:11234567"). Supports AND, OR, NOT operators.
Query param.Field[string] `json:"query,required"`
// Filter by application status (e.g. "Patented Case", "Abandoned", "Pending")
ApplicationStatus param.Field[string] `json:"applicationStatus"`
// Filter by application type
ApplicationType param.Field[LegalV1PatentSearchParamsApplicationType] `json:"applicationType"`
// Filter by assignee/owner name (e.g. "Google LLC")
Assignee param.Field[string] `json:"assignee"`
// Start of filing date range (YYYY-MM-DD)
FilingDateFrom param.Field[time.Time] `json:"filingDateFrom" format:"date"`
// End of filing date range (YYYY-MM-DD)
FilingDateTo param.Field[time.Time] `json:"filingDateTo" format:"date"`
// Start of grant date range (YYYY-MM-DD)
GrantDateFrom param.Field[time.Time] `json:"grantDateFrom" format:"date"`
// End of grant date range (YYYY-MM-DD)
GrantDateTo param.Field[time.Time] `json:"grantDateTo" format:"date"`
// Filter by inventor name
Inventor param.Field[string] `json:"inventor"`
// Number of results to return (default 25, max 100)
Limit param.Field[int64] `json:"limit"`
// Starting position for pagination
Offset param.Field[int64] `json:"offset"`
// Field to sort results by
SortBy param.Field[LegalV1PatentSearchParamsSortBy] `json:"sortBy"`
// Sort order (default desc, newest first)
SortOrder param.Field[LegalV1PatentSearchParamsSortOrder] `json:"sortOrder"`
}
func (LegalV1PatentSearchParams) MarshalJSON ¶
func (r LegalV1PatentSearchParams) MarshalJSON() (data []byte, err error)
type LegalV1PatentSearchParamsApplicationType ¶
type LegalV1PatentSearchParamsApplicationType string
Filter by application type
const ( LegalV1PatentSearchParamsApplicationTypeUtility LegalV1PatentSearchParamsApplicationType = "Utility" LegalV1PatentSearchParamsApplicationTypeDesign LegalV1PatentSearchParamsApplicationType = "Design" LegalV1PatentSearchParamsApplicationTypePlant LegalV1PatentSearchParamsApplicationType = "Plant" LegalV1PatentSearchParamsApplicationTypeProvisional LegalV1PatentSearchParamsApplicationType = "Provisional" LegalV1PatentSearchParamsApplicationTypeReissue LegalV1PatentSearchParamsApplicationType = "Reissue" )
func (LegalV1PatentSearchParamsApplicationType) IsKnown ¶
func (r LegalV1PatentSearchParamsApplicationType) IsKnown() bool
type LegalV1PatentSearchParamsSortBy ¶
type LegalV1PatentSearchParamsSortBy string
Field to sort results by
const ( LegalV1PatentSearchParamsSortByFilingDate LegalV1PatentSearchParamsSortBy = "filingDate" LegalV1PatentSearchParamsSortByGrantDate LegalV1PatentSearchParamsSortBy = "grantDate" )
func (LegalV1PatentSearchParamsSortBy) IsKnown ¶
func (r LegalV1PatentSearchParamsSortBy) IsKnown() bool
type LegalV1PatentSearchParamsSortOrder ¶
type LegalV1PatentSearchParamsSortOrder string
Sort order (default desc, newest first)
const ( LegalV1PatentSearchParamsSortOrderAsc LegalV1PatentSearchParamsSortOrder = "asc" LegalV1PatentSearchParamsSortOrderDesc LegalV1PatentSearchParamsSortOrder = "desc" )
func (LegalV1PatentSearchParamsSortOrder) IsKnown ¶
func (r LegalV1PatentSearchParamsSortOrder) IsKnown() bool
type LegalV1PatentSearchResponse ¶
type LegalV1PatentSearchResponse struct {
// Number of results returned
Limit int64 `json:"limit"`
// Current pagination offset
Offset int64 `json:"offset"`
// Original search query
Query string `json:"query"`
// Array of matching patent applications
Results []LegalV1PatentSearchResponseResult `json:"results"`
// Total number of matching patent applications
TotalResults int64 `json:"totalResults"`
JSON legalV1PatentSearchResponseJSON `json:"-"`
}
func (*LegalV1PatentSearchResponse) UnmarshalJSON ¶
func (r *LegalV1PatentSearchResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1PatentSearchResponseResult ¶
type LegalV1PatentSearchResponseResult struct {
// Patent application serial number
ApplicationNumber string `json:"applicationNumber"`
// Application type (Utility, Design, Plant, etc.)
ApplicationType string `json:"applicationType"`
// List of assignee/owner names
Assignees []string `json:"assignees"`
// Entity status (e.g. "Small Entity", "Micro Entity")
EntityStatus string `json:"entityStatus,nullable"`
// Date the application was filed
FilingDate time.Time `json:"filingDate,nullable" format:"date"`
// Date the patent was granted
GrantDate time.Time `json:"grantDate,nullable" format:"date"`
// List of inventor names
Inventors []string `json:"inventors"`
// Granted patent number (if granted)
PatentNumber string `json:"patentNumber,nullable"`
// Current application status (e.g. "Patented Case", "Pending")
Status string `json:"status"`
// Invention title
Title string `json:"title"`
JSON legalV1PatentSearchResponseResultJSON `json:"-"`
}
func (*LegalV1PatentSearchResponseResult) UnmarshalJSON ¶
func (r *LegalV1PatentSearchResponseResult) UnmarshalJSON(data []byte) (err error)
type LegalV1ResearchParams ¶
type LegalV1ResearchParams struct {
// Primary search query
Query param.Field[string] `json:"query,required"`
// Additional query variations to search (e.g., different phrasings of the legal
// issue)
AdditionalQueries param.Field[[]string] `json:"additionalQueries"`
// Optional jurisdiction ID from resolveJurisdiction
Jurisdiction param.Field[string] `json:"jurisdiction"`
// Number of results 1-25 (default: 10)
NumResults param.Field[int64] `json:"numResults"`
}
func (LegalV1ResearchParams) MarshalJSON ¶
func (r LegalV1ResearchParams) MarshalJSON() (data []byte, err error)
type LegalV1ResearchResponse ¶
type LegalV1ResearchResponse struct {
// Additional queries used
AdditionalQueries []string `json:"additionalQueries,nullable"`
Candidates []LegalV1ResearchResponseCandidate `json:"candidates"`
// Number of candidates found
Found int64 `json:"found"`
// Usage guidance
Hint string `json:"hint"`
// Jurisdiction filter applied
Jurisdiction string `json:"jurisdiction"`
// Primary search query
Query string `json:"query"`
// Search type used (deep)
SearchType string `json:"searchType"`
JSON legalV1ResearchResponseJSON `json:"-"`
}
func (*LegalV1ResearchResponse) UnmarshalJSON ¶
func (r *LegalV1ResearchResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1ResearchResponseCandidate ¶
type LegalV1ResearchResponseCandidate struct {
// Highlighted relevant passages
Highlights []string `json:"highlights"`
// Publication date
PublishedDate string `json:"publishedDate,nullable"`
// Text excerpt from the document
Snippet string `json:"snippet"`
// Domain of the source
Source string `json:"source"`
// Title of the document
Title string `json:"title"`
// URL of the legal source
URL string `json:"url"`
JSON legalV1ResearchResponseCandidateJSON `json:"-"`
}
func (*LegalV1ResearchResponseCandidate) UnmarshalJSON ¶
func (r *LegalV1ResearchResponseCandidate) UnmarshalJSON(data []byte) (err error)
type LegalV1Service ¶
type LegalV1Service struct {
Options []option.RequestOption
}
LegalV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLegalV1Service method instead.
func NewLegalV1Service ¶
func NewLegalV1Service(opts ...option.RequestOption) (r *LegalV1Service)
NewLegalV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LegalV1Service) Find ¶
func (r *LegalV1Service) Find(ctx context.Context, body LegalV1FindParams, opts ...option.RequestOption) (res *LegalV1FindResponse, err error)
Search for legal sources including cases, statutes, and regulations from authoritative legal databases. Returns ranked candidates. Always verify with legal.verify() before citing.
func (*LegalV1Service) GetCitations ¶
func (r *LegalV1Service) GetCitations(ctx context.Context, body LegalV1GetCitationsParams, opts ...option.RequestOption) (res *LegalV1GetCitationsResponse, err error)
Parses legal citations from text and returns structured Bluebook components (case name, reporter, volume, page, year, court). Accepts either a single citation or a full text block.
func (*LegalV1Service) GetCitationsFromURL ¶
func (r *LegalV1Service) GetCitationsFromURL(ctx context.Context, body LegalV1GetCitationsFromURLParams, opts ...option.RequestOption) (res *LegalV1GetCitationsFromURLResponse, err error)
Extract all legal citations and references from a document URL. Returns structured citation data including case citations, statute references, and regulatory citations.
func (*LegalV1Service) GetFullText ¶
func (r *LegalV1Service) GetFullText(ctx context.Context, body LegalV1GetFullTextParams, opts ...option.RequestOption) (res *LegalV1GetFullTextResponse, err error)
Retrieve the full text content of a legal document. Use after verifying the source with legal.verify(). Returns complete text with optional highlights and AI summary.
func (*LegalV1Service) ListJurisdictions ¶
func (r *LegalV1Service) ListJurisdictions(ctx context.Context, body LegalV1ListJurisdictionsParams, opts ...option.RequestOption) (res *LegalV1ListJurisdictionsResponse, err error)
Search for a jurisdiction by name. Returns matching jurisdictions with their IDs for use in legal.find() and other legal research endpoints.
func (*LegalV1Service) PatentSearch ¶
func (r *LegalV1Service) PatentSearch(ctx context.Context, body LegalV1PatentSearchParams, opts ...option.RequestOption) (res *LegalV1PatentSearchResponse, err error)
Search the USPTO Open Data Portal for US patent applications and granted patents. Supports free-text queries, field-specific search, filters by assignee/inventor/status/type, date ranges, and pagination. Covers applications filed on or after January 1, 2001. Data is refreshed daily.
func (*LegalV1Service) Research ¶
func (r *LegalV1Service) Research(ctx context.Context, body LegalV1ResearchParams, opts ...option.RequestOption) (res *LegalV1ResearchResponse, err error)
Perform comprehensive legal research with multiple query variations. Uses advanced deep search to find relevant sources across different phrasings of the legal issue.
func (*LegalV1Service) Similar ¶
func (r *LegalV1Service) Similar(ctx context.Context, body LegalV1SimilarParams, opts ...option.RequestOption) (res *LegalV1SimilarResponse, err error)
Find cases and documents similar to a given legal source. Useful for finding citing cases, related precedents, or similar statutes.
func (*LegalV1Service) TrademarkSearch ¶ added in v0.3.0
func (r *LegalV1Service) TrademarkSearch(ctx context.Context, body LegalV1TrademarkSearchParams, opts ...option.RequestOption) (res *LegalV1TrademarkSearchResponse, err error)
Look up trademark status and details from the USPTO Trademark Status & Document Retrieval (TSDR) system. Supports lookup by serial number or registration number. Returns mark text, status, owner, goods/services, Nice classification, filing/registration dates, and more.
func (*LegalV1Service) Verify ¶
func (r *LegalV1Service) Verify(ctx context.Context, body LegalV1VerifyParams, opts ...option.RequestOption) (res *LegalV1VerifyResponse, err error)
Validates legal citations against authoritative case law sources (CourtListener database of ~10M cases). Returns verification status and case metadata for each citation found in the input text. Accepts either a single citation or a full text block containing multiple citations.
type LegalV1SimilarParams ¶
type LegalV1SimilarParams struct {
// URL of a legal document to find similar sources for
URL param.Field[string] `json:"url,required" format:"uri"`
// Optional jurisdiction ID to filter results
Jurisdiction param.Field[string] `json:"jurisdiction"`
// Number of results 1-25 (default: 10)
NumResults param.Field[int64] `json:"numResults"`
// Optional ISO date to find only newer documents (e.g., "2020-01-01")
StartPublishedDate param.Field[time.Time] `json:"startPublishedDate" format:"date"`
}
func (LegalV1SimilarParams) MarshalJSON ¶
func (r LegalV1SimilarParams) MarshalJSON() (data []byte, err error)
type LegalV1SimilarResponse ¶
type LegalV1SimilarResponse struct {
// Number of similar sources found
Found int64 `json:"found"`
// Usage guidance
Hint string `json:"hint"`
// Jurisdiction filter applied
Jurisdiction string `json:"jurisdiction"`
SimilarSources []LegalV1SimilarResponseSimilarSource `json:"similarSources"`
// Original source URL
SourceURL string `json:"sourceUrl"`
JSON legalV1SimilarResponseJSON `json:"-"`
}
func (*LegalV1SimilarResponse) UnmarshalJSON ¶
func (r *LegalV1SimilarResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1SimilarResponseSimilarSource ¶
type LegalV1SimilarResponseSimilarSource struct {
// Publication date
PublishedDate string `json:"publishedDate,nullable"`
// Text excerpt from the document
Snippet string `json:"snippet"`
// Domain of the source
Source string `json:"source"`
// Title of the document
Title string `json:"title"`
// URL of the similar source
URL string `json:"url"`
JSON legalV1SimilarResponseSimilarSourceJSON `json:"-"`
}
func (*LegalV1SimilarResponseSimilarSource) UnmarshalJSON ¶
func (r *LegalV1SimilarResponseSimilarSource) UnmarshalJSON(data []byte) (err error)
type LegalV1TrademarkSearchParams ¶ added in v0.3.0
type LegalV1TrademarkSearchParams struct {
// USPTO registration number (e.g. "6123456"). Provide either serialNumber or
// registrationNumber.
RegistrationNumber param.Field[string] `json:"registrationNumber"`
// USPTO serial number (e.g. "97123456"). Provide either serialNumber or
// registrationNumber.
SerialNumber param.Field[string] `json:"serialNumber"`
}
func (LegalV1TrademarkSearchParams) MarshalJSON ¶ added in v0.3.0
func (r LegalV1TrademarkSearchParams) MarshalJSON() (data []byte, err error)
type LegalV1TrademarkSearchResponse ¶ added in v0.3.0
type LegalV1TrademarkSearchResponse struct {
// Attorney of record
Attorney string `json:"attorney,nullable"`
// Date the application was filed
FilingDate time.Time `json:"filingDate,nullable" format:"date"`
// Goods and services descriptions with class numbers
GoodsAndServices []LegalV1TrademarkSearchResponseGoodsAndService `json:"goodsAndServices"`
// URL to the mark image on USPTO CDN
ImageURL string `json:"imageUrl,nullable"`
// The text of the trademark
MarkText string `json:"markText,nullable"`
// Type of mark (e.g. "Standard Character Mark", "Design Mark")
MarkType string `json:"markType,nullable"`
// Nice classification class numbers
NiceClasses []int64 `json:"niceClasses"`
// Current owner/applicant information
Owner LegalV1TrademarkSearchResponseOwner `json:"owner,nullable"`
// Date the mark was registered
RegistrationDate time.Time `json:"registrationDate,nullable" format:"date"`
// USPTO registration number (if registered)
RegistrationNumber string `json:"registrationNumber,nullable"`
// USPTO serial number
SerialNumber string `json:"serialNumber"`
// Current status (e.g. "Registered", "Pending", "Abandoned", "Cancelled")
Status string `json:"status,nullable"`
// Date of most recent status update
StatusDate time.Time `json:"statusDate,nullable" format:"date"`
// Canonical TSDR link for this mark
UsptoURL string `json:"usptoUrl"`
JSON legalV1TrademarkSearchResponseJSON `json:"-"`
}
func (*LegalV1TrademarkSearchResponse) UnmarshalJSON ¶ added in v0.3.0
func (r *LegalV1TrademarkSearchResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1TrademarkSearchResponseGoodsAndService ¶ added in v0.3.0
type LegalV1TrademarkSearchResponseGoodsAndService struct {
ClassNumber string `json:"classNumber,nullable"`
Description string `json:"description,nullable"`
JSON legalV1TrademarkSearchResponseGoodsAndServiceJSON `json:"-"`
}
func (*LegalV1TrademarkSearchResponseGoodsAndService) UnmarshalJSON ¶ added in v0.3.0
func (r *LegalV1TrademarkSearchResponseGoodsAndService) UnmarshalJSON(data []byte) (err error)
type LegalV1TrademarkSearchResponseOwner ¶ added in v0.3.0
type LegalV1TrademarkSearchResponseOwner struct {
Address string `json:"address,nullable"`
EntityType string `json:"entityType,nullable"`
Name string `json:"name,nullable"`
JSON legalV1TrademarkSearchResponseOwnerJSON `json:"-"`
}
Current owner/applicant information
func (*LegalV1TrademarkSearchResponseOwner) UnmarshalJSON ¶ added in v0.3.0
func (r *LegalV1TrademarkSearchResponseOwner) UnmarshalJSON(data []byte) (err error)
type LegalV1VerifyParams ¶
type LegalV1VerifyParams struct {
// Text containing citations to verify. Can be a single citation (e.g., "531 U.S.
// 98") or a full document with multiple citations.
Text param.Field[string] `json:"text,required"`
}
func (LegalV1VerifyParams) MarshalJSON ¶
func (r LegalV1VerifyParams) MarshalJSON() (data []byte, err error)
type LegalV1VerifyResponse ¶
type LegalV1VerifyResponse struct {
Citations []LegalV1VerifyResponseCitation `json:"citations"`
Summary LegalV1VerifyResponseSummary `json:"summary"`
JSON legalV1VerifyResponseJSON `json:"-"`
}
func (*LegalV1VerifyResponse) UnmarshalJSON ¶
func (r *LegalV1VerifyResponse) UnmarshalJSON(data []byte) (err error)
type LegalV1VerifyResponseCitation ¶
type LegalV1VerifyResponseCitation struct {
// Multiple candidates (when multiple_matches or heuristic verification)
Candidates []LegalV1VerifyResponseCitationsCandidate `json:"candidates"`
// Case metadata (when verified)
Case LegalV1VerifyResponseCitationsCase `json:"case"`
// Confidence score (1.0 for CourtListener, heuristic score for fallback).
Confidence float64 `json:"confidence"`
// Normalized citation string
Normalized string `json:"normalized"`
// Original citation as found in text
Original string `json:"original"`
Span LegalV1VerifyResponseCitationsSpan `json:"span"`
Status LegalV1VerifyResponseCitationsStatus `json:"status"`
// Source of verification result (heuristic for fallback matches).
VerificationSource LegalV1VerifyResponseCitationsVerificationSource `json:"verificationSource"`
JSON legalV1VerifyResponseCitationJSON `json:"-"`
}
func (*LegalV1VerifyResponseCitation) UnmarshalJSON ¶
func (r *LegalV1VerifyResponseCitation) UnmarshalJSON(data []byte) (err error)
type LegalV1VerifyResponseCitationsCandidate ¶
type LegalV1VerifyResponseCitationsCandidate struct {
Court string `json:"court"`
DateDecided string `json:"dateDecided"`
Name string `json:"name"`
URL string `json:"url"`
JSON legalV1VerifyResponseCitationsCandidateJSON `json:"-"`
}
func (*LegalV1VerifyResponseCitationsCandidate) UnmarshalJSON ¶
func (r *LegalV1VerifyResponseCitationsCandidate) UnmarshalJSON(data []byte) (err error)
type LegalV1VerifyResponseCitationsCase ¶
type LegalV1VerifyResponseCitationsCase struct {
ID int64 `json:"id"`
Court string `json:"court"`
DateDecided string `json:"dateDecided"`
DocketNumber string `json:"docketNumber"`
Name string `json:"name"`
ParallelCitations []string `json:"parallelCitations"`
ShortName string `json:"shortName"`
URL string `json:"url"`
JSON legalV1VerifyResponseCitationsCaseJSON `json:"-"`
}
Case metadata (when verified)
func (*LegalV1VerifyResponseCitationsCase) UnmarshalJSON ¶
func (r *LegalV1VerifyResponseCitationsCase) UnmarshalJSON(data []byte) (err error)
type LegalV1VerifyResponseCitationsSpan ¶
type LegalV1VerifyResponseCitationsSpan struct {
End int64 `json:"end"`
Start int64 `json:"start"`
JSON legalV1VerifyResponseCitationsSpanJSON `json:"-"`
}
func (*LegalV1VerifyResponseCitationsSpan) UnmarshalJSON ¶
func (r *LegalV1VerifyResponseCitationsSpan) UnmarshalJSON(data []byte) (err error)
type LegalV1VerifyResponseCitationsStatus ¶
type LegalV1VerifyResponseCitationsStatus string
const ( LegalV1VerifyResponseCitationsStatusVerified LegalV1VerifyResponseCitationsStatus = "verified" LegalV1VerifyResponseCitationsStatusNotFound LegalV1VerifyResponseCitationsStatus = "not_found" LegalV1VerifyResponseCitationsStatusMultipleMatches LegalV1VerifyResponseCitationsStatus = "multiple_matches" )
func (LegalV1VerifyResponseCitationsStatus) IsKnown ¶
func (r LegalV1VerifyResponseCitationsStatus) IsKnown() bool
type LegalV1VerifyResponseCitationsVerificationSource ¶
type LegalV1VerifyResponseCitationsVerificationSource string
Source of verification result (heuristic for fallback matches).
const ( LegalV1VerifyResponseCitationsVerificationSourceCourtlistener LegalV1VerifyResponseCitationsVerificationSource = "courtlistener" LegalV1VerifyResponseCitationsVerificationSourceHeuristic LegalV1VerifyResponseCitationsVerificationSource = "heuristic" )
func (LegalV1VerifyResponseCitationsVerificationSource) IsKnown ¶
func (r LegalV1VerifyResponseCitationsVerificationSource) IsKnown() bool
type LegalV1VerifyResponseSummary ¶
type LegalV1VerifyResponseSummary struct {
// Citations with multiple possible matches
MultipleMatches int64 `json:"multipleMatches"`
// Citations not found in database
NotFound int64 `json:"notFound"`
// Total citations found
Total int64 `json:"total"`
// Citations verified against real cases
Verified int64 `json:"verified"`
JSON legalV1VerifyResponseSummaryJSON `json:"-"`
}
func (*LegalV1VerifyResponseSummary) UnmarshalJSON ¶
func (r *LegalV1VerifyResponseSummary) UnmarshalJSON(data []byte) (err error)
type LlmGetConfigResponse ¶
type LlmGetConfigResponse struct {
Models []LlmGetConfigResponseModel `json:"models,required"`
JSON llmGetConfigResponseJSON `json:"-"`
}
func (*LlmGetConfigResponse) UnmarshalJSON ¶
func (r *LlmGetConfigResponse) UnmarshalJSON(data []byte) (err error)
type LlmGetConfigResponseModel ¶
type LlmGetConfigResponseModel struct {
// Unique model identifier
ID string `json:"id,required"`
// Type of model (e.g., language, embedding)
ModelType string `json:"modelType,required"`
// Human-readable model name
Name string `json:"name,required"`
// Model description and capabilities
Description string `json:"description"`
// Pricing information for the model
Pricing interface{} `json:"pricing"`
// Technical specifications and limits
Specification interface{} `json:"specification"`
JSON llmGetConfigResponseModelJSON `json:"-"`
}
func (*LlmGetConfigResponseModel) UnmarshalJSON ¶
func (r *LlmGetConfigResponseModel) UnmarshalJSON(data []byte) (err error)
type LlmService ¶
type LlmService struct {
Options []option.RequestOption
V1 *LlmV1Service
}
LlmService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLlmService method instead.
func NewLlmService ¶
func NewLlmService(opts ...option.RequestOption) (r *LlmService)
NewLlmService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LlmService) GetConfig ¶
func (r *LlmService) GetConfig(ctx context.Context, opts ...option.RequestOption) (res *LlmGetConfigResponse, err error)
Retrieves the AI Gateway configuration including all available language models and their specifications. This endpoint returns model information compatible with the Vercel AI SDK Gateway format, making it easy to integrate with existing AI applications.
Use this endpoint to:
- Discover available language models - Get model specifications and pricing - Configure AI SDK clients - Build model selection interfaces
type LlmV1ChatNewCompletionParams ¶
type LlmV1ChatNewCompletionParams struct {
// List of messages comprising the conversation
Messages param.Field[[]LlmV1ChatNewCompletionParamsMessage] `json:"messages,required"`
// CaseMark-only: when true, allows reasoning fields in responses. Defaults to
// false (reasoning is suppressed).
CasemarkShowReasoning param.Field[bool] `json:"casemark_show_reasoning"`
// Frequency penalty parameter
FrequencyPenalty param.Field[float64] `json:"frequency_penalty"`
// Maximum number of tokens to generate
MaxTokens param.Field[int64] `json:"max_tokens"`
// Model to use for completion. Defaults to casemark/casemark-core-3 if not
// specified
Model param.Field[string] `json:"model"`
// Presence penalty parameter
PresencePenalty param.Field[float64] `json:"presence_penalty"`
// Whether to stream back partial progress
Stream param.Field[bool] `json:"stream"`
// Sampling temperature between 0 and 2
Temperature param.Field[float64] `json:"temperature"`
// Nucleus sampling parameter
TopP param.Field[float64] `json:"top_p"`
}
func (LlmV1ChatNewCompletionParams) MarshalJSON ¶
func (r LlmV1ChatNewCompletionParams) MarshalJSON() (data []byte, err error)
type LlmV1ChatNewCompletionParamsMessage ¶
type LlmV1ChatNewCompletionParamsMessage struct {
// The contents of the message
Content param.Field[string] `json:"content"`
// The role of the message author
Role param.Field[LlmV1ChatNewCompletionParamsMessagesRole] `json:"role"`
}
func (LlmV1ChatNewCompletionParamsMessage) MarshalJSON ¶
func (r LlmV1ChatNewCompletionParamsMessage) MarshalJSON() (data []byte, err error)
type LlmV1ChatNewCompletionParamsMessagesRole ¶
type LlmV1ChatNewCompletionParamsMessagesRole string
The role of the message author
const ( LlmV1ChatNewCompletionParamsMessagesRoleSystem LlmV1ChatNewCompletionParamsMessagesRole = "system" LlmV1ChatNewCompletionParamsMessagesRoleUser LlmV1ChatNewCompletionParamsMessagesRole = "user" LlmV1ChatNewCompletionParamsMessagesRoleAssistant LlmV1ChatNewCompletionParamsMessagesRole = "assistant" )
func (LlmV1ChatNewCompletionParamsMessagesRole) IsKnown ¶
func (r LlmV1ChatNewCompletionParamsMessagesRole) IsKnown() bool
type LlmV1ChatNewCompletionResponse ¶
type LlmV1ChatNewCompletionResponse struct {
// Unique identifier for the completion
ID string `json:"id"`
Choices []LlmV1ChatNewCompletionResponseChoice `json:"choices"`
// Unix timestamp of completion creation
Created int64 `json:"created"`
// Model used for completion
Model string `json:"model"`
Object string `json:"object"`
Usage LlmV1ChatNewCompletionResponseUsage `json:"usage"`
JSON llmV1ChatNewCompletionResponseJSON `json:"-"`
}
func (*LlmV1ChatNewCompletionResponse) UnmarshalJSON ¶
func (r *LlmV1ChatNewCompletionResponse) UnmarshalJSON(data []byte) (err error)
type LlmV1ChatNewCompletionResponseChoice ¶
type LlmV1ChatNewCompletionResponseChoice struct {
FinishReason string `json:"finish_reason"`
Index int64 `json:"index"`
Message LlmV1ChatNewCompletionResponseChoicesMessage `json:"message"`
JSON llmV1ChatNewCompletionResponseChoiceJSON `json:"-"`
}
func (*LlmV1ChatNewCompletionResponseChoice) UnmarshalJSON ¶
func (r *LlmV1ChatNewCompletionResponseChoice) UnmarshalJSON(data []byte) (err error)
type LlmV1ChatNewCompletionResponseChoicesMessage ¶
type LlmV1ChatNewCompletionResponseChoicesMessage struct {
Content string `json:"content"`
Role string `json:"role"`
JSON llmV1ChatNewCompletionResponseChoicesMessageJSON `json:"-"`
}
func (*LlmV1ChatNewCompletionResponseChoicesMessage) UnmarshalJSON ¶
func (r *LlmV1ChatNewCompletionResponseChoicesMessage) UnmarshalJSON(data []byte) (err error)
type LlmV1ChatNewCompletionResponseUsage ¶
type LlmV1ChatNewCompletionResponseUsage struct {
CompletionTokens int64 `json:"completion_tokens"`
// Cost in USD
Cost float64 `json:"cost"`
PromptTokens int64 `json:"prompt_tokens"`
TotalTokens int64 `json:"total_tokens"`
JSON llmV1ChatNewCompletionResponseUsageJSON `json:"-"`
}
func (*LlmV1ChatNewCompletionResponseUsage) UnmarshalJSON ¶
func (r *LlmV1ChatNewCompletionResponseUsage) UnmarshalJSON(data []byte) (err error)
type LlmV1ChatService ¶
type LlmV1ChatService struct {
Options []option.RequestOption
}
LlmV1ChatService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLlmV1ChatService method instead.
func NewLlmV1ChatService ¶
func NewLlmV1ChatService(opts ...option.RequestOption) (r *LlmV1ChatService)
NewLlmV1ChatService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LlmV1ChatService) NewCompletion ¶
func (r *LlmV1ChatService) NewCompletion(ctx context.Context, body LlmV1ChatNewCompletionParams, opts ...option.RequestOption) (res *LlmV1ChatNewCompletionResponse, err error)
Create a completion for the provided prompt and parameters. Compatible with OpenAI's chat completions API. Supports 40+ models including GPT-4, Claude, Gemini, and CaseMark legal AI models. Includes streaming support, token counting, and usage tracking.
type LlmV1ListModelsResponse ¶
type LlmV1ListModelsResponse struct {
Data []LlmV1ListModelsResponseData `json:"data"`
// Response object type, always 'list'
Object string `json:"object"`
JSON llmV1ListModelsResponseJSON `json:"-"`
}
func (*LlmV1ListModelsResponse) UnmarshalJSON ¶
func (r *LlmV1ListModelsResponse) UnmarshalJSON(data []byte) (err error)
type LlmV1ListModelsResponseData ¶
type LlmV1ListModelsResponseData struct {
// Unique model identifier
ID string `json:"id"`
// Unix timestamp of model creation
Created int64 `json:"created"`
// Object type, always 'model'
Object string `json:"object"`
// Model provider (openai, anthropic, google, casemark, etc.)
OwnedBy string `json:"owned_by"`
Pricing LlmV1ListModelsResponseDataPricing `json:"pricing"`
JSON llmV1ListModelsResponseDataJSON `json:"-"`
}
func (*LlmV1ListModelsResponseData) UnmarshalJSON ¶
func (r *LlmV1ListModelsResponseData) UnmarshalJSON(data []byte) (err error)
type LlmV1ListModelsResponseDataPricing ¶
type LlmV1ListModelsResponseDataPricing struct {
// Input token price per token
Input string `json:"input"`
// Cache read price per token (if supported)
InputCacheRead string `json:"input_cache_read"`
// Output token price per token
Output string `json:"output"`
JSON llmV1ListModelsResponseDataPricingJSON `json:"-"`
}
func (*LlmV1ListModelsResponseDataPricing) UnmarshalJSON ¶
func (r *LlmV1ListModelsResponseDataPricing) UnmarshalJSON(data []byte) (err error)
type LlmV1NewEmbeddingParams ¶
type LlmV1NewEmbeddingParams struct {
// Text or array of texts to create embeddings for
Input param.Field[LlmV1NewEmbeddingParamsInputUnion] `json:"input,required"`
// Embedding model to use (e.g., text-embedding-ada-002, text-embedding-3-small)
Model param.Field[string] `json:"model,required"`
// Number of dimensions for the embeddings (model-specific)
Dimensions param.Field[int64] `json:"dimensions"`
// Format for returned embeddings
EncodingFormat param.Field[LlmV1NewEmbeddingParamsEncodingFormat] `json:"encoding_format"`
// Unique identifier for the end-user
User param.Field[string] `json:"user"`
}
func (LlmV1NewEmbeddingParams) MarshalJSON ¶
func (r LlmV1NewEmbeddingParams) MarshalJSON() (data []byte, err error)
type LlmV1NewEmbeddingParamsEncodingFormat ¶
type LlmV1NewEmbeddingParamsEncodingFormat string
Format for returned embeddings
const ( LlmV1NewEmbeddingParamsEncodingFormatFloat LlmV1NewEmbeddingParamsEncodingFormat = "float" LlmV1NewEmbeddingParamsEncodingFormatBase64 LlmV1NewEmbeddingParamsEncodingFormat = "base64" )
func (LlmV1NewEmbeddingParamsEncodingFormat) IsKnown ¶
func (r LlmV1NewEmbeddingParamsEncodingFormat) IsKnown() bool
type LlmV1NewEmbeddingParamsInputArray ¶
type LlmV1NewEmbeddingParamsInputArray []string
func (LlmV1NewEmbeddingParamsInputArray) ImplementsLlmV1NewEmbeddingParamsInputUnion ¶
func (r LlmV1NewEmbeddingParamsInputArray) ImplementsLlmV1NewEmbeddingParamsInputUnion()
type LlmV1NewEmbeddingParamsInputUnion ¶
type LlmV1NewEmbeddingParamsInputUnion interface {
ImplementsLlmV1NewEmbeddingParamsInputUnion()
}
Text or array of texts to create embeddings for
Satisfied by [shared.UnionString], LlmV1NewEmbeddingParamsInputArray.
type LlmV1NewEmbeddingResponse ¶
type LlmV1NewEmbeddingResponse struct {
Data []LlmV1NewEmbeddingResponseData `json:"data"`
Model string `json:"model"`
Object string `json:"object"`
Usage LlmV1NewEmbeddingResponseUsage `json:"usage"`
JSON llmV1NewEmbeddingResponseJSON `json:"-"`
}
func (*LlmV1NewEmbeddingResponse) UnmarshalJSON ¶
func (r *LlmV1NewEmbeddingResponse) UnmarshalJSON(data []byte) (err error)
type LlmV1NewEmbeddingResponseData ¶
type LlmV1NewEmbeddingResponseData struct {
Embedding []float64 `json:"embedding"`
Index int64 `json:"index"`
Object string `json:"object"`
JSON llmV1NewEmbeddingResponseDataJSON `json:"-"`
}
func (*LlmV1NewEmbeddingResponseData) UnmarshalJSON ¶
func (r *LlmV1NewEmbeddingResponseData) UnmarshalJSON(data []byte) (err error)
type LlmV1NewEmbeddingResponseUsage ¶
type LlmV1NewEmbeddingResponseUsage struct {
PromptTokens int64 `json:"prompt_tokens"`
TotalTokens int64 `json:"total_tokens"`
JSON llmV1NewEmbeddingResponseUsageJSON `json:"-"`
}
func (*LlmV1NewEmbeddingResponseUsage) UnmarshalJSON ¶
func (r *LlmV1NewEmbeddingResponseUsage) UnmarshalJSON(data []byte) (err error)
type LlmV1Service ¶
type LlmV1Service struct {
Options []option.RequestOption
Chat *LlmV1ChatService
}
LlmV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLlmV1Service method instead.
func NewLlmV1Service ¶
func NewLlmV1Service(opts ...option.RequestOption) (r *LlmV1Service)
NewLlmV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*LlmV1Service) ListModels ¶
func (r *LlmV1Service) ListModels(ctx context.Context, opts ...option.RequestOption) (res *LlmV1ListModelsResponse, err error)
Retrieve a list of all available language models from 40+ providers including OpenAI, Anthropic, Google, and Case.dev's specialized legal models. Returns OpenAI-compatible model metadata with pricing information.
This endpoint is compatible with OpenAI's models API format, making it easy to integrate with existing applications.
func (*LlmV1Service) NewEmbedding ¶
func (r *LlmV1Service) NewEmbedding(ctx context.Context, body LlmV1NewEmbeddingParams, opts ...option.RequestOption) (res *LlmV1NewEmbeddingResponse, err error)
Create vector embeddings from text using OpenAI-compatible models. Perfect for semantic search, document similarity, and building RAG systems for legal documents.
type MemoryService ¶
type MemoryService struct {
Options []option.RequestOption
V1 *MemoryV1Service
}
MemoryService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemoryService method instead.
func NewMemoryService ¶
func NewMemoryService(opts ...option.RequestOption) (r *MemoryService)
NewMemoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type MemoryV1DeleteAllParams ¶
type MemoryV1DeleteAllParams struct {
// Filter by tag_1
Tag1 param.Field[string] `query:"tag_1"`
// Filter by tag_10
Tag10 param.Field[string] `query:"tag_10"`
// Filter by tag_11
Tag11 param.Field[string] `query:"tag_11"`
// Filter by tag_12
Tag12 param.Field[string] `query:"tag_12"`
// Filter by tag_2
Tag2 param.Field[string] `query:"tag_2"`
// Filter by tag_3
Tag3 param.Field[string] `query:"tag_3"`
// Filter by tag_4
Tag4 param.Field[string] `query:"tag_4"`
// Filter by tag_5
Tag5 param.Field[string] `query:"tag_5"`
// Filter by tag_6
Tag6 param.Field[string] `query:"tag_6"`
// Filter by tag_7
Tag7 param.Field[string] `query:"tag_7"`
// Filter by tag_8
Tag8 param.Field[string] `query:"tag_8"`
// Filter by tag_9
Tag9 param.Field[string] `query:"tag_9"`
}
func (MemoryV1DeleteAllParams) URLQuery ¶
func (r MemoryV1DeleteAllParams) URLQuery() (v url.Values)
URLQuery serializes MemoryV1DeleteAllParams's query parameters as `url.Values`.
type MemoryV1DeleteAllResponse ¶
type MemoryV1DeleteAllResponse struct {
// Number of memories deleted
Deleted int64 `json:"deleted"`
JSON memoryV1DeleteAllResponseJSON `json:"-"`
}
func (*MemoryV1DeleteAllResponse) UnmarshalJSON ¶
func (r *MemoryV1DeleteAllResponse) UnmarshalJSON(data []byte) (err error)
type MemoryV1DeleteResponse ¶
type MemoryV1DeleteResponse struct {
Message string `json:"message"`
Success bool `json:"success"`
JSON memoryV1DeleteResponseJSON `json:"-"`
}
func (*MemoryV1DeleteResponse) UnmarshalJSON ¶
func (r *MemoryV1DeleteResponse) UnmarshalJSON(data []byte) (err error)
type MemoryV1GetResponse ¶
type MemoryV1GetResponse struct {
// Memory ID
ID string `json:"id"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Memory content
Memory string `json:"memory"`
// Memory metadata
Metadata interface{} `json:"metadata"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON memoryV1GetResponseJSON `json:"-"`
}
func (*MemoryV1GetResponse) UnmarshalJSON ¶
func (r *MemoryV1GetResponse) UnmarshalJSON(data []byte) (err error)
type MemoryV1ListParams ¶
type MemoryV1ListParams struct {
// Filter by category
Category param.Field[string] `query:"category"`
// Number of results
Limit param.Field[int64] `query:"limit"`
// Pagination offset
Offset param.Field[int64] `query:"offset"`
// Filter by tag_1
Tag1 param.Field[string] `query:"tag_1"`
// Filter by tag_10
Tag10 param.Field[string] `query:"tag_10"`
// Filter by tag_11
Tag11 param.Field[string] `query:"tag_11"`
// Filter by tag_12
Tag12 param.Field[string] `query:"tag_12"`
// Filter by tag_2
Tag2 param.Field[string] `query:"tag_2"`
// Filter by tag_3
Tag3 param.Field[string] `query:"tag_3"`
// Filter by tag_4
Tag4 param.Field[string] `query:"tag_4"`
// Filter by tag_5
Tag5 param.Field[string] `query:"tag_5"`
// Filter by tag_6
Tag6 param.Field[string] `query:"tag_6"`
// Filter by tag_7
Tag7 param.Field[string] `query:"tag_7"`
// Filter by tag_8
Tag8 param.Field[string] `query:"tag_8"`
// Filter by tag_9
Tag9 param.Field[string] `query:"tag_9"`
}
func (MemoryV1ListParams) URLQuery ¶
func (r MemoryV1ListParams) URLQuery() (v url.Values)
URLQuery serializes MemoryV1ListParams's query parameters as `url.Values`.
type MemoryV1ListResponse ¶
type MemoryV1ListResponse struct {
// Total count matching filters
Count int64 `json:"count"`
Results []MemoryV1ListResponseResult `json:"results"`
JSON memoryV1ListResponseJSON `json:"-"`
}
func (*MemoryV1ListResponse) UnmarshalJSON ¶
func (r *MemoryV1ListResponse) UnmarshalJSON(data []byte) (err error)
type MemoryV1ListResponseResult ¶
type MemoryV1ListResponseResult struct {
ID string `json:"id"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
Memory string `json:"memory"`
Metadata interface{} `json:"metadata"`
Tags interface{} `json:"tags"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON memoryV1ListResponseResultJSON `json:"-"`
}
func (*MemoryV1ListResponseResult) UnmarshalJSON ¶
func (r *MemoryV1ListResponseResult) UnmarshalJSON(data []byte) (err error)
type MemoryV1NewParams ¶
type MemoryV1NewParams struct {
// Conversation messages to extract memories from
Messages param.Field[[]MemoryV1NewParamsMessage] `json:"messages,required"`
// Custom category (e.g., "fact", "preference", "deadline")
Category param.Field[string] `json:"category"`
// Optional custom prompt for fact extraction
ExtractionPrompt param.Field[string] `json:"extraction_prompt"`
// Whether to extract facts from messages (default: true)
Infer param.Field[bool] `json:"infer"`
// Additional metadata (not indexed)
Metadata param.Field[map[string]interface{}] `json:"metadata"`
// Generic indexed filter field 1 (you decide what it means)
Tag1 param.Field[string] `json:"tag_1"`
// Generic indexed filter field 10
Tag10 param.Field[string] `json:"tag_10"`
// Generic indexed filter field 11
Tag11 param.Field[string] `json:"tag_11"`
// Generic indexed filter field 12
Tag12 param.Field[string] `json:"tag_12"`
// Generic indexed filter field 2
Tag2 param.Field[string] `json:"tag_2"`
// Generic indexed filter field 3
Tag3 param.Field[string] `json:"tag_3"`
// Generic indexed filter field 4
Tag4 param.Field[string] `json:"tag_4"`
// Generic indexed filter field 5
Tag5 param.Field[string] `json:"tag_5"`
// Generic indexed filter field 6
Tag6 param.Field[string] `json:"tag_6"`
// Generic indexed filter field 7
Tag7 param.Field[string] `json:"tag_7"`
// Generic indexed filter field 8
Tag8 param.Field[string] `json:"tag_8"`
// Generic indexed filter field 9
Tag9 param.Field[string] `json:"tag_9"`
}
func (MemoryV1NewParams) MarshalJSON ¶
func (r MemoryV1NewParams) MarshalJSON() (data []byte, err error)
type MemoryV1NewParamsMessage ¶
type MemoryV1NewParamsMessage struct {
// Message content
Content param.Field[string] `json:"content,required"`
// Message role
Role param.Field[MemoryV1NewParamsMessagesRole] `json:"role,required"`
}
func (MemoryV1NewParamsMessage) MarshalJSON ¶
func (r MemoryV1NewParamsMessage) MarshalJSON() (data []byte, err error)
type MemoryV1NewParamsMessagesRole ¶
type MemoryV1NewParamsMessagesRole string
Message role
const ( MemoryV1NewParamsMessagesRoleUser MemoryV1NewParamsMessagesRole = "user" MemoryV1NewParamsMessagesRoleAssistant MemoryV1NewParamsMessagesRole = "assistant" MemoryV1NewParamsMessagesRoleSystem MemoryV1NewParamsMessagesRole = "system" )
func (MemoryV1NewParamsMessagesRole) IsKnown ¶
func (r MemoryV1NewParamsMessagesRole) IsKnown() bool
type MemoryV1NewResponse ¶
type MemoryV1NewResponse struct {
Results []MemoryV1NewResponseResult `json:"results"`
JSON memoryV1NewResponseJSON `json:"-"`
}
func (*MemoryV1NewResponse) UnmarshalJSON ¶
func (r *MemoryV1NewResponse) UnmarshalJSON(data []byte) (err error)
type MemoryV1NewResponseResult ¶
type MemoryV1NewResponseResult struct {
// Memory ID
ID string `json:"id"`
// What happened to this memory
Event MemoryV1NewResponseResultsEvent `json:"event"`
// Extracted memory text
Memory string `json:"memory"`
JSON memoryV1NewResponseResultJSON `json:"-"`
}
func (*MemoryV1NewResponseResult) UnmarshalJSON ¶
func (r *MemoryV1NewResponseResult) UnmarshalJSON(data []byte) (err error)
type MemoryV1NewResponseResultsEvent ¶
type MemoryV1NewResponseResultsEvent string
What happened to this memory
const ( MemoryV1NewResponseResultsEventAdd MemoryV1NewResponseResultsEvent = "ADD" MemoryV1NewResponseResultsEventUpdate MemoryV1NewResponseResultsEvent = "UPDATE" MemoryV1NewResponseResultsEventDelete MemoryV1NewResponseResultsEvent = "DELETE" MemoryV1NewResponseResultsEventNone MemoryV1NewResponseResultsEvent = "NONE" )
func (MemoryV1NewResponseResultsEvent) IsKnown ¶
func (r MemoryV1NewResponseResultsEvent) IsKnown() bool
type MemoryV1SearchParams ¶
type MemoryV1SearchParams struct {
// Search query for semantic matching
Query param.Field[string] `json:"query,required"`
// Filter by category
Category param.Field[string] `json:"category"`
// Filter by tag_1
Tag1 param.Field[string] `json:"tag_1"`
// Filter by tag_10
Tag10 param.Field[string] `json:"tag_10"`
// Filter by tag_11
Tag11 param.Field[string] `json:"tag_11"`
// Filter by tag_12
Tag12 param.Field[string] `json:"tag_12"`
// Filter by tag_2
Tag2 param.Field[string] `json:"tag_2"`
// Filter by tag_3
Tag3 param.Field[string] `json:"tag_3"`
// Filter by tag_4
Tag4 param.Field[string] `json:"tag_4"`
// Filter by tag_5
Tag5 param.Field[string] `json:"tag_5"`
// Filter by tag_6
Tag6 param.Field[string] `json:"tag_6"`
// Filter by tag_7
Tag7 param.Field[string] `json:"tag_7"`
// Filter by tag_8
Tag8 param.Field[string] `json:"tag_8"`
// Filter by tag_9
Tag9 param.Field[string] `json:"tag_9"`
// Maximum number of results to return
TopK param.Field[int64] `json:"top_k"`
}
func (MemoryV1SearchParams) MarshalJSON ¶
func (r MemoryV1SearchParams) MarshalJSON() (data []byte, err error)
type MemoryV1SearchResponse ¶
type MemoryV1SearchResponse struct {
Results []MemoryV1SearchResponseResult `json:"results"`
JSON memoryV1SearchResponseJSON `json:"-"`
}
func (*MemoryV1SearchResponse) UnmarshalJSON ¶
func (r *MemoryV1SearchResponse) UnmarshalJSON(data []byte) (err error)
type MemoryV1SearchResponseResult ¶
type MemoryV1SearchResponseResult struct {
// Memory ID
ID string `json:"id"`
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Memory content
Memory string `json:"memory"`
// Additional metadata
Metadata interface{} `json:"metadata"`
// Similarity score (0-1)
Score float64 `json:"score"`
// Tag values for this memory
Tags MemoryV1SearchResponseResultsTags `json:"tags"`
UpdatedAt time.Time `json:"updated_at" format:"date-time"`
JSON memoryV1SearchResponseResultJSON `json:"-"`
}
func (*MemoryV1SearchResponseResult) UnmarshalJSON ¶
func (r *MemoryV1SearchResponseResult) UnmarshalJSON(data []byte) (err error)
type MemoryV1SearchResponseResultsTags ¶
type MemoryV1SearchResponseResultsTags struct {
Tag1 string `json:"tag_1"`
Tag10 string `json:"tag_10"`
Tag11 string `json:"tag_11"`
Tag12 string `json:"tag_12"`
Tag2 string `json:"tag_2"`
Tag3 string `json:"tag_3"`
Tag4 string `json:"tag_4"`
Tag5 string `json:"tag_5"`
Tag6 string `json:"tag_6"`
Tag7 string `json:"tag_7"`
Tag8 string `json:"tag_8"`
Tag9 string `json:"tag_9"`
JSON memoryV1SearchResponseResultsTagsJSON `json:"-"`
}
Tag values for this memory
func (*MemoryV1SearchResponseResultsTags) UnmarshalJSON ¶
func (r *MemoryV1SearchResponseResultsTags) UnmarshalJSON(data []byte) (err error)
type MemoryV1Service ¶
type MemoryV1Service struct {
Options []option.RequestOption
}
MemoryV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemoryV1Service method instead.
func NewMemoryV1Service ¶
func NewMemoryV1Service(opts ...option.RequestOption) (r *MemoryV1Service)
NewMemoryV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*MemoryV1Service) Delete ¶
func (r *MemoryV1Service) Delete(ctx context.Context, id string, opts ...option.RequestOption) (res *MemoryV1DeleteResponse, err error)
Delete a single memory by its ID.
func (*MemoryV1Service) DeleteAll ¶
func (r *MemoryV1Service) DeleteAll(ctx context.Context, body MemoryV1DeleteAllParams, opts ...option.RequestOption) (res *MemoryV1DeleteAllResponse, err error)
Delete multiple memories matching tag filter criteria. CAUTION: This will delete all matching memories for your organization.
func (*MemoryV1Service) Get ¶
func (r *MemoryV1Service) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *MemoryV1GetResponse, err error)
Retrieve a single memory by its ID.
func (*MemoryV1Service) List ¶
func (r *MemoryV1Service) List(ctx context.Context, query MemoryV1ListParams, opts ...option.RequestOption) (res *MemoryV1ListResponse, err error)
List all memories with optional filtering by tags and category.
func (*MemoryV1Service) New ¶
func (r *MemoryV1Service) New(ctx context.Context, body MemoryV1NewParams, opts ...option.RequestOption) (res *MemoryV1NewResponse, err error)
Store memories from conversation messages. Automatically extracts facts and handles deduplication.
Use tag_1 through tag_12 for filtering - these are generic indexed fields you can use for any purpose:
- Legal app: tag_1=client_id, tag_2=matter_id - Healthcare: tag_1=patient_id, tag_2=encounter_id - E-commerce: tag_1=customer_id, tag_2=order_id
func (*MemoryV1Service) Search ¶
func (r *MemoryV1Service) Search(ctx context.Context, body MemoryV1SearchParams, opts ...option.RequestOption) (res *MemoryV1SearchResponse, err error)
Search memories using semantic similarity. Filter by tag fields to narrow results.
Use tag_1 through tag_12 for filtering - these are generic indexed fields you define:
- Legal app: tag_1=client_id, tag_2=matter_id - Healthcare: tag_1=patient_id, tag_2=encounter_id
type OcrService ¶
type OcrService struct {
Options []option.RequestOption
V1 *OcrV1Service
}
OcrService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOcrService method instead.
func NewOcrService ¶
func NewOcrService(opts ...option.RequestOption) (r *OcrService)
NewOcrService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type OcrV1DownloadParamsType ¶
type OcrV1DownloadParamsType string
const ( OcrV1DownloadParamsTypeText OcrV1DownloadParamsType = "text" OcrV1DownloadParamsTypeJson OcrV1DownloadParamsType = "json" OcrV1DownloadParamsTypePdf OcrV1DownloadParamsType = "pdf" OcrV1DownloadParamsTypeOriginal OcrV1DownloadParamsType = "original" )
func (OcrV1DownloadParamsType) IsKnown ¶
func (r OcrV1DownloadParamsType) IsKnown() bool
type OcrV1GetResponse ¶
type OcrV1GetResponse struct {
// OCR job ID
ID string `json:"id,required"`
// Job creation timestamp
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// Current job status
Status OcrV1GetResponseStatus `json:"status,required"`
// Job completion timestamp
CompletedAt time.Time `json:"completed_at" format:"date-time"`
// Additional processing metadata
Metadata interface{} `json:"metadata"`
// Number of pages processed
PageCount int64 `json:"page_count"`
// Extracted text content (when completed)
Text string `json:"text"`
JSON ocrV1GetResponseJSON `json:"-"`
}
func (*OcrV1GetResponse) UnmarshalJSON ¶
func (r *OcrV1GetResponse) UnmarshalJSON(data []byte) (err error)
type OcrV1GetResponseStatus ¶
type OcrV1GetResponseStatus string
Current job status
const ( OcrV1GetResponseStatusPending OcrV1GetResponseStatus = "pending" OcrV1GetResponseStatusProcessing OcrV1GetResponseStatus = "processing" OcrV1GetResponseStatusCompleted OcrV1GetResponseStatus = "completed" OcrV1GetResponseStatusFailed OcrV1GetResponseStatus = "failed" )
func (OcrV1GetResponseStatus) IsKnown ¶
func (r OcrV1GetResponseStatus) IsKnown() bool
type OcrV1ProcessParams ¶
type OcrV1ProcessParams struct {
// URL or S3 path to the document to process
DocumentURL param.Field[string] `json:"document_url,required"`
// URL to receive completion webhook
CallbackURL param.Field[string] `json:"callback_url"`
// Optional custom document identifier
DocumentID param.Field[string] `json:"document_id"`
// OCR engine to use
Engine param.Field[OcrV1ProcessParamsEngine] `json:"engine"`
// Additional processing options
Features param.Field[OcrV1ProcessParamsFeatures] `json:"features"`
// S3 bucket to store results
ResultBucket param.Field[string] `json:"result_bucket"`
// S3 key prefix for results
ResultPrefix param.Field[string] `json:"result_prefix"`
}
func (OcrV1ProcessParams) MarshalJSON ¶
func (r OcrV1ProcessParams) MarshalJSON() (data []byte, err error)
type OcrV1ProcessParamsEngine ¶
type OcrV1ProcessParamsEngine string
OCR engine to use
const ( OcrV1ProcessParamsEngineDoctr OcrV1ProcessParamsEngine = "doctr" OcrV1ProcessParamsEnginePaddleocr OcrV1ProcessParamsEngine = "paddleocr" )
func (OcrV1ProcessParamsEngine) IsKnown ¶
func (r OcrV1ProcessParamsEngine) IsKnown() bool
type OcrV1ProcessParamsFeatures ¶
type OcrV1ProcessParamsFeatures struct {
// Generate searchable PDF with text layer
Embed param.Field[map[string]interface{}] `json:"embed"`
// Detect and extract form fields
Forms param.Field[map[string]interface{}] `json:"forms"`
// Extract tables as structured data
Tables param.Field[OcrV1ProcessParamsFeaturesTables] `json:"tables"`
}
Additional processing options
func (OcrV1ProcessParamsFeatures) MarshalJSON ¶
func (r OcrV1ProcessParamsFeatures) MarshalJSON() (data []byte, err error)
type OcrV1ProcessParamsFeaturesTables ¶
type OcrV1ProcessParamsFeaturesTables struct {
// Output format for extracted tables
Format param.Field[OcrV1ProcessParamsFeaturesTablesFormat] `json:"format"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
Extract tables as structured data
func (OcrV1ProcessParamsFeaturesTables) MarshalJSON ¶
func (r OcrV1ProcessParamsFeaturesTables) MarshalJSON() (data []byte, err error)
type OcrV1ProcessParamsFeaturesTablesFormat ¶
type OcrV1ProcessParamsFeaturesTablesFormat string
Output format for extracted tables
const ( OcrV1ProcessParamsFeaturesTablesFormatCsv OcrV1ProcessParamsFeaturesTablesFormat = "csv" OcrV1ProcessParamsFeaturesTablesFormatJson OcrV1ProcessParamsFeaturesTablesFormat = "json" )
func (OcrV1ProcessParamsFeaturesTablesFormat) IsKnown ¶
func (r OcrV1ProcessParamsFeaturesTablesFormat) IsKnown() bool
type OcrV1ProcessResponse ¶
type OcrV1ProcessResponse struct {
// Unique job identifier
ID string `json:"id"`
// Job creation timestamp
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Document identifier
DocumentID string `json:"document_id"`
// OCR engine used
Engine string `json:"engine"`
// Estimated completion time
EstimatedCompletion time.Time `json:"estimated_completion" format:"date-time"`
// Number of pages detected
PageCount int64 `json:"page_count"`
// Current job status
Status OcrV1ProcessResponseStatus `json:"status"`
JSON ocrV1ProcessResponseJSON `json:"-"`
}
func (*OcrV1ProcessResponse) UnmarshalJSON ¶
func (r *OcrV1ProcessResponse) UnmarshalJSON(data []byte) (err error)
type OcrV1ProcessResponseStatus ¶
type OcrV1ProcessResponseStatus string
Current job status
const ( OcrV1ProcessResponseStatusQueued OcrV1ProcessResponseStatus = "queued" OcrV1ProcessResponseStatusProcessing OcrV1ProcessResponseStatus = "processing" OcrV1ProcessResponseStatusCompleted OcrV1ProcessResponseStatus = "completed" OcrV1ProcessResponseStatusFailed OcrV1ProcessResponseStatus = "failed" )
func (OcrV1ProcessResponseStatus) IsKnown ¶
func (r OcrV1ProcessResponseStatus) IsKnown() bool
type OcrV1Service ¶
type OcrV1Service struct {
Options []option.RequestOption
}
OcrV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOcrV1Service method instead.
func NewOcrV1Service ¶
func NewOcrV1Service(opts ...option.RequestOption) (r *OcrV1Service)
NewOcrV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OcrV1Service) Download ¶
func (r *OcrV1Service) Download(ctx context.Context, id string, type_ OcrV1DownloadParamsType, opts ...option.RequestOption) (res *http.Response, err error)
Download OCR processing results in various formats. Returns the processed document as text extraction, structured JSON with coordinates, searchable PDF with text layer, or the original uploaded document.
func (*OcrV1Service) Get ¶
func (r *OcrV1Service) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *OcrV1GetResponse, err error)
Retrieve the status and results of an OCR job. Returns job progress, extracted text, and metadata when processing is complete.
func (*OcrV1Service) Process ¶
func (r *OcrV1Service) Process(ctx context.Context, body OcrV1ProcessParams, opts ...option.RequestOption) (res *OcrV1ProcessResponse, err error)
Submit a document for OCR processing to extract text, detect tables, forms, and other features. Supports PDFs, images, and scanned documents. Returns a job ID that can be used to track processing status.
type PrivilegeService ¶
type PrivilegeService struct {
Options []option.RequestOption
V1 *PrivilegeV1Service
}
PrivilegeService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPrivilegeService method instead.
func NewPrivilegeService ¶
func NewPrivilegeService(opts ...option.RequestOption) (r *PrivilegeService)
NewPrivilegeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type PrivilegeV1DetectParams ¶
type PrivilegeV1DetectParams struct {
// Privilege categories to check. Defaults to all: attorney_client, work_product,
// common_interest, litigation_hold
Categories param.Field[[]PrivilegeV1DetectParamsCategory] `json:"categories"`
// Text content to analyze (required if document_id not provided)
Content param.Field[string] `json:"content"`
// Vault object ID to analyze (required if content not provided)
DocumentID param.Field[string] `json:"document_id"`
// Include detailed rationale for each category
IncludeRationale param.Field[bool] `json:"include_rationale"`
// Jurisdiction for privilege rules
Jurisdiction param.Field[PrivilegeV1DetectParamsJurisdiction] `json:"jurisdiction"`
// LLM model to use for analysis
Model param.Field[string] `json:"model"`
// Vault ID (required when using document_id)
VaultID param.Field[string] `json:"vault_id"`
}
func (PrivilegeV1DetectParams) MarshalJSON ¶
func (r PrivilegeV1DetectParams) MarshalJSON() (data []byte, err error)
type PrivilegeV1DetectParamsCategory ¶
type PrivilegeV1DetectParamsCategory string
const ( PrivilegeV1DetectParamsCategoryAttorneyClient PrivilegeV1DetectParamsCategory = "attorney_client" PrivilegeV1DetectParamsCategoryWorkProduct PrivilegeV1DetectParamsCategory = "work_product" PrivilegeV1DetectParamsCategoryCommonInterest PrivilegeV1DetectParamsCategory = "common_interest" PrivilegeV1DetectParamsCategoryLitigationHold PrivilegeV1DetectParamsCategory = "litigation_hold" )
func (PrivilegeV1DetectParamsCategory) IsKnown ¶
func (r PrivilegeV1DetectParamsCategory) IsKnown() bool
type PrivilegeV1DetectParamsJurisdiction ¶
type PrivilegeV1DetectParamsJurisdiction string
Jurisdiction for privilege rules
const (
PrivilegeV1DetectParamsJurisdictionUsFederal PrivilegeV1DetectParamsJurisdiction = "US-Federal"
)
func (PrivilegeV1DetectParamsJurisdiction) IsKnown ¶
func (r PrivilegeV1DetectParamsJurisdiction) IsKnown() bool
type PrivilegeV1DetectResponse ¶
type PrivilegeV1DetectResponse struct {
Categories []PrivilegeV1DetectResponseCategory `json:"categories,required"`
// Overall confidence score (0-1)
Confidence float64 `json:"confidence,required"`
// Policy-friendly explanation for privilege log
PolicyRationale string `json:"policy_rationale,required"`
// Whether any privilege was detected
Privileged bool `json:"privileged,required"`
// Recommended action for discovery
Recommendation PrivilegeV1DetectResponseRecommendation `json:"recommendation,required"`
JSON privilegeV1DetectResponseJSON `json:"-"`
}
func (*PrivilegeV1DetectResponse) UnmarshalJSON ¶
func (r *PrivilegeV1DetectResponse) UnmarshalJSON(data []byte) (err error)
type PrivilegeV1DetectResponseCategory ¶
type PrivilegeV1DetectResponseCategory struct {
// Confidence for this category (0-1)
Confidence float64 `json:"confidence"`
// Whether this privilege type was detected
Detected bool `json:"detected"`
// Specific phrases or patterns found
Indicators []string `json:"indicators"`
// Explanation of detection result
Rationale string `json:"rationale"`
// Privilege category
Type string `json:"type"`
JSON privilegeV1DetectResponseCategoryJSON `json:"-"`
}
func (*PrivilegeV1DetectResponseCategory) UnmarshalJSON ¶
func (r *PrivilegeV1DetectResponseCategory) UnmarshalJSON(data []byte) (err error)
type PrivilegeV1DetectResponseRecommendation ¶
type PrivilegeV1DetectResponseRecommendation string
Recommended action for discovery
const ( PrivilegeV1DetectResponseRecommendationWithhold PrivilegeV1DetectResponseRecommendation = "withhold" PrivilegeV1DetectResponseRecommendationRedact PrivilegeV1DetectResponseRecommendation = "redact" PrivilegeV1DetectResponseRecommendationProduce PrivilegeV1DetectResponseRecommendation = "produce" PrivilegeV1DetectResponseRecommendationReview PrivilegeV1DetectResponseRecommendation = "review" )
func (PrivilegeV1DetectResponseRecommendation) IsKnown ¶
func (r PrivilegeV1DetectResponseRecommendation) IsKnown() bool
type PrivilegeV1Service ¶
type PrivilegeV1Service struct {
Options []option.RequestOption
}
PrivilegeV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPrivilegeV1Service method instead.
func NewPrivilegeV1Service ¶
func NewPrivilegeV1Service(opts ...option.RequestOption) (r *PrivilegeV1Service)
NewPrivilegeV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*PrivilegeV1Service) Detect ¶
func (r *PrivilegeV1Service) Detect(ctx context.Context, body PrivilegeV1DetectParams, opts ...option.RequestOption) (res *PrivilegeV1DetectResponse, err error)
Analyzes text or vault documents for legal privilege. Detects attorney-client privilege, work product doctrine, common interest privilege, and litigation hold materials.
Returns structured privilege flags with confidence scores and policy-friendly rationale suitable for discovery workflows and privilege logs.
**Size Limit:** Maximum 200,000 characters (larger documents rejected).
**Permissions:** Requires `chat` permission. When using `document_id`, also requires `vault` permission.
**Note:** When analyzing vault documents, results are automatically stored in the document's `privilege_analysis` metadata field.
type SearchService ¶
type SearchService struct {
Options []option.RequestOption
V1 *SearchV1Service
}
SearchService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSearchService method instead.
func NewSearchService ¶
func NewSearchService(opts ...option.RequestOption) (r *SearchService)
NewSearchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type SearchV1AnswerParams ¶
type SearchV1AnswerParams struct {
// The question or topic to research and answer
Query param.Field[string] `json:"query,required"`
// Exclude these domains from search
ExcludeDomains param.Field[[]string] `json:"excludeDomains"`
// Only search within these domains
IncludeDomains param.Field[[]string] `json:"includeDomains"`
// Maximum tokens for LLM response
MaxTokens param.Field[int64] `json:"maxTokens"`
// LLM model to use when useCustomLLM is true
Model param.Field[string] `json:"model"`
// Number of search results to consider
NumResults param.Field[int64] `json:"numResults"`
// Type of search to perform
SearchType param.Field[SearchV1AnswerParamsSearchType] `json:"searchType"`
// Stream the response (only for native provider answers)
Stream param.Field[bool] `json:"stream"`
// LLM temperature for answer generation
Temperature param.Field[float64] `json:"temperature"`
// Include text content in response
Text param.Field[bool] `json:"text"`
// Use Case.dev LLM for answer generation instead of provider's native answer
UseCustomLlm param.Field[bool] `json:"useCustomLLM"`
}
func (SearchV1AnswerParams) MarshalJSON ¶
func (r SearchV1AnswerParams) MarshalJSON() (data []byte, err error)
type SearchV1AnswerParamsSearchType ¶
type SearchV1AnswerParamsSearchType string
Type of search to perform
const ( SearchV1AnswerParamsSearchTypeAuto SearchV1AnswerParamsSearchType = "auto" SearchV1AnswerParamsSearchTypeWeb SearchV1AnswerParamsSearchType = "web" SearchV1AnswerParamsSearchTypeNews SearchV1AnswerParamsSearchType = "news" SearchV1AnswerParamsSearchTypeAcademic SearchV1AnswerParamsSearchType = "academic" )
func (SearchV1AnswerParamsSearchType) IsKnown ¶
func (r SearchV1AnswerParamsSearchType) IsKnown() bool
type SearchV1AnswerResponse ¶
type SearchV1AnswerResponse struct {
// The generated answer with citations
Answer string `json:"answer"`
// Sources used to generate the answer
Citations []SearchV1AnswerResponseCitation `json:"citations"`
// Model used for answer generation
Model string `json:"model"`
// Type of search performed
SearchType string `json:"searchType"`
JSON searchV1AnswerResponseJSON `json:"-"`
}
func (*SearchV1AnswerResponse) UnmarshalJSON ¶
func (r *SearchV1AnswerResponse) UnmarshalJSON(data []byte) (err error)
type SearchV1AnswerResponseCitation ¶
type SearchV1AnswerResponseCitation struct {
ID string `json:"id"`
PublishedDate string `json:"publishedDate"`
Text string `json:"text"`
Title string `json:"title"`
URL string `json:"url"`
JSON searchV1AnswerResponseCitationJSON `json:"-"`
}
func (*SearchV1AnswerResponseCitation) UnmarshalJSON ¶
func (r *SearchV1AnswerResponseCitation) UnmarshalJSON(data []byte) (err error)
type SearchV1ContentsParams ¶
type SearchV1ContentsParams struct {
// Array of URLs to scrape and extract content from
URLs param.Field[[]string] `json:"urls,required" format:"uri"`
// Context to guide content extraction and summarization
Context param.Field[string] `json:"context"`
// Additional extraction options
Extras param.Field[interface{}] `json:"extras"`
// Whether to include content highlights
Highlights param.Field[bool] `json:"highlights"`
// Whether to perform live crawling for dynamic content
Livecrawl param.Field[bool] `json:"livecrawl"`
// Timeout in seconds for live crawling
LivecrawlTimeout param.Field[int64] `json:"livecrawlTimeout"`
// Whether to extract content from linked subpages
Subpages param.Field[bool] `json:"subpages"`
// Maximum number of subpages to crawl
SubpageTarget param.Field[int64] `json:"subpageTarget"`
// Whether to generate content summaries
Summary param.Field[bool] `json:"summary"`
// Whether to extract text content
Text param.Field[bool] `json:"text"`
}
func (SearchV1ContentsParams) MarshalJSON ¶
func (r SearchV1ContentsParams) MarshalJSON() (data []byte, err error)
type SearchV1ContentsResponse ¶
type SearchV1ContentsResponse struct {
Results []SearchV1ContentsResponseResult `json:"results"`
JSON searchV1ContentsResponseJSON `json:"-"`
}
func (*SearchV1ContentsResponse) UnmarshalJSON ¶
func (r *SearchV1ContentsResponse) UnmarshalJSON(data []byte) (err error)
type SearchV1ContentsResponseResult ¶
type SearchV1ContentsResponseResult struct {
// Content highlights if requested
Highlights []string `json:"highlights"`
// Additional metadata about the content
Metadata interface{} `json:"metadata"`
// Content summary if requested
Summary string `json:"summary"`
// Extracted text content
Text string `json:"text"`
// Page title
Title string `json:"title"`
// Source URL
URL string `json:"url"`
JSON searchV1ContentsResponseResultJSON `json:"-"`
}
func (*SearchV1ContentsResponseResult) UnmarshalJSON ¶
func (r *SearchV1ContentsResponseResult) UnmarshalJSON(data []byte) (err error)
type SearchV1GetResearchParams ¶
type SearchV1GetResearchParams struct {
// Filter specific event types for streaming
Events param.Field[string] `query:"events"`
// Enable streaming for real-time updates
Stream param.Field[bool] `query:"stream"`
}
func (SearchV1GetResearchParams) URLQuery ¶
func (r SearchV1GetResearchParams) URLQuery() (v url.Values)
URLQuery serializes SearchV1GetResearchParams's query parameters as `url.Values`.
type SearchV1GetResearchResponse ¶
type SearchV1GetResearchResponse struct {
// Research task ID
ID string `json:"id"`
// Task completion timestamp
CompletedAt time.Time `json:"completedAt" format:"date-time"`
// Task creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Research model used
Model SearchV1GetResearchResponseModel `json:"model"`
// Completion percentage (0-100)
Progress float64 `json:"progress"`
// Original research query
Query string `json:"query"`
// Research findings and analysis
Results SearchV1GetResearchResponseResults `json:"results"`
// Current status of the research task
Status SearchV1GetResearchResponseStatus `json:"status"`
JSON searchV1GetResearchResponseJSON `json:"-"`
}
func (*SearchV1GetResearchResponse) UnmarshalJSON ¶
func (r *SearchV1GetResearchResponse) UnmarshalJSON(data []byte) (err error)
type SearchV1GetResearchResponseModel ¶
type SearchV1GetResearchResponseModel string
Research model used
const ( SearchV1GetResearchResponseModelFast SearchV1GetResearchResponseModel = "fast" SearchV1GetResearchResponseModelNormal SearchV1GetResearchResponseModel = "normal" SearchV1GetResearchResponseModelPro SearchV1GetResearchResponseModel = "pro" )
func (SearchV1GetResearchResponseModel) IsKnown ¶
func (r SearchV1GetResearchResponseModel) IsKnown() bool
type SearchV1GetResearchResponseResults ¶
type SearchV1GetResearchResponseResults struct {
// Detailed research sections
Sections []SearchV1GetResearchResponseResultsSection `json:"sections"`
// All sources referenced in research
Sources []SearchV1GetResearchResponseResultsSource `json:"sources"`
// Executive summary of research findings
Summary string `json:"summary"`
JSON searchV1GetResearchResponseResultsJSON `json:"-"`
}
Research findings and analysis
func (*SearchV1GetResearchResponseResults) UnmarshalJSON ¶
func (r *SearchV1GetResearchResponseResults) UnmarshalJSON(data []byte) (err error)
type SearchV1GetResearchResponseResultsSection ¶
type SearchV1GetResearchResponseResultsSection struct {
Content string `json:"content"`
Sources []SearchV1GetResearchResponseResultsSectionsSource `json:"sources"`
Title string `json:"title"`
JSON searchV1GetResearchResponseResultsSectionJSON `json:"-"`
}
func (*SearchV1GetResearchResponseResultsSection) UnmarshalJSON ¶
func (r *SearchV1GetResearchResponseResultsSection) UnmarshalJSON(data []byte) (err error)
type SearchV1GetResearchResponseResultsSectionsSource ¶
type SearchV1GetResearchResponseResultsSectionsSource struct {
Snippet string `json:"snippet"`
Title string `json:"title"`
URL string `json:"url"`
JSON searchV1GetResearchResponseResultsSectionsSourceJSON `json:"-"`
}
func (*SearchV1GetResearchResponseResultsSectionsSource) UnmarshalJSON ¶
func (r *SearchV1GetResearchResponseResultsSectionsSource) UnmarshalJSON(data []byte) (err error)
type SearchV1GetResearchResponseResultsSource ¶
type SearchV1GetResearchResponseResultsSource struct {
Snippet string `json:"snippet"`
Title string `json:"title"`
URL string `json:"url"`
JSON searchV1GetResearchResponseResultsSourceJSON `json:"-"`
}
func (*SearchV1GetResearchResponseResultsSource) UnmarshalJSON ¶
func (r *SearchV1GetResearchResponseResultsSource) UnmarshalJSON(data []byte) (err error)
type SearchV1GetResearchResponseStatus ¶
type SearchV1GetResearchResponseStatus string
Current status of the research task
const ( SearchV1GetResearchResponseStatusPending SearchV1GetResearchResponseStatus = "pending" SearchV1GetResearchResponseStatusRunning SearchV1GetResearchResponseStatus = "running" SearchV1GetResearchResponseStatusCompleted SearchV1GetResearchResponseStatus = "completed" SearchV1GetResearchResponseStatusFailed SearchV1GetResearchResponseStatus = "failed" )
func (SearchV1GetResearchResponseStatus) IsKnown ¶
func (r SearchV1GetResearchResponseStatus) IsKnown() bool
type SearchV1ResearchParams ¶
type SearchV1ResearchParams struct {
// Research instructions or query
Instructions param.Field[string] `json:"instructions,required"`
// Research quality level - fast (quick), normal (balanced), pro (comprehensive)
Model param.Field[SearchV1ResearchParamsModel] `json:"model"`
// Optional JSON schema to structure the research output
OutputSchema param.Field[interface{}] `json:"outputSchema"`
// Alias for instructions (for convenience)
Query param.Field[string] `json:"query"`
}
func (SearchV1ResearchParams) MarshalJSON ¶
func (r SearchV1ResearchParams) MarshalJSON() (data []byte, err error)
type SearchV1ResearchParamsModel ¶
type SearchV1ResearchParamsModel string
Research quality level - fast (quick), normal (balanced), pro (comprehensive)
const ( SearchV1ResearchParamsModelFast SearchV1ResearchParamsModel = "fast" SearchV1ResearchParamsModelNormal SearchV1ResearchParamsModel = "normal" SearchV1ResearchParamsModelPro SearchV1ResearchParamsModel = "pro" )
func (SearchV1ResearchParamsModel) IsKnown ¶
func (r SearchV1ResearchParamsModel) IsKnown() bool
type SearchV1ResearchResponse ¶
type SearchV1ResearchResponse struct {
// Model used for research
Model string `json:"model"`
// Unique identifier for this research
ResearchID string `json:"researchId"`
// Research findings and analysis
Results interface{} `json:"results"`
JSON searchV1ResearchResponseJSON `json:"-"`
}
func (*SearchV1ResearchResponse) UnmarshalJSON ¶
func (r *SearchV1ResearchResponse) UnmarshalJSON(data []byte) (err error)
type SearchV1SearchParams ¶
type SearchV1SearchParams struct {
// Primary search query
Query param.Field[string] `json:"query,required"`
// Additional related search queries to enhance results
AdditionalQueries param.Field[[]string] `json:"additionalQueries"`
// Category filter for search results
Category param.Field[string] `json:"category"`
// Specific content type to search for
Contents param.Field[string] `json:"contents"`
// End date for crawl date filtering
EndCrawlDate param.Field[time.Time] `json:"endCrawlDate" format:"date"`
// End date for published date filtering
EndPublishedDate param.Field[time.Time] `json:"endPublishedDate" format:"date"`
// Domains to exclude from search results
ExcludeDomains param.Field[[]string] `json:"excludeDomains"`
// Domains to include in search results
IncludeDomains param.Field[[]string] `json:"includeDomains"`
// Whether to include full text content in results
IncludeText param.Field[bool] `json:"includeText"`
// Number of search results to return
NumResults param.Field[int64] `json:"numResults"`
// Start date for crawl date filtering
StartCrawlDate param.Field[time.Time] `json:"startCrawlDate" format:"date"`
// Start date for published date filtering
StartPublishedDate param.Field[time.Time] `json:"startPublishedDate" format:"date"`
// Type of search to perform
Type param.Field[SearchV1SearchParamsType] `json:"type"`
// Geographic location for localized results
UserLocation param.Field[string] `json:"userLocation"`
}
func (SearchV1SearchParams) MarshalJSON ¶
func (r SearchV1SearchParams) MarshalJSON() (data []byte, err error)
type SearchV1SearchParamsType ¶
type SearchV1SearchParamsType string
Type of search to perform
const ( SearchV1SearchParamsTypeAuto SearchV1SearchParamsType = "auto" SearchV1SearchParamsTypeSearch SearchV1SearchParamsType = "search" SearchV1SearchParamsTypeNews SearchV1SearchParamsType = "news" )
func (SearchV1SearchParamsType) IsKnown ¶
func (r SearchV1SearchParamsType) IsKnown() bool
type SearchV1SearchResponse ¶
type SearchV1SearchResponse struct {
// Original search query
Query string `json:"query"`
// Array of search results
Results []SearchV1SearchResponseResult `json:"results"`
// Total number of results found
TotalResults int64 `json:"totalResults"`
JSON searchV1SearchResponseJSON `json:"-"`
}
func (*SearchV1SearchResponse) UnmarshalJSON ¶
func (r *SearchV1SearchResponse) UnmarshalJSON(data []byte) (err error)
type SearchV1SearchResponseResult ¶
type SearchV1SearchResponseResult struct {
// Domain of the source
Domain string `json:"domain"`
// Publication date of the content
PublishedDate time.Time `json:"publishedDate" format:"date-time"`
// Brief excerpt from the content
Snippet string `json:"snippet"`
// Title of the search result
Title string `json:"title"`
// URL of the search result
URL string `json:"url"`
JSON searchV1SearchResponseResultJSON `json:"-"`
}
func (*SearchV1SearchResponseResult) UnmarshalJSON ¶
func (r *SearchV1SearchResponseResult) UnmarshalJSON(data []byte) (err error)
type SearchV1Service ¶
type SearchV1Service struct {
Options []option.RequestOption
}
SearchV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSearchV1Service method instead.
func NewSearchV1Service ¶
func NewSearchV1Service(opts ...option.RequestOption) (r *SearchV1Service)
NewSearchV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SearchV1Service) Answer ¶
func (r *SearchV1Service) Answer(ctx context.Context, body SearchV1AnswerParams, opts ...option.RequestOption) (res *SearchV1AnswerResponse, err error)
Generate comprehensive answers to questions using web search results. Supports two modes: native provider answers or custom LLM-powered answers using Case.dev's AI gateway. Perfect for legal research, fact-checking, and gathering supporting evidence for cases.
func (*SearchV1Service) Contents ¶
func (r *SearchV1Service) Contents(ctx context.Context, body SearchV1ContentsParams, opts ...option.RequestOption) (res *SearchV1ContentsResponse, err error)
Scrapes and extracts text content from web pages, PDFs, and documents. Useful for legal research, evidence collection, and document analysis. Supports live crawling, subpage extraction, and content summarization.
func (*SearchV1Service) GetResearch ¶
func (r *SearchV1Service) GetResearch(ctx context.Context, id string, query SearchV1GetResearchParams, opts ...option.RequestOption) (res *SearchV1GetResearchResponse, err error)
Retrieve the status and results of a deep research task by ID. Supports both standard JSON responses and streaming for real-time updates as the research progresses. Research tasks analyze topics comprehensively using web search and AI synthesis.
func (*SearchV1Service) Research ¶
func (r *SearchV1Service) Research(ctx context.Context, body SearchV1ResearchParams, opts ...option.RequestOption) (res *SearchV1ResearchResponse, err error)
Performs deep research by conducting multi-step analysis, gathering information from multiple sources, and providing comprehensive insights. Ideal for legal research, case analysis, and due diligence investigations.
func (*SearchV1Service) Search ¶
func (r *SearchV1Service) Search(ctx context.Context, body SearchV1SearchParams, opts ...option.RequestOption) (res *SearchV1SearchResponse, err error)
Executes intelligent web search queries with advanced filtering and customization options. Ideal for legal research, case law discovery, and gathering supporting documentation for litigation or compliance matters.
func (*SearchV1Service) Similar ¶
func (r *SearchV1Service) Similar(ctx context.Context, body SearchV1SimilarParams, opts ...option.RequestOption) (res *SearchV1SimilarResponse, err error)
Find web pages and documents similar to a given URL. Useful for legal research to discover related case law, statutes, or legal commentary that shares similar themes or content structure.
type SearchV1SimilarParams ¶
type SearchV1SimilarParams struct {
// The URL to find similar content for
URL param.Field[string] `json:"url,required" format:"uri"`
// Additional content to consider for similarity matching
Contents param.Field[string] `json:"contents"`
// Only include pages crawled before this date
EndCrawlDate param.Field[time.Time] `json:"endCrawlDate" format:"date"`
// Only include pages published before this date
EndPublishedDate param.Field[time.Time] `json:"endPublishedDate" format:"date"`
// Exclude results from these domains
ExcludeDomains param.Field[[]string] `json:"excludeDomains"`
// Only search within these domains
IncludeDomains param.Field[[]string] `json:"includeDomains"`
// Whether to include extracted text content in results
IncludeText param.Field[bool] `json:"includeText"`
// Number of similar results to return
NumResults param.Field[int64] `json:"numResults"`
// Only include pages crawled after this date
StartCrawlDate param.Field[time.Time] `json:"startCrawlDate" format:"date"`
// Only include pages published after this date
StartPublishedDate param.Field[time.Time] `json:"startPublishedDate" format:"date"`
}
func (SearchV1SimilarParams) MarshalJSON ¶
func (r SearchV1SimilarParams) MarshalJSON() (data []byte, err error)
type SearchV1SimilarResponse ¶
type SearchV1SimilarResponse struct {
ProcessingTime float64 `json:"processingTime"`
Results []SearchV1SimilarResponseResult `json:"results"`
TotalResults int64 `json:"totalResults"`
JSON searchV1SimilarResponseJSON `json:"-"`
}
func (*SearchV1SimilarResponse) UnmarshalJSON ¶
func (r *SearchV1SimilarResponse) UnmarshalJSON(data []byte) (err error)
type SearchV1SimilarResponseResult ¶
type SearchV1SimilarResponseResult struct {
Domain string `json:"domain"`
PublishedDate string `json:"publishedDate"`
SimilarityScore float64 `json:"similarityScore"`
Snippet string `json:"snippet"`
Text string `json:"text"`
Title string `json:"title"`
URL string `json:"url"`
JSON searchV1SimilarResponseResultJSON `json:"-"`
}
func (*SearchV1SimilarResponseResult) UnmarshalJSON ¶
func (r *SearchV1SimilarResponseResult) UnmarshalJSON(data []byte) (err error)
type SuperdocService ¶
type SuperdocService struct {
Options []option.RequestOption
V1 *SuperdocV1Service
}
SuperdocService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSuperdocService method instead.
func NewSuperdocService ¶
func NewSuperdocService(opts ...option.RequestOption) (r *SuperdocService)
NewSuperdocService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type SuperdocV1AnnotateParams ¶
type SuperdocV1AnnotateParams struct {
// Document source - provide either URL or base64
Document param.Field[SuperdocV1AnnotateParamsDocument] `json:"document,required"`
// Fields to populate in the template
Fields param.Field[[]SuperdocV1AnnotateParamsField] `json:"fields,required"`
// Output format for the annotated document
OutputFormat param.Field[SuperdocV1AnnotateParamsOutputFormat] `json:"output_format"`
}
func (SuperdocV1AnnotateParams) MarshalJSON ¶
func (r SuperdocV1AnnotateParams) MarshalJSON() (data []byte, err error)
type SuperdocV1AnnotateParamsDocument ¶
type SuperdocV1AnnotateParamsDocument struct {
// Base64-encoded DOCX template
Base64 param.Field[string] `json:"base64"`
// URL to the DOCX template
URL param.Field[string] `json:"url"`
}
Document source - provide either URL or base64
func (SuperdocV1AnnotateParamsDocument) MarshalJSON ¶
func (r SuperdocV1AnnotateParamsDocument) MarshalJSON() (data []byte, err error)
type SuperdocV1AnnotateParamsField ¶
type SuperdocV1AnnotateParamsField struct {
// Field data type
Type param.Field[SuperdocV1AnnotateParamsFieldsType] `json:"type,required"`
// Value to populate
Value param.Field[SuperdocV1AnnotateParamsFieldsValueUnion] `json:"value,required"`
// Target field ID (for single field)
ID param.Field[string] `json:"id"`
// Target field group (for multiple fields with same tag)
Group param.Field[string] `json:"group"`
// Optional configuration (e.g., image dimensions)
Options param.Field[SuperdocV1AnnotateParamsFieldsOptions] `json:"options"`
}
func (SuperdocV1AnnotateParamsField) MarshalJSON ¶
func (r SuperdocV1AnnotateParamsField) MarshalJSON() (data []byte, err error)
type SuperdocV1AnnotateParamsFieldsOptions ¶
type SuperdocV1AnnotateParamsFieldsOptions struct {
// Image height in pixels
Height param.Field[float64] `json:"height"`
// Image width in pixels
Width param.Field[float64] `json:"width"`
}
Optional configuration (e.g., image dimensions)
func (SuperdocV1AnnotateParamsFieldsOptions) MarshalJSON ¶
func (r SuperdocV1AnnotateParamsFieldsOptions) MarshalJSON() (data []byte, err error)
type SuperdocV1AnnotateParamsFieldsType ¶
type SuperdocV1AnnotateParamsFieldsType string
Field data type
const ( SuperdocV1AnnotateParamsFieldsTypeText SuperdocV1AnnotateParamsFieldsType = "text" SuperdocV1AnnotateParamsFieldsTypeImage SuperdocV1AnnotateParamsFieldsType = "image" SuperdocV1AnnotateParamsFieldsTypeDate SuperdocV1AnnotateParamsFieldsType = "date" SuperdocV1AnnotateParamsFieldsTypeNumber SuperdocV1AnnotateParamsFieldsType = "number" )
func (SuperdocV1AnnotateParamsFieldsType) IsKnown ¶
func (r SuperdocV1AnnotateParamsFieldsType) IsKnown() bool
type SuperdocV1AnnotateParamsFieldsValueUnion ¶
type SuperdocV1AnnotateParamsFieldsValueUnion interface {
ImplementsSuperdocV1AnnotateParamsFieldsValueUnion()
}
Value to populate
Satisfied by [shared.UnionString], [shared.UnionFloat].
type SuperdocV1AnnotateParamsOutputFormat ¶
type SuperdocV1AnnotateParamsOutputFormat string
Output format for the annotated document
const ( SuperdocV1AnnotateParamsOutputFormatDocx SuperdocV1AnnotateParamsOutputFormat = "docx" SuperdocV1AnnotateParamsOutputFormatPdf SuperdocV1AnnotateParamsOutputFormat = "pdf" )
func (SuperdocV1AnnotateParamsOutputFormat) IsKnown ¶
func (r SuperdocV1AnnotateParamsOutputFormat) IsKnown() bool
type SuperdocV1ConvertParams ¶
type SuperdocV1ConvertParams struct {
// Source format of the document
From param.Field[SuperdocV1ConvertParamsFrom] `json:"from,required"`
// Base64-encoded document content
DocumentBase64 param.Field[string] `json:"document_base64"`
// URL to the document to convert
DocumentURL param.Field[string] `json:"document_url"`
// Target format for conversion
To param.Field[SuperdocV1ConvertParamsTo] `json:"to"`
}
func (SuperdocV1ConvertParams) MarshalJSON ¶
func (r SuperdocV1ConvertParams) MarshalJSON() (data []byte, err error)
type SuperdocV1ConvertParamsFrom ¶
type SuperdocV1ConvertParamsFrom string
Source format of the document
const ( SuperdocV1ConvertParamsFromDocx SuperdocV1ConvertParamsFrom = "docx" SuperdocV1ConvertParamsFromMd SuperdocV1ConvertParamsFrom = "md" SuperdocV1ConvertParamsFromHTML SuperdocV1ConvertParamsFrom = "html" )
func (SuperdocV1ConvertParamsFrom) IsKnown ¶
func (r SuperdocV1ConvertParamsFrom) IsKnown() bool
type SuperdocV1ConvertParamsTo ¶
type SuperdocV1ConvertParamsTo string
Target format for conversion
const ( SuperdocV1ConvertParamsToPdf SuperdocV1ConvertParamsTo = "pdf" SuperdocV1ConvertParamsToDocx SuperdocV1ConvertParamsTo = "docx" )
func (SuperdocV1ConvertParamsTo) IsKnown ¶
func (r SuperdocV1ConvertParamsTo) IsKnown() bool
type SuperdocV1Service ¶
type SuperdocV1Service struct {
Options []option.RequestOption
}
SuperdocV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSuperdocV1Service method instead.
func NewSuperdocV1Service ¶
func NewSuperdocV1Service(opts ...option.RequestOption) (r *SuperdocV1Service)
NewSuperdocV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SuperdocV1Service) Annotate ¶
func (r *SuperdocV1Service) Annotate(ctx context.Context, body SuperdocV1AnnotateParams, opts ...option.RequestOption) (res *http.Response, err error)
Populate fields inside a DOCX template using SuperDoc annotations. Supports text, images, dates, and numbers. Can target individual fields by ID or multiple fields by group.
func (*SuperdocV1Service) Convert ¶
func (r *SuperdocV1Service) Convert(ctx context.Context, body SuperdocV1ConvertParams, opts ...option.RequestOption) (res *http.Response, err error)
Convert documents between formats using SuperDoc. Supports DOCX to PDF, Markdown to DOCX, and HTML to DOCX conversions.
type SystemListServicesResponse ¶
type SystemListServicesResponse struct {
Services []SystemListServicesResponseService `json:"services,required"`
JSON systemListServicesResponseJSON `json:"-"`
}
func (*SystemListServicesResponse) UnmarshalJSON ¶
func (r *SystemListServicesResponse) UnmarshalJSON(data []byte) (err error)
type SystemListServicesResponseService ¶
type SystemListServicesResponseService struct {
ID string `json:"id,required"`
Description string `json:"description,required"`
Href string `json:"href,required"`
Icon string `json:"icon,required"`
Name string `json:"name,required"`
Order int64 `json:"order,required"`
JSON systemListServicesResponseServiceJSON `json:"-"`
}
func (*SystemListServicesResponseService) UnmarshalJSON ¶
func (r *SystemListServicesResponseService) UnmarshalJSON(data []byte) (err error)
type SystemService ¶
type SystemService struct {
Options []option.RequestOption
}
SystemService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSystemService method instead.
func NewSystemService ¶
func NewSystemService(opts ...option.RequestOption) (r *SystemService)
NewSystemService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SystemService) ListServices ¶
func (r *SystemService) ListServices(ctx context.Context, opts ...option.RequestOption) (res *SystemListServicesResponse, err error)
Returns the public Case.dev services catalog derived from docs.case.dev/services. This endpoint is unauthenticated and intended for discovery surfaces such as the case.dev homepage.
type TranslateService ¶
type TranslateService struct {
Options []option.RequestOption
V1 *TranslateV1Service
}
TranslateService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTranslateService method instead.
func NewTranslateService ¶
func NewTranslateService(opts ...option.RequestOption) (r *TranslateService)
NewTranslateService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type TranslateV1DetectParams ¶
type TranslateV1DetectParams struct {
// Text to detect language for. Can be a single string or an array for batch
// detection.
Q param.Field[TranslateV1DetectParamsQUnion] `json:"q,required"`
}
func (TranslateV1DetectParams) MarshalJSON ¶
func (r TranslateV1DetectParams) MarshalJSON() (data []byte, err error)
type TranslateV1DetectParamsQArray ¶
type TranslateV1DetectParamsQArray []string
func (TranslateV1DetectParamsQArray) ImplementsTranslateV1DetectParamsQUnion ¶
func (r TranslateV1DetectParamsQArray) ImplementsTranslateV1DetectParamsQUnion()
type TranslateV1DetectParamsQUnion ¶
type TranslateV1DetectParamsQUnion interface {
ImplementsTranslateV1DetectParamsQUnion()
}
Text to detect language for. Can be a single string or an array for batch detection.
Satisfied by [shared.UnionString], TranslateV1DetectParamsQArray.
type TranslateV1DetectResponse ¶
type TranslateV1DetectResponse struct {
Data TranslateV1DetectResponseData `json:"data"`
JSON translateV1DetectResponseJSON `json:"-"`
}
func (*TranslateV1DetectResponse) UnmarshalJSON ¶
func (r *TranslateV1DetectResponse) UnmarshalJSON(data []byte) (err error)
type TranslateV1DetectResponseData ¶
type TranslateV1DetectResponseData struct {
Detections [][]TranslateV1DetectResponseDataDetection `json:"detections"`
JSON translateV1DetectResponseDataJSON `json:"-"`
}
func (*TranslateV1DetectResponseData) UnmarshalJSON ¶
func (r *TranslateV1DetectResponseData) UnmarshalJSON(data []byte) (err error)
type TranslateV1DetectResponseDataDetection ¶
type TranslateV1DetectResponseDataDetection struct {
// Confidence score (0-1)
Confidence float64 `json:"confidence"`
// Whether the detection is reliable
IsReliable bool `json:"isReliable"`
// Detected language code (ISO 639-1)
Language string `json:"language"`
JSON translateV1DetectResponseDataDetectionJSON `json:"-"`
}
func (*TranslateV1DetectResponseDataDetection) UnmarshalJSON ¶
func (r *TranslateV1DetectResponseDataDetection) UnmarshalJSON(data []byte) (err error)
type TranslateV1ListLanguagesParams ¶
type TranslateV1ListLanguagesParams struct {
// Translation model to check language support for
Model param.Field[TranslateV1ListLanguagesParamsModel] `query:"model"`
// Target language code for translating language names (e.g., 'es' for Spanish
// names)
Target param.Field[string] `query:"target"`
}
func (TranslateV1ListLanguagesParams) URLQuery ¶
func (r TranslateV1ListLanguagesParams) URLQuery() (v url.Values)
URLQuery serializes TranslateV1ListLanguagesParams's query parameters as `url.Values`.
type TranslateV1ListLanguagesParamsModel ¶
type TranslateV1ListLanguagesParamsModel string
Translation model to check language support for
const ( TranslateV1ListLanguagesParamsModelNmt TranslateV1ListLanguagesParamsModel = "nmt" TranslateV1ListLanguagesParamsModelBase TranslateV1ListLanguagesParamsModel = "base" )
func (TranslateV1ListLanguagesParamsModel) IsKnown ¶
func (r TranslateV1ListLanguagesParamsModel) IsKnown() bool
type TranslateV1ListLanguagesResponse ¶
type TranslateV1ListLanguagesResponse struct {
Data TranslateV1ListLanguagesResponseData `json:"data"`
JSON translateV1ListLanguagesResponseJSON `json:"-"`
}
func (*TranslateV1ListLanguagesResponse) UnmarshalJSON ¶
func (r *TranslateV1ListLanguagesResponse) UnmarshalJSON(data []byte) (err error)
type TranslateV1ListLanguagesResponseData ¶
type TranslateV1ListLanguagesResponseData struct {
Languages []TranslateV1ListLanguagesResponseDataLanguage `json:"languages"`
JSON translateV1ListLanguagesResponseDataJSON `json:"-"`
}
func (*TranslateV1ListLanguagesResponseData) UnmarshalJSON ¶
func (r *TranslateV1ListLanguagesResponseData) UnmarshalJSON(data []byte) (err error)
type TranslateV1ListLanguagesResponseDataLanguage ¶
type TranslateV1ListLanguagesResponseDataLanguage struct {
// Language code (ISO 639-1)
Language string `json:"language"`
// Language name (if target specified)
Name string `json:"name"`
JSON translateV1ListLanguagesResponseDataLanguageJSON `json:"-"`
}
func (*TranslateV1ListLanguagesResponseDataLanguage) UnmarshalJSON ¶
func (r *TranslateV1ListLanguagesResponseDataLanguage) UnmarshalJSON(data []byte) (err error)
type TranslateV1Service ¶
type TranslateV1Service struct {
Options []option.RequestOption
}
TranslateV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTranslateV1Service method instead.
func NewTranslateV1Service ¶
func NewTranslateV1Service(opts ...option.RequestOption) (r *TranslateV1Service)
NewTranslateV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TranslateV1Service) Detect ¶
func (r *TranslateV1Service) Detect(ctx context.Context, body TranslateV1DetectParams, opts ...option.RequestOption) (res *TranslateV1DetectResponse, err error)
Detect the language of text. Returns the most likely language code and confidence score. Supports batch detection for multiple texts.
func (*TranslateV1Service) ListLanguages ¶
func (r *TranslateV1Service) ListLanguages(ctx context.Context, query TranslateV1ListLanguagesParams, opts ...option.RequestOption) (res *TranslateV1ListLanguagesResponse, err error)
Get the list of languages supported for translation. Optionally specify a target language to get translated language names.
func (*TranslateV1Service) Translate ¶
func (r *TranslateV1Service) Translate(ctx context.Context, body TranslateV1TranslateParams, opts ...option.RequestOption) (res *TranslateV1TranslateResponse, err error)
Translate text between languages using Google Cloud Translation API. Supports 100+ languages, automatic language detection, HTML preservation, and batch translation.
type TranslateV1TranslateParams ¶
type TranslateV1TranslateParams struct {
// Text to translate. Can be a single string or an array for batch translation.
Q param.Field[TranslateV1TranslateParamsQUnion] `json:"q,required"`
// Target language code (ISO 639-1)
Target param.Field[string] `json:"target,required"`
// Format of the source text. Use 'html' to preserve HTML tags.
Format param.Field[TranslateV1TranslateParamsFormat] `json:"format"`
// Translation model. 'nmt' (Neural Machine Translation) is recommended for
// quality.
Model param.Field[TranslateV1TranslateParamsModel] `json:"model"`
// Source language code (ISO 639-1). If not specified, language is auto-detected.
Source param.Field[string] `json:"source"`
}
func (TranslateV1TranslateParams) MarshalJSON ¶
func (r TranslateV1TranslateParams) MarshalJSON() (data []byte, err error)
type TranslateV1TranslateParamsFormat ¶
type TranslateV1TranslateParamsFormat string
Format of the source text. Use 'html' to preserve HTML tags.
const ( TranslateV1TranslateParamsFormatText TranslateV1TranslateParamsFormat = "text" TranslateV1TranslateParamsFormatHTML TranslateV1TranslateParamsFormat = "html" )
func (TranslateV1TranslateParamsFormat) IsKnown ¶
func (r TranslateV1TranslateParamsFormat) IsKnown() bool
type TranslateV1TranslateParamsModel ¶
type TranslateV1TranslateParamsModel string
Translation model. 'nmt' (Neural Machine Translation) is recommended for quality.
const ( TranslateV1TranslateParamsModelNmt TranslateV1TranslateParamsModel = "nmt" TranslateV1TranslateParamsModelBase TranslateV1TranslateParamsModel = "base" )
func (TranslateV1TranslateParamsModel) IsKnown ¶
func (r TranslateV1TranslateParamsModel) IsKnown() bool
type TranslateV1TranslateParamsQArray ¶
type TranslateV1TranslateParamsQArray []string
func (TranslateV1TranslateParamsQArray) ImplementsTranslateV1TranslateParamsQUnion ¶
func (r TranslateV1TranslateParamsQArray) ImplementsTranslateV1TranslateParamsQUnion()
type TranslateV1TranslateParamsQUnion ¶
type TranslateV1TranslateParamsQUnion interface {
ImplementsTranslateV1TranslateParamsQUnion()
}
Text to translate. Can be a single string or an array for batch translation.
Satisfied by [shared.UnionString], TranslateV1TranslateParamsQArray.
type TranslateV1TranslateResponse ¶
type TranslateV1TranslateResponse struct {
Data TranslateV1TranslateResponseData `json:"data"`
JSON translateV1TranslateResponseJSON `json:"-"`
}
func (*TranslateV1TranslateResponse) UnmarshalJSON ¶
func (r *TranslateV1TranslateResponse) UnmarshalJSON(data []byte) (err error)
type TranslateV1TranslateResponseData ¶
type TranslateV1TranslateResponseData struct {
Translations []TranslateV1TranslateResponseDataTranslation `json:"translations"`
JSON translateV1TranslateResponseDataJSON `json:"-"`
}
func (*TranslateV1TranslateResponseData) UnmarshalJSON ¶
func (r *TranslateV1TranslateResponseData) UnmarshalJSON(data []byte) (err error)
type TranslateV1TranslateResponseDataTranslation ¶
type TranslateV1TranslateResponseDataTranslation struct {
// Detected source language (if source not specified)
DetectedSourceLanguage string `json:"detectedSourceLanguage"`
// Model used for translation
Model string `json:"model"`
// Translated text
TranslatedText string `json:"translatedText"`
JSON translateV1TranslateResponseDataTranslationJSON `json:"-"`
}
func (*TranslateV1TranslateResponseDataTranslation) UnmarshalJSON ¶
func (r *TranslateV1TranslateResponseDataTranslation) UnmarshalJSON(data []byte) (err error)
type VaultConfirmUploadParams ¶
type VaultConfirmUploadParams struct {
Body VaultConfirmUploadParamsBodyUnion `json:"body,required"`
}
func (VaultConfirmUploadParams) MarshalJSON ¶
func (r VaultConfirmUploadParams) MarshalJSON() (data []byte, err error)
type VaultConfirmUploadParamsBody ¶
type VaultConfirmUploadParamsBody struct {
// Whether the upload succeeded
Success param.Field[VaultConfirmUploadParamsBodySuccess] `json:"success,required"`
// Client-side error code
ErrorCode param.Field[string] `json:"errorCode"`
// Client-side error message
ErrorMessage param.Field[string] `json:"errorMessage"`
// S3 ETag for the uploaded object (optional if client cannot access ETag header)
Etag param.Field[string] `json:"etag"`
// Uploaded file size in bytes
SizeBytes param.Field[int64] `json:"sizeBytes"`
}
func (VaultConfirmUploadParamsBody) MarshalJSON ¶
func (r VaultConfirmUploadParamsBody) MarshalJSON() (data []byte, err error)
type VaultConfirmUploadParamsBodySuccess ¶
type VaultConfirmUploadParamsBodySuccess bool
Whether the upload succeeded
const ( VaultConfirmUploadParamsBodySuccessTrue VaultConfirmUploadParamsBodySuccess = true VaultConfirmUploadParamsBodySuccessFalse VaultConfirmUploadParamsBodySuccess = false )
func (VaultConfirmUploadParamsBodySuccess) IsKnown ¶
func (r VaultConfirmUploadParamsBodySuccess) IsKnown() bool
type VaultConfirmUploadParamsBodyUnion ¶
type VaultConfirmUploadParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by VaultConfirmUploadParamsBodyVaultConfirmUploadSuccess, VaultConfirmUploadParamsBodyVaultConfirmUploadFailure, VaultConfirmUploadParamsBody.
type VaultConfirmUploadParamsBodyVaultConfirmUploadFailure ¶
type VaultConfirmUploadParamsBodyVaultConfirmUploadFailure struct {
// Client-side error code
ErrorCode param.Field[string] `json:"errorCode,required"`
// Client-side error message
ErrorMessage param.Field[string] `json:"errorMessage,required"`
// Whether the upload succeeded
Success param.Field[VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess] `json:"success,required"`
}
func (VaultConfirmUploadParamsBodyVaultConfirmUploadFailure) MarshalJSON ¶
func (r VaultConfirmUploadParamsBodyVaultConfirmUploadFailure) MarshalJSON() (data []byte, err error)
type VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess ¶
type VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess bool
Whether the upload succeeded
const (
VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccessFalse VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess = false
)
func (VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess) IsKnown ¶
func (r VaultConfirmUploadParamsBodyVaultConfirmUploadFailureSuccess) IsKnown() bool
type VaultConfirmUploadParamsBodyVaultConfirmUploadSuccess ¶
type VaultConfirmUploadParamsBodyVaultConfirmUploadSuccess struct {
// Uploaded file size in bytes
SizeBytes param.Field[int64] `json:"sizeBytes,required"`
// Whether the upload succeeded
Success param.Field[VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess] `json:"success,required"`
// S3 ETag for the uploaded object (optional if client cannot access ETag header)
Etag param.Field[string] `json:"etag"`
}
func (VaultConfirmUploadParamsBodyVaultConfirmUploadSuccess) MarshalJSON ¶
func (r VaultConfirmUploadParamsBodyVaultConfirmUploadSuccess) MarshalJSON() (data []byte, err error)
type VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess ¶
type VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess bool
Whether the upload succeeded
const (
VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccessTrue VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess = true
)
func (VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess) IsKnown ¶
func (r VaultConfirmUploadParamsBodyVaultConfirmUploadSuccessSuccess) IsKnown() bool
type VaultConfirmUploadResponse ¶
type VaultConfirmUploadResponse struct {
AlreadyConfirmed bool `json:"alreadyConfirmed"`
ObjectID string `json:"objectId"`
Status VaultConfirmUploadResponseStatus `json:"status"`
VaultID string `json:"vaultId"`
JSON vaultConfirmUploadResponseJSON `json:"-"`
}
func (*VaultConfirmUploadResponse) UnmarshalJSON ¶
func (r *VaultConfirmUploadResponse) UnmarshalJSON(data []byte) (err error)
type VaultConfirmUploadResponseStatus ¶
type VaultConfirmUploadResponseStatus string
const ( VaultConfirmUploadResponseStatusCompleted VaultConfirmUploadResponseStatus = "completed" VaultConfirmUploadResponseStatusFailed VaultConfirmUploadResponseStatus = "failed" )
func (VaultConfirmUploadResponseStatus) IsKnown ¶
func (r VaultConfirmUploadResponseStatus) IsKnown() bool
type VaultDeleteParams ¶
type VaultDeleteParams struct {
// If true and vault has many objects, queue deletion in background and return
// immediately
Async param.Field[bool] `query:"async"`
}
func (VaultDeleteParams) URLQuery ¶
func (r VaultDeleteParams) URLQuery() (v url.Values)
URLQuery serializes VaultDeleteParams's query parameters as `url.Values`.
type VaultDeleteResponse ¶
type VaultDeleteResponse struct {
DeletedVault VaultDeleteResponseDeletedVault `json:"deletedVault"`
// Either 'deleted' or 'deletion_queued'
Status string `json:"status"`
Success bool `json:"success"`
JSON vaultDeleteResponseJSON `json:"-"`
}
func (*VaultDeleteResponse) UnmarshalJSON ¶
func (r *VaultDeleteResponse) UnmarshalJSON(data []byte) (err error)
type VaultDeleteResponseDeletedVault ¶
type VaultDeleteResponseDeletedVault struct {
ID string `json:"id"`
BytesFreed int64 `json:"bytesFreed"`
Name string `json:"name"`
ObjectsDeleted int64 `json:"objectsDeleted"`
VectorsDeleted int64 `json:"vectorsDeleted"`
JSON vaultDeleteResponseDeletedVaultJSON `json:"-"`
}
func (*VaultDeleteResponseDeletedVault) UnmarshalJSON ¶
func (r *VaultDeleteResponseDeletedVault) UnmarshalJSON(data []byte) (err error)
type VaultEventService ¶
type VaultEventService struct {
Options []option.RequestOption
Subscriptions *VaultEventSubscriptionService
}
VaultEventService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultEventService method instead.
func NewVaultEventService ¶
func NewVaultEventService(opts ...option.RequestOption) (r *VaultEventService)
NewVaultEventService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type VaultEventSubscriptionNewParams ¶
type VaultEventSubscriptionNewParams struct {
CallbackURL param.Field[string] `json:"callbackUrl,required" format:"uri"`
EventTypes param.Field[[]string] `json:"eventTypes"`
ObjectIDs param.Field[[]string] `json:"objectIds"`
SigningSecret param.Field[string] `json:"signingSecret"`
}
func (VaultEventSubscriptionNewParams) MarshalJSON ¶
func (r VaultEventSubscriptionNewParams) MarshalJSON() (data []byte, err error)
type VaultEventSubscriptionService ¶
type VaultEventSubscriptionService struct {
Options []option.RequestOption
}
VaultEventSubscriptionService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultEventSubscriptionService method instead.
func NewVaultEventSubscriptionService ¶
func NewVaultEventSubscriptionService(opts ...option.RequestOption) (r *VaultEventSubscriptionService)
NewVaultEventSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VaultEventSubscriptionService) Delete ¶
func (r *VaultEventSubscriptionService) Delete(ctx context.Context, id string, subscriptionID string, opts ...option.RequestOption) (err error)
Deactivates a vault webhook subscription.
func (*VaultEventSubscriptionService) List ¶
func (r *VaultEventSubscriptionService) List(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Lists webhook subscriptions configured for a vault.
func (*VaultEventSubscriptionService) New ¶
func (r *VaultEventSubscriptionService) New(ctx context.Context, id string, body VaultEventSubscriptionNewParams, opts ...option.RequestOption) (err error)
Creates a webhook subscription for vault lifecycle events. Optional object filters can limit notifications to specific vault objects.
func (*VaultEventSubscriptionService) Test ¶
func (r *VaultEventSubscriptionService) Test(ctx context.Context, id string, subscriptionID string, body VaultEventSubscriptionTestParams, opts ...option.RequestOption) (err error)
Delivers a test event to a single vault webhook subscription. Uses the same payload shape, signature, and retry behavior as production event delivery.
func (*VaultEventSubscriptionService) Update ¶
func (r *VaultEventSubscriptionService) Update(ctx context.Context, id string, subscriptionID string, body VaultEventSubscriptionUpdateParams, opts ...option.RequestOption) (err error)
Updates callback URL, filters, active state, or signing secret for a vault webhook subscription.
type VaultEventSubscriptionTestParams ¶
type VaultEventSubscriptionTestParams struct {
// Optional event type override for this test
EventType param.Field[string] `json:"eventType"`
// Optional object ID for object-scoped payload testing
ObjectID param.Field[string] `json:"objectId"`
// Optional additional fields merged into payload.data
Payload param.Field[map[string]interface{}] `json:"payload"`
}
func (VaultEventSubscriptionTestParams) MarshalJSON ¶
func (r VaultEventSubscriptionTestParams) MarshalJSON() (data []byte, err error)
type VaultEventSubscriptionUpdateParams ¶
type VaultEventSubscriptionUpdateParams struct {
CallbackURL param.Field[string] `json:"callbackUrl" format:"uri"`
ClearSigningSecret param.Field[bool] `json:"clearSigningSecret"`
EventTypes param.Field[[]string] `json:"eventTypes"`
IsActive param.Field[bool] `json:"isActive"`
ObjectIDs param.Field[[]string] `json:"objectIds"`
SigningSecret param.Field[string] `json:"signingSecret"`
}
func (VaultEventSubscriptionUpdateParams) MarshalJSON ¶
func (r VaultEventSubscriptionUpdateParams) MarshalJSON() (data []byte, err error)
type VaultGetResponse ¶
type VaultGetResponse struct {
// Vault identifier
ID string `json:"id,required"`
// Vault creation timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// S3 bucket for document storage
FilesBucket string `json:"filesBucket,required"`
// Vault name
Name string `json:"name,required"`
// AWS region
Region string `json:"region,required"`
// Document chunking strategy configuration
ChunkStrategy VaultGetResponseChunkStrategy `json:"chunkStrategy"`
// Vault description
Description string `json:"description"`
// Whether GraphRAG is enabled
EnableGraph bool `json:"enableGraph"`
// Search index name
IndexName string `json:"indexName"`
// KMS key for encryption
KmsKeyID string `json:"kmsKeyId"`
// Additional vault metadata
Metadata interface{} `json:"metadata"`
// Total storage size in bytes
TotalBytes int64 `json:"totalBytes"`
// Number of stored documents
TotalObjects int64 `json:"totalObjects"`
// Number of vector embeddings
TotalVectors int64 `json:"totalVectors"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// S3 bucket for vector embeddings
VectorBucket string `json:"vectorBucket,nullable"`
JSON vaultGetResponseJSON `json:"-"`
}
func (*VaultGetResponse) UnmarshalJSON ¶
func (r *VaultGetResponse) UnmarshalJSON(data []byte) (err error)
type VaultGetResponseChunkStrategy ¶
type VaultGetResponseChunkStrategy struct {
// Target size for each chunk in tokens
ChunkSize int64 `json:"chunkSize"`
// Chunking method (e.g., 'semantic', 'fixed')
Method string `json:"method"`
// Minimum chunk size in tokens
MinChunkSize int64 `json:"minChunkSize"`
// Number of overlapping tokens between chunks
Overlap int64 `json:"overlap"`
JSON vaultGetResponseChunkStrategyJSON `json:"-"`
}
Document chunking strategy configuration
func (*VaultGetResponseChunkStrategy) UnmarshalJSON ¶
func (r *VaultGetResponseChunkStrategy) UnmarshalJSON(data []byte) (err error)
type VaultGraphragGetStatsResponse ¶
type VaultGraphragGetStatsResponse struct {
// Number of entity communities identified
Communities int64 `json:"communities"`
// Number of processed documents
Documents int64 `json:"documents"`
// Total number of entities extracted from documents
Entities int64 `json:"entities"`
// Timestamp of last GraphRAG processing
LastProcessed time.Time `json:"lastProcessed" format:"date-time"`
// Total number of relationships between entities
Relationships int64 `json:"relationships"`
// Current processing status
Status VaultGraphragGetStatsResponseStatus `json:"status"`
JSON vaultGraphragGetStatsResponseJSON `json:"-"`
}
func (*VaultGraphragGetStatsResponse) UnmarshalJSON ¶
func (r *VaultGraphragGetStatsResponse) UnmarshalJSON(data []byte) (err error)
type VaultGraphragGetStatsResponseStatus ¶
type VaultGraphragGetStatsResponseStatus string
Current processing status
const ( VaultGraphragGetStatsResponseStatusProcessing VaultGraphragGetStatsResponseStatus = "processing" VaultGraphragGetStatsResponseStatusCompleted VaultGraphragGetStatsResponseStatus = "completed" VaultGraphragGetStatsResponseStatusError VaultGraphragGetStatsResponseStatus = "error" )
func (VaultGraphragGetStatsResponseStatus) IsKnown ¶
func (r VaultGraphragGetStatsResponseStatus) IsKnown() bool
type VaultGraphragInitResponse ¶
type VaultGraphragInitResponse struct {
Message string `json:"message"`
Status string `json:"status"`
Success bool `json:"success"`
VaultID string `json:"vault_id"`
JSON vaultGraphragInitResponseJSON `json:"-"`
}
func (*VaultGraphragInitResponse) UnmarshalJSON ¶
func (r *VaultGraphragInitResponse) UnmarshalJSON(data []byte) (err error)
type VaultGraphragProcessObjectResponse ¶
type VaultGraphragProcessObjectResponse struct {
// Number of communities detected
Communities int64 `json:"communities,required"`
// Number of entities extracted
Entities int64 `json:"entities,required"`
// ID of the indexed object
ObjectID string `json:"objectId,required"`
// Number of relationships extracted
Relationships int64 `json:"relationships,required"`
// Extraction statistics
Stats VaultGraphragProcessObjectResponseStats `json:"stats,required"`
// Status from GraphRAG service
Status string `json:"status,required"`
// Whether indexing completed successfully
Success bool `json:"success,required"`
// ID of the vault
VaultID string `json:"vaultId,required"`
JSON vaultGraphragProcessObjectResponseJSON `json:"-"`
}
func (*VaultGraphragProcessObjectResponse) UnmarshalJSON ¶
func (r *VaultGraphragProcessObjectResponse) UnmarshalJSON(data []byte) (err error)
type VaultGraphragProcessObjectResponseStats ¶
type VaultGraphragProcessObjectResponseStats struct {
CommunityCount int64 `json:"community_count"`
EntityCount int64 `json:"entity_count"`
RelationshipCount int64 `json:"relationship_count"`
JSON vaultGraphragProcessObjectResponseStatsJSON `json:"-"`
}
Extraction statistics
func (*VaultGraphragProcessObjectResponseStats) UnmarshalJSON ¶
func (r *VaultGraphragProcessObjectResponseStats) UnmarshalJSON(data []byte) (err error)
type VaultGraphragService ¶
type VaultGraphragService struct {
Options []option.RequestOption
}
VaultGraphragService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultGraphragService method instead.
func NewVaultGraphragService ¶
func NewVaultGraphragService(opts ...option.RequestOption) (r *VaultGraphragService)
NewVaultGraphragService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VaultGraphragService) GetStats ¶
func (r *VaultGraphragService) GetStats(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultGraphragGetStatsResponse, err error)
Retrieve GraphRAG (Graph Retrieval-Augmented Generation) statistics for a specific vault. This includes metrics about the knowledge graph structure, entity relationships, and processing status that enable advanced semantic search and AI-powered document analysis.
func (*VaultGraphragService) Init ¶
func (r *VaultGraphragService) Init(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultGraphragInitResponse, err error)
Initialize a GraphRAG workspace for a vault to enable advanced knowledge graph and retrieval-augmented generation capabilities. This creates the necessary infrastructure for semantic document analysis and graph-based querying within the vault.
func (*VaultGraphragService) ProcessObject ¶
func (r *VaultGraphragService) ProcessObject(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultGraphragProcessObjectResponse, err error)
Manually trigger GraphRAG indexing for a vault object. The object must already be ingested (completed status). This extracts entities, relationships, and communities from the document for advanced knowledge graph queries.
type VaultGroupService ¶
type VaultGroupService struct {
Options []option.RequestOption
}
VaultGroupService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultGroupService method instead.
func NewVaultGroupService ¶
func NewVaultGroupService(opts ...option.RequestOption) (r *VaultGroupService)
NewVaultGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VaultGroupService) Delete ¶
func (r *VaultGroupService) Delete(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)
Delete vault group
func (*VaultGroupService) List ¶
func (r *VaultGroupService) List(ctx context.Context, opts ...option.RequestOption) (err error)
List vault groups
func (*VaultGroupService) New ¶
func (r *VaultGroupService) New(ctx context.Context, opts ...option.RequestOption) (err error)
Create vault group
func (*VaultGroupService) Update ¶
func (r *VaultGroupService) Update(ctx context.Context, groupID string, opts ...option.RequestOption) (err error)
Update vault group
type VaultIngestResponse ¶
type VaultIngestResponse struct {
// Always false - GraphRAG must be triggered separately via POST
// /vault/:id/graphrag/:objectId
EnableGraphRag bool `json:"enableGraphRAG,required"`
// Human-readable status message
Message string `json:"message,required"`
// ID of the vault object being processed
ObjectID string `json:"objectId,required"`
// Current ingestion status. 'stored' for file types without text extraction (no
// chunks/vectors created).
Status VaultIngestResponseStatus `json:"status,required"`
// Workflow run ID for tracking progress. Null for file types that skip processing.
WorkflowID string `json:"workflowId,required,nullable"`
JSON vaultIngestResponseJSON `json:"-"`
}
func (*VaultIngestResponse) UnmarshalJSON ¶
func (r *VaultIngestResponse) UnmarshalJSON(data []byte) (err error)
type VaultIngestResponseStatus ¶
type VaultIngestResponseStatus string
Current ingestion status. 'stored' for file types without text extraction (no chunks/vectors created).
const ( VaultIngestResponseStatusProcessing VaultIngestResponseStatus = "processing" VaultIngestResponseStatusStored VaultIngestResponseStatus = "stored" )
func (VaultIngestResponseStatus) IsKnown ¶
func (r VaultIngestResponseStatus) IsKnown() bool
type VaultListResponse ¶
type VaultListResponse struct {
// Total number of vaults
Total int64 `json:"total"`
Vaults []VaultListResponseVault `json:"vaults"`
JSON vaultListResponseJSON `json:"-"`
}
func (*VaultListResponse) UnmarshalJSON ¶
func (r *VaultListResponse) UnmarshalJSON(data []byte) (err error)
type VaultListResponseVault ¶
type VaultListResponseVault struct {
// Vault identifier
ID string `json:"id"`
// Vault creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Vault description
Description string `json:"description"`
// Whether GraphRAG is enabled
EnableGraph bool `json:"enableGraph"`
// Vault name
Name string `json:"name"`
// Total storage size in bytes
TotalBytes int64 `json:"totalBytes"`
// Number of stored documents
TotalObjects int64 `json:"totalObjects"`
JSON vaultListResponseVaultJSON `json:"-"`
}
func (*VaultListResponseVault) UnmarshalJSON ¶
func (r *VaultListResponseVault) UnmarshalJSON(data []byte) (err error)
type VaultMultipartAbortParams ¶
type VaultMultipartAbortParams struct {
ObjectID param.Field[string] `json:"objectId,required"`
UploadID param.Field[string] `json:"uploadId,required"`
}
func (VaultMultipartAbortParams) MarshalJSON ¶
func (r VaultMultipartAbortParams) MarshalJSON() (data []byte, err error)
type VaultMultipartGetPartURLsParams ¶
type VaultMultipartGetPartURLsParams struct {
ObjectID param.Field[string] `json:"objectId,required"`
Parts param.Field[[]VaultMultipartGetPartURLsParamsPart] `json:"parts,required"`
UploadID param.Field[string] `json:"uploadId,required"`
}
func (VaultMultipartGetPartURLsParams) MarshalJSON ¶
func (r VaultMultipartGetPartURLsParams) MarshalJSON() (data []byte, err error)
type VaultMultipartGetPartURLsParamsPart ¶
type VaultMultipartGetPartURLsParamsPart struct {
PartNumber param.Field[int64] `json:"partNumber,required"`
// Part size in bytes (min 5MB except final part, max 5GB).
SizeBytes param.Field[int64] `json:"sizeBytes,required"`
}
func (VaultMultipartGetPartURLsParamsPart) MarshalJSON ¶
func (r VaultMultipartGetPartURLsParamsPart) MarshalJSON() (data []byte, err error)
type VaultMultipartGetPartURLsResponse ¶
type VaultMultipartGetPartURLsResponse struct {
URLs []VaultMultipartGetPartURLsResponseURL `json:"urls"`
JSON vaultMultipartGetPartURLsResponseJSON `json:"-"`
}
func (*VaultMultipartGetPartURLsResponse) UnmarshalJSON ¶
func (r *VaultMultipartGetPartURLsResponse) UnmarshalJSON(data []byte) (err error)
type VaultMultipartGetPartURLsResponseURL ¶
type VaultMultipartGetPartURLsResponseURL struct {
PartNumber int64 `json:"partNumber"`
URL string `json:"url"`
JSON vaultMultipartGetPartURLsResponseURLJSON `json:"-"`
}
func (*VaultMultipartGetPartURLsResponseURL) UnmarshalJSON ¶
func (r *VaultMultipartGetPartURLsResponseURL) UnmarshalJSON(data []byte) (err error)
type VaultMultipartService ¶
type VaultMultipartService struct {
Options []option.RequestOption
}
VaultMultipartService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultMultipartService method instead.
func NewVaultMultipartService ¶
func NewVaultMultipartService(opts ...option.RequestOption) (r *VaultMultipartService)
NewVaultMultipartService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VaultMultipartService) Abort ¶
func (r *VaultMultipartService) Abort(ctx context.Context, id string, body VaultMultipartAbortParams, opts ...option.RequestOption) (err error)
Abort a multipart upload and discard uploaded parts (live).
func (*VaultMultipartService) GetPartURLs ¶
func (r *VaultMultipartService) GetPartURLs(ctx context.Context, id string, body VaultMultipartGetPartURLsParams, opts ...option.RequestOption) (res *VaultMultipartGetPartURLsResponse, err error)
Generate presigned URLs for individual multipart upload parts (live).
type VaultNewParams ¶
type VaultNewParams struct {
// Display name for the vault
Name param.Field[string] `json:"name,required"`
// Optional description of the vault's purpose
Description param.Field[string] `json:"description"`
// Enable knowledge graph for entity relationship mapping. Only applies when
// enableIndexing is true.
EnableGraph param.Field[bool] `json:"enableGraph"`
// Enable vector indexing and search capabilities. Set to false for storage-only
// vaults.
EnableIndexing param.Field[bool] `json:"enableIndexing"`
// Assign the vault to a vault group for access control. Required when using a
// group-scoped API key.
GroupID param.Field[string] `json:"groupId"`
// Optional metadata to attach to the vault (e.g., { containsPHI: true } for HIPAA
// compliance tracking)
Metadata param.Field[interface{}] `json:"metadata"`
}
func (VaultNewParams) MarshalJSON ¶
func (r VaultNewParams) MarshalJSON() (data []byte, err error)
type VaultNewResponse ¶
type VaultNewResponse struct {
// Unique vault identifier
ID string `json:"id"`
// Vault creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Vault description
Description string `json:"description"`
// Whether vector indexing is enabled for this vault
EnableIndexing bool `json:"enableIndexing"`
// S3 bucket name for document storage
FilesBucket string `json:"filesBucket"`
// Vector search index name. Null for storage-only vaults.
IndexName string `json:"indexName,nullable"`
// Vault display name
Name string `json:"name"`
// AWS region for storage
Region string `json:"region"`
// S3 bucket name for vector embeddings. Null for storage-only vaults.
VectorBucket string `json:"vectorBucket,nullable"`
JSON vaultNewResponseJSON `json:"-"`
}
func (*VaultNewResponse) UnmarshalJSON ¶
func (r *VaultNewResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectDeleteParams ¶
type VaultObjectDeleteParams struct {
// Force delete a stuck document that is still in 'processing' state. Use this if a
// document got stuck during ingestion (e.g., OCR timeout).
Force param.Field[VaultObjectDeleteParamsForce] `query:"force"`
}
func (VaultObjectDeleteParams) URLQuery ¶
func (r VaultObjectDeleteParams) URLQuery() (v url.Values)
URLQuery serializes VaultObjectDeleteParams's query parameters as `url.Values`.
type VaultObjectDeleteParamsForce ¶
type VaultObjectDeleteParamsForce string
Force delete a stuck document that is still in 'processing' state. Use this if a document got stuck during ingestion (e.g., OCR timeout).
const (
VaultObjectDeleteParamsForceTrue VaultObjectDeleteParamsForce = "true"
)
func (VaultObjectDeleteParamsForce) IsKnown ¶
func (r VaultObjectDeleteParamsForce) IsKnown() bool
type VaultObjectDeleteResponse ¶
type VaultObjectDeleteResponse struct {
DeletedObject VaultObjectDeleteResponseDeletedObject `json:"deletedObject"`
Success bool `json:"success"`
JSON vaultObjectDeleteResponseJSON `json:"-"`
}
func (*VaultObjectDeleteResponse) UnmarshalJSON ¶
func (r *VaultObjectDeleteResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectDeleteResponseDeletedObject ¶
type VaultObjectDeleteResponseDeletedObject struct {
// Deleted object ID
ID string `json:"id"`
// Original filename
Filename string `json:"filename"`
// Size of deleted file in bytes
SizeBytes int64 `json:"sizeBytes"`
// Number of vectors deleted
VectorsDeleted int64 `json:"vectorsDeleted"`
JSON vaultObjectDeleteResponseDeletedObjectJSON `json:"-"`
}
func (*VaultObjectDeleteResponseDeletedObject) UnmarshalJSON ¶
func (r *VaultObjectDeleteResponseDeletedObject) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetOcrWordsParams ¶
type VaultObjectGetOcrWordsParams struct {
// Filter to a specific page number (1-indexed). If omitted, returns all pages.
Page param.Field[int64] `query:"page"`
// Filter to words ending at this index (inclusive). Useful for retrieving words
// for a specific chunk.
WordEnd param.Field[int64] `query:"wordEnd"`
// Filter to words starting at this index (inclusive). Useful for retrieving words
// for a specific chunk.
WordStart param.Field[int64] `query:"wordStart"`
}
func (VaultObjectGetOcrWordsParams) URLQuery ¶
func (r VaultObjectGetOcrWordsParams) URLQuery() (v url.Values)
URLQuery serializes VaultObjectGetOcrWordsParams's query parameters as `url.Values`.
type VaultObjectGetOcrWordsResponse ¶
type VaultObjectGetOcrWordsResponse struct {
// When the OCR data was extracted
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// The object ID
ObjectID string `json:"objectId"`
// Total number of pages in the document
PageCount int64 `json:"pageCount"`
// Per-page word data with bounding boxes
Pages []VaultObjectGetOcrWordsResponsePage `json:"pages"`
// Total number of words extracted from the document
TotalWords int64 `json:"totalWords"`
JSON vaultObjectGetOcrWordsResponseJSON `json:"-"`
}
func (*VaultObjectGetOcrWordsResponse) UnmarshalJSON ¶
func (r *VaultObjectGetOcrWordsResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetOcrWordsResponsePage ¶
type VaultObjectGetOcrWordsResponsePage struct {
// Page number (1-indexed)
Page int64 `json:"page"`
Words []VaultObjectGetOcrWordsResponsePagesWord `json:"words"`
JSON vaultObjectGetOcrWordsResponsePageJSON `json:"-"`
}
func (*VaultObjectGetOcrWordsResponsePage) UnmarshalJSON ¶
func (r *VaultObjectGetOcrWordsResponsePage) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetOcrWordsResponsePagesWord ¶
type VaultObjectGetOcrWordsResponsePagesWord struct {
// Bounding box [x0, y0, x1, y1] normalized to 0-1 range
Bbox []float64 `json:"bbox"`
// OCR confidence score (0-1)
Confidence float64 `json:"confidence,nullable"`
// The word text
Text string `json:"text"`
// Global word index across the entire document (0-based)
WordIndex int64 `json:"wordIndex"`
JSON vaultObjectGetOcrWordsResponsePagesWordJSON `json:"-"`
}
func (*VaultObjectGetOcrWordsResponsePagesWord) UnmarshalJSON ¶
func (r *VaultObjectGetOcrWordsResponsePagesWord) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetResponse ¶
type VaultObjectGetResponse struct {
// Object ID
ID string `json:"id,required"`
// MIME type
ContentType string `json:"contentType,required"`
// Upload timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// Presigned S3 download URL
DownloadURL string `json:"downloadUrl,required"`
// URL expiration time in seconds
ExpiresIn int64 `json:"expiresIn,required"`
// Original filename
Filename string `json:"filename,required"`
// Processing status (pending, processing, completed, failed)
IngestionStatus string `json:"ingestionStatus,required"`
// Vault ID
VaultID string `json:"vaultId,required"`
// Number of text chunks created
ChunkCount int64 `json:"chunkCount"`
// Additional metadata
Metadata interface{} `json:"metadata"`
// Number of pages (for documents)
PageCount int64 `json:"pageCount"`
// Optional folder path for hierarchy preservation
Path string `json:"path,nullable"`
// File size in bytes
SizeBytes int64 `json:"sizeBytes"`
// Length of extracted text
TextLength int64 `json:"textLength"`
// Number of embedding vectors generated
VectorCount int64 `json:"vectorCount"`
JSON vaultObjectGetResponseJSON `json:"-"`
}
func (*VaultObjectGetResponse) UnmarshalJSON ¶
func (r *VaultObjectGetResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetSummarizeJobResponse ¶
type VaultObjectGetSummarizeJobResponse struct {
// When the job completed
CompletedAt time.Time `json:"completedAt,nullable" format:"date-time"`
// When the job was created
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Error message (if failed)
Error string `json:"error,nullable"`
// Case.dev job ID
JobID string `json:"jobId"`
// Filename of the result document (if completed)
ResultFilename string `json:"resultFilename,nullable"`
// ID of the result document (if completed)
ResultObjectID string `json:"resultObjectId,nullable"`
// ID of the source document
SourceObjectID string `json:"sourceObjectId"`
// Current job status
Status VaultObjectGetSummarizeJobResponseStatus `json:"status"`
// Type of workflow being executed
WorkflowType string `json:"workflowType"`
JSON vaultObjectGetSummarizeJobResponseJSON `json:"-"`
}
func (*VaultObjectGetSummarizeJobResponse) UnmarshalJSON ¶
func (r *VaultObjectGetSummarizeJobResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetSummarizeJobResponseStatus ¶
type VaultObjectGetSummarizeJobResponseStatus string
Current job status
const ( VaultObjectGetSummarizeJobResponseStatusPending VaultObjectGetSummarizeJobResponseStatus = "pending" VaultObjectGetSummarizeJobResponseStatusProcessing VaultObjectGetSummarizeJobResponseStatus = "processing" VaultObjectGetSummarizeJobResponseStatusCompleted VaultObjectGetSummarizeJobResponseStatus = "completed" VaultObjectGetSummarizeJobResponseStatusFailed VaultObjectGetSummarizeJobResponseStatus = "failed" )
func (VaultObjectGetSummarizeJobResponseStatus) IsKnown ¶
func (r VaultObjectGetSummarizeJobResponseStatus) IsKnown() bool
type VaultObjectGetTextResponse ¶
type VaultObjectGetTextResponse struct {
Metadata VaultObjectGetTextResponseMetadata `json:"metadata,required"`
// Full concatenated text content from all chunks
Text string `json:"text,required"`
JSON vaultObjectGetTextResponseJSON `json:"-"`
}
func (*VaultObjectGetTextResponse) UnmarshalJSON ¶
func (r *VaultObjectGetTextResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectGetTextResponseMetadata ¶
type VaultObjectGetTextResponseMetadata struct {
// Number of text chunks the document was split into
ChunkCount int64 `json:"chunk_count,required"`
// Original filename of the document
Filename string `json:"filename,required"`
// Total character count of the extracted text
Length int64 `json:"length,required"`
// The object ID
ObjectID string `json:"object_id,required"`
// The vault ID
VaultID string `json:"vault_id,required"`
// When the document processing completed
IngestionCompletedAt time.Time `json:"ingestion_completed_at" format:"date-time"`
JSON vaultObjectGetTextResponseMetadataJSON `json:"-"`
}
func (*VaultObjectGetTextResponseMetadata) UnmarshalJSON ¶
func (r *VaultObjectGetTextResponseMetadata) UnmarshalJSON(data []byte) (err error)
type VaultObjectListResponse ¶
type VaultObjectListResponse struct {
// Total number of objects in the vault
Count float64 `json:"count,required"`
Objects []VaultObjectListResponseObject `json:"objects,required"`
// The ID of the vault
VaultID string `json:"vaultId,required"`
JSON vaultObjectListResponseJSON `json:"-"`
}
func (*VaultObjectListResponse) UnmarshalJSON ¶
func (r *VaultObjectListResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectListResponseObject ¶
type VaultObjectListResponseObject struct {
// Unique object identifier
ID string `json:"id,required"`
// MIME type of the document
ContentType string `json:"contentType,required"`
// Document upload timestamp
CreatedAt time.Time `json:"createdAt,required" format:"date-time"`
// Original filename of the uploaded document
Filename string `json:"filename,required"`
// Processing status of the document
IngestionStatus string `json:"ingestionStatus,required"`
// Number of text chunks created for vectorization
ChunkCount float64 `json:"chunkCount"`
// Processing completion timestamp
IngestionCompletedAt time.Time `json:"ingestionCompletedAt" format:"date-time"`
// Custom metadata associated with the document
Metadata interface{} `json:"metadata"`
// Number of pages in the document
PageCount float64 `json:"pageCount"`
// Optional folder path for hierarchy preservation from source systems
Path string `json:"path,nullable"`
// File size in bytes
SizeBytes float64 `json:"sizeBytes"`
// Custom tags associated with the document
Tags []string `json:"tags"`
// Total character count of extracted text
TextLength float64 `json:"textLength"`
// Number of vectors generated for semantic search
VectorCount float64 `json:"vectorCount"`
JSON vaultObjectListResponseObjectJSON `json:"-"`
}
func (*VaultObjectListResponseObject) UnmarshalJSON ¶
func (r *VaultObjectListResponseObject) UnmarshalJSON(data []byte) (err error)
type VaultObjectNewPresignedURLParams ¶
type VaultObjectNewPresignedURLParams struct {
// Content type for PUT operations (optional, defaults to object's content type)
ContentType param.Field[string] `json:"contentType"`
// URL expiration time in seconds (1 minute to 7 days)
ExpiresIn param.Field[int64] `json:"expiresIn"`
// The S3 operation to generate URL for
Operation param.Field[VaultObjectNewPresignedURLParamsOperation] `json:"operation"`
// File size in bytes (optional, max 5GB for single PUT uploads). When provided for
// PUT operations, enforces exact file size at S3 level.
SizeBytes param.Field[int64] `json:"sizeBytes"`
}
func (VaultObjectNewPresignedURLParams) MarshalJSON ¶
func (r VaultObjectNewPresignedURLParams) MarshalJSON() (data []byte, err error)
type VaultObjectNewPresignedURLParamsOperation ¶
type VaultObjectNewPresignedURLParamsOperation string
The S3 operation to generate URL for
const ( VaultObjectNewPresignedURLParamsOperationGet VaultObjectNewPresignedURLParamsOperation = "GET" VaultObjectNewPresignedURLParamsOperationPut VaultObjectNewPresignedURLParamsOperation = "PUT" VaultObjectNewPresignedURLParamsOperationDelete VaultObjectNewPresignedURLParamsOperation = "DELETE" VaultObjectNewPresignedURLParamsOperationHead VaultObjectNewPresignedURLParamsOperation = "HEAD" )
func (VaultObjectNewPresignedURLParamsOperation) IsKnown ¶
func (r VaultObjectNewPresignedURLParamsOperation) IsKnown() bool
type VaultObjectNewPresignedURLResponse ¶
type VaultObjectNewPresignedURLResponse struct {
// URL expiration timestamp
ExpiresAt time.Time `json:"expiresAt" format:"date-time"`
// URL expiration time in seconds
ExpiresIn int64 `json:"expiresIn"`
// Original filename
Filename string `json:"filename"`
// Usage instructions and examples
Instructions interface{} `json:"instructions"`
Metadata VaultObjectNewPresignedURLResponseMetadata `json:"metadata"`
// The object identifier
ObjectID string `json:"objectId"`
// The operation type
Operation string `json:"operation"`
// The presigned URL for direct S3 access
PresignedURL string `json:"presignedUrl"`
// S3 object key
S3Key string `json:"s3Key"`
// The vault identifier
VaultID string `json:"vaultId"`
JSON vaultObjectNewPresignedURLResponseJSON `json:"-"`
}
func (*VaultObjectNewPresignedURLResponse) UnmarshalJSON ¶
func (r *VaultObjectNewPresignedURLResponse) UnmarshalJSON(data []byte) (err error)
type VaultObjectNewPresignedURLResponseMetadata ¶
type VaultObjectNewPresignedURLResponseMetadata struct {
Bucket string `json:"bucket"`
ContentType string `json:"contentType"`
Region string `json:"region"`
SizeBytes int64 `json:"sizeBytes"`
JSON vaultObjectNewPresignedURLResponseMetadataJSON `json:"-"`
}
func (*VaultObjectNewPresignedURLResponseMetadata) UnmarshalJSON ¶
func (r *VaultObjectNewPresignedURLResponseMetadata) UnmarshalJSON(data []byte) (err error)
type VaultObjectService ¶
type VaultObjectService struct {
Options []option.RequestOption
}
VaultObjectService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultObjectService method instead.
func NewVaultObjectService ¶
func NewVaultObjectService(opts ...option.RequestOption) (r *VaultObjectService)
NewVaultObjectService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VaultObjectService) Delete ¶
func (r *VaultObjectService) Delete(ctx context.Context, id string, objectID string, body VaultObjectDeleteParams, opts ...option.RequestOption) (res *VaultObjectDeleteResponse, err error)
Permanently deletes a document from the vault including all associated vectors, chunks, graph data, and the original file. This operation cannot be undone.
func (*VaultObjectService) Download ¶
func (r *VaultObjectService) Download(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *http.Response, err error)
Downloads a file from a vault. Returns the actual file content as a binary stream with appropriate headers for file download. Useful for retrieving contracts, depositions, case files, and other legal documents stored in your vault.
func (*VaultObjectService) Get ¶
func (r *VaultObjectService) Get(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultObjectGetResponse, err error)
Retrieves metadata for a specific document in a vault and generates a temporary download URL. The download URL expires after 1 hour for security. This endpoint also updates the file size if it wasn't previously calculated.
func (*VaultObjectService) GetOcrWords ¶
func (r *VaultObjectService) GetOcrWords(ctx context.Context, id string, objectID string, query VaultObjectGetOcrWordsParams, opts ...option.RequestOption) (res *VaultObjectGetOcrWordsResponse, err error)
Retrieves word-level OCR bounding box data for a processed PDF document. Each word includes its text, normalized bounding box coordinates (0-1 range), confidence score, and global word index. Use this data to highlight specific text ranges in a PDF viewer based on word indices from search results.
func (*VaultObjectService) GetSummarizeJob ¶
func (r *VaultObjectService) GetSummarizeJob(ctx context.Context, id string, objectID string, jobID string, opts ...option.RequestOption) (res *VaultObjectGetSummarizeJobResponse, err error)
Get the status of a CaseMark summary workflow job.
func (*VaultObjectService) GetText ¶
func (r *VaultObjectService) GetText(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultObjectGetTextResponse, err error)
Retrieves the full extracted text content from a processed vault object. Returns the concatenated text from all chunks, useful for document review, analysis, or export. The object must have completed processing before text can be retrieved.
func (*VaultObjectService) List ¶
func (r *VaultObjectService) List(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultObjectListResponse, err error)
Retrieve all objects stored in a specific vault, including document metadata, ingestion status, and processing statistics.
func (*VaultObjectService) NewPresignedURL ¶
func (r *VaultObjectService) NewPresignedURL(ctx context.Context, id string, objectID string, body VaultObjectNewPresignedURLParams, opts ...option.RequestOption) (res *VaultObjectNewPresignedURLResponse, err error)
Generate presigned URLs for direct S3 operations (GET, PUT, DELETE, HEAD) on vault objects. This allows secure, time-limited access to files without proxying through the API. Essential for large document uploads/downloads in legal workflows.
func (*VaultObjectService) Update ¶
func (r *VaultObjectService) Update(ctx context.Context, id string, objectID string, body VaultObjectUpdateParams, opts ...option.RequestOption) (res *VaultObjectUpdateResponse, err error)
Update a document's filename, path, or metadata. Use this to rename files or organize them into virtual folders. The path is stored in metadata.path and can be used to build folder hierarchies in your application.
type VaultObjectUpdateParams ¶
type VaultObjectUpdateParams struct {
// New filename for the document (affects display name and downloads)
Filename param.Field[string] `json:"filename"`
// Additional metadata to merge with existing metadata
Metadata param.Field[interface{}] `json:"metadata"`
// Folder path for hierarchy preservation (e.g., '/Discovery/Depositions'). Set to
// null or empty string to remove.
Path param.Field[string] `json:"path"`
}
func (VaultObjectUpdateParams) MarshalJSON ¶
func (r VaultObjectUpdateParams) MarshalJSON() (data []byte, err error)
type VaultObjectUpdateResponse ¶
type VaultObjectUpdateResponse struct {
// Object ID
ID string `json:"id"`
// MIME type
ContentType string `json:"contentType"`
// Updated filename
Filename string `json:"filename"`
// Processing status
IngestionStatus string `json:"ingestionStatus"`
// Full metadata object
Metadata interface{} `json:"metadata"`
// Folder path for hierarchy preservation
Path string `json:"path,nullable"`
// File size in bytes
SizeBytes int64 `json:"sizeBytes"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// Vault ID
VaultID string `json:"vaultId"`
JSON vaultObjectUpdateResponseJSON `json:"-"`
}
func (*VaultObjectUpdateResponse) UnmarshalJSON ¶
func (r *VaultObjectUpdateResponse) UnmarshalJSON(data []byte) (err error)
type VaultSearchParams ¶
type VaultSearchParams struct {
// Search query or question to find relevant documents
Query param.Field[string] `json:"query,required"`
// Filters to narrow search results to specific documents
Filters param.Field[VaultSearchParamsFilters] `json:"filters"`
// Search method: 'global' for comprehensive questions, 'entity' for specific
// entities, 'fast' for quick similarity search, 'hybrid' for combined approach
Method param.Field[VaultSearchParamsMethod] `json:"method"`
// Maximum number of results to return
TopK param.Field[int64] `json:"topK"`
}
func (VaultSearchParams) MarshalJSON ¶
func (r VaultSearchParams) MarshalJSON() (data []byte, err error)
type VaultSearchParamsFilters ¶
type VaultSearchParamsFilters struct {
// Filter to specific document(s) by object ID. Accepts a single ID or array of
// IDs.
ObjectID param.Field[VaultSearchParamsFiltersObjectIDUnion] `json:"object_id"`
ExtraFields map[string]interface{} `json:"-,extras"`
}
Filters to narrow search results to specific documents
func (VaultSearchParamsFilters) MarshalJSON ¶
func (r VaultSearchParamsFilters) MarshalJSON() (data []byte, err error)
type VaultSearchParamsFiltersObjectIDArray ¶
type VaultSearchParamsFiltersObjectIDArray []string
func (VaultSearchParamsFiltersObjectIDArray) ImplementsVaultSearchParamsFiltersObjectIDUnion ¶
func (r VaultSearchParamsFiltersObjectIDArray) ImplementsVaultSearchParamsFiltersObjectIDUnion()
type VaultSearchParamsFiltersObjectIDUnion ¶
type VaultSearchParamsFiltersObjectIDUnion interface {
ImplementsVaultSearchParamsFiltersObjectIDUnion()
}
Filter to specific document(s) by object ID. Accepts a single ID or array of IDs.
Satisfied by [shared.UnionString], VaultSearchParamsFiltersObjectIDArray.
type VaultSearchParamsMethod ¶
type VaultSearchParamsMethod string
Search method: 'global' for comprehensive questions, 'entity' for specific entities, 'fast' for quick similarity search, 'hybrid' for combined approach
const ( VaultSearchParamsMethodVector VaultSearchParamsMethod = "vector" VaultSearchParamsMethodGraph VaultSearchParamsMethod = "graph" VaultSearchParamsMethodHybrid VaultSearchParamsMethod = "hybrid" VaultSearchParamsMethodGlobal VaultSearchParamsMethod = "global" VaultSearchParamsMethodLocal VaultSearchParamsMethod = "local" VaultSearchParamsMethodFast VaultSearchParamsMethod = "fast" VaultSearchParamsMethodEntity VaultSearchParamsMethod = "entity" )
func (VaultSearchParamsMethod) IsKnown ¶
func (r VaultSearchParamsMethod) IsKnown() bool
type VaultSearchResponse ¶
type VaultSearchResponse struct {
// Relevant text chunks with similarity scores and page locations
Chunks []VaultSearchResponseChunk `json:"chunks"`
// Search method used
Method string `json:"method"`
// Original search query
Query string `json:"query"`
// AI-generated answer based on search results (for global/entity methods)
Response string `json:"response"`
Sources []VaultSearchResponseSource `json:"sources"`
// ID of the searched vault
VaultID string `json:"vault_id"`
JSON vaultSearchResponseJSON `json:"-"`
}
func (*VaultSearchResponse) UnmarshalJSON ¶
func (r *VaultSearchResponse) UnmarshalJSON(data []byte) (err error)
type VaultSearchResponseChunk ¶
type VaultSearchResponseChunk struct {
// Index of the chunk within the document (0-based)
ChunkIndex int64 `json:"chunk_index"`
// Vector similarity distance (lower is more similar)
Distance float64 `json:"distance"`
// ID of the source document
ObjectID string `json:"object_id"`
// PDF page number where the chunk ends (1-indexed). Null for non-PDF documents or
// documents ingested before page tracking was added.
PageEnd int64 `json:"page_end,nullable"`
// PDF page number where the chunk begins (1-indexed). Null for non-PDF documents
// or documents ingested before page tracking was added.
PageStart int64 `json:"page_start,nullable"`
// Relevance score (deprecated, use distance or hybridScore)
Score float64 `json:"score"`
// Source identifier (deprecated, use object_id)
Source string `json:"source"`
// Preview of the chunk text (up to 500 characters)
Text string `json:"text"`
// Ending word index (0-based) in the OCR word list. Use with GET
// /vault/:id/objects/:objectId/ocr-words to retrieve bounding boxes for
// highlighting.
WordEndIndex int64 `json:"word_end_index,nullable"`
// Starting word index (0-based) in the OCR word list. Use with GET
// /vault/:id/objects/:objectId/ocr-words to retrieve bounding boxes for
// highlighting.
WordStartIndex int64 `json:"word_start_index,nullable"`
JSON vaultSearchResponseChunkJSON `json:"-"`
}
func (*VaultSearchResponseChunk) UnmarshalJSON ¶
func (r *VaultSearchResponseChunk) UnmarshalJSON(data []byte) (err error)
type VaultSearchResponseSource ¶
type VaultSearchResponseSource struct {
ID string `json:"id"`
ChunkCount int64 `json:"chunkCount"`
CreatedAt time.Time `json:"createdAt" format:"date-time"`
Filename string `json:"filename"`
IngestionCompletedAt time.Time `json:"ingestionCompletedAt" format:"date-time"`
PageCount int64 `json:"pageCount"`
TextLength int64 `json:"textLength"`
JSON vaultSearchResponseSourceJSON `json:"-"`
}
func (*VaultSearchResponseSource) UnmarshalJSON ¶
func (r *VaultSearchResponseSource) UnmarshalJSON(data []byte) (err error)
type VaultService ¶
type VaultService struct {
Options []option.RequestOption
Events *VaultEventService
Graphrag *VaultGraphragService
Groups *VaultGroupService
Multipart *VaultMultipartService
Objects *VaultObjectService
}
VaultService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVaultService method instead.
func NewVaultService ¶
func NewVaultService(opts ...option.RequestOption) (r *VaultService)
NewVaultService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VaultService) ConfirmUpload ¶
func (r *VaultService) ConfirmUpload(ctx context.Context, id string, objectID string, body VaultConfirmUploadParams, opts ...option.RequestOption) (res *VaultConfirmUploadResponse, err error)
Confirm whether a direct-to-S3 vault upload succeeded or failed. This endpoint emits vault.upload.completed or vault.upload.failed events and is idempotent for repeated confirmations.
func (*VaultService) Delete ¶
func (r *VaultService) Delete(ctx context.Context, id string, body VaultDeleteParams, opts ...option.RequestOption) (res *VaultDeleteResponse, err error)
Permanently deletes a vault and all its contents including documents, vectors, graph data, and S3 buckets. This operation cannot be undone. For large vaults, use the async=true query parameter to queue deletion in the background.
func (*VaultService) Get ¶
func (r *VaultService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *VaultGetResponse, err error)
Retrieve detailed information about a specific vault, including storage configuration, chunking strategy, and usage statistics. Returns vault metadata, bucket information, and vector storage details.
func (*VaultService) Ingest ¶
func (r *VaultService) Ingest(ctx context.Context, id string, objectID string, opts ...option.RequestOption) (res *VaultIngestResponse, err error)
Triggers ingestion workflow for a vault object to extract text, generate chunks, and create embeddings. For supported file types (PDF, DOCX, TXT, RTF, XML, audio, video), processing happens asynchronously. For unsupported types (images, archives, etc.), the file is marked as completed immediately without text extraction. GraphRAG indexing must be triggered separately via POST /vault/:id/graphrag/:objectId.
func (*VaultService) List ¶
func (r *VaultService) List(ctx context.Context, opts ...option.RequestOption) (res *VaultListResponse, err error)
List all vaults for the authenticated organization. Returns vault metadata including name, description, storage configuration, and usage statistics.
func (*VaultService) New ¶
func (r *VaultService) New(ctx context.Context, body VaultNewParams, opts ...option.RequestOption) (res *VaultNewResponse, err error)
Creates a new secure vault with dedicated S3 storage and vector search capabilities. Each vault provides isolated document storage with semantic search, OCR processing, and optional GraphRAG knowledge graph features for legal document analysis and discovery.
func (*VaultService) Search ¶
func (r *VaultService) Search(ctx context.Context, id string, body VaultSearchParams, opts ...option.RequestOption) (res *VaultSearchResponse, err error)
Search across vault documents using multiple methods including hybrid vector + graph search, GraphRAG global search, entity-based search, and fast similarity search. Returns relevant documents and contextual answers based on the search method.
func (*VaultService) Update ¶
func (r *VaultService) Update(ctx context.Context, id string, body VaultUpdateParams, opts ...option.RequestOption) (res *VaultUpdateResponse, err error)
Update vault settings including name, description, and enableGraph. Changing enableGraph only affects future document uploads - existing documents retain their current graph/non-graph state.
func (*VaultService) Upload ¶
func (r *VaultService) Upload(ctx context.Context, id string, body VaultUploadParams, opts ...option.RequestOption) (res *VaultUploadResponse, err error)
Generate a presigned URL for uploading files directly to a vault's S3 storage. After uploading to S3, confirm the upload result via POST /vault/:vaultId/upload/:objectId/confirm before triggering ingestion.
type VaultUpdateParams ¶
type VaultUpdateParams struct {
// New description for the vault. Set to null to remove.
Description param.Field[string] `json:"description"`
// Whether to enable GraphRAG for future document uploads
EnableGraph param.Field[bool] `json:"enableGraph"`
// Move the vault to a different group, or set to null to remove from its current
// group.
GroupID param.Field[string] `json:"groupId"`
// New name for the vault
Name param.Field[string] `json:"name"`
}
func (VaultUpdateParams) MarshalJSON ¶
func (r VaultUpdateParams) MarshalJSON() (data []byte, err error)
type VaultUpdateResponse ¶
type VaultUpdateResponse struct {
// Vault identifier
ID string `json:"id"`
// Document chunking strategy configuration
ChunkStrategy interface{} `json:"chunkStrategy"`
// Vault creation timestamp
CreatedAt time.Time `json:"createdAt" format:"date-time"`
// Vault description
Description string `json:"description,nullable"`
// Whether GraphRAG is enabled for future uploads
EnableGraph bool `json:"enableGraph"`
// S3 bucket for document storage
FilesBucket string `json:"filesBucket"`
// Search index name
IndexName string `json:"indexName"`
// KMS key for encryption
KmsKeyID string `json:"kmsKeyId"`
// Additional vault metadata
Metadata interface{} `json:"metadata"`
// Vault name
Name string `json:"name"`
// AWS region
Region string `json:"region"`
// Total storage size in bytes
TotalBytes int64 `json:"totalBytes"`
// Number of stored documents
TotalObjects int64 `json:"totalObjects"`
// Number of vector embeddings
TotalVectors int64 `json:"totalVectors"`
// Last update timestamp
UpdatedAt time.Time `json:"updatedAt" format:"date-time"`
// S3 bucket for vector embeddings
VectorBucket string `json:"vectorBucket,nullable"`
JSON vaultUpdateResponseJSON `json:"-"`
}
func (*VaultUpdateResponse) UnmarshalJSON ¶
func (r *VaultUpdateResponse) UnmarshalJSON(data []byte) (err error)
type VaultUploadParams ¶
type VaultUploadParams struct {
// MIME type of the file (e.g., application/pdf, image/jpeg)
ContentType param.Field[string] `json:"contentType,required"`
// Name of the file to upload
Filename param.Field[string] `json:"filename,required"`
// Whether to automatically process and index the file for search
AutoIndex param.Field[bool] `json:"auto_index"`
// Additional metadata to associate with the file
Metadata param.Field[interface{}] `json:"metadata"`
// Optional folder path for hierarchy preservation. Allows integrations to maintain
// source folder structure from systems like NetDocs, Clio, or Smokeball. Example:
// '/Discovery/Depositions/2024'
Path param.Field[string] `json:"path"`
// File size in bytes (optional, max 5GB for single PUT uploads). When provided,
// enforces exact file size at S3 level.
SizeBytes param.Field[int64] `json:"sizeBytes"`
}
func (VaultUploadParams) MarshalJSON ¶
func (r VaultUploadParams) MarshalJSON() (data []byte, err error)
type VaultUploadResponse ¶
type VaultUploadResponse struct {
// Whether the file will be automatically indexed
AutoIndex bool `json:"auto_index"`
// Whether the vault supports indexing. False for storage-only vaults.
EnableIndexing bool `json:"enableIndexing"`
// URL expiration time in seconds
ExpiresIn float64 `json:"expiresIn"`
Instructions VaultUploadResponseInstructions `json:"instructions"`
// Next API endpoint to call for processing
NextStep string `json:"next_step,nullable"`
// Unique identifier for the uploaded object
ObjectID string `json:"objectId"`
// Folder path for hierarchy if provided
Path string `json:"path,nullable"`
// S3 object key for the file
S3Key string `json:"s3Key"`
// Presigned URL for uploading the file
UploadURL string `json:"uploadUrl"`
JSON vaultUploadResponseJSON `json:"-"`
}
func (*VaultUploadResponse) UnmarshalJSON ¶
func (r *VaultUploadResponse) UnmarshalJSON(data []byte) (err error)
type VaultUploadResponseInstructions ¶
type VaultUploadResponseInstructions struct {
Headers interface{} `json:"headers"`
Method string `json:"method"`
Note string `json:"note"`
JSON vaultUploadResponseInstructionsJSON `json:"-"`
}
func (*VaultUploadResponseInstructions) UnmarshalJSON ¶
func (r *VaultUploadResponseInstructions) UnmarshalJSON(data []byte) (err error)
type VoiceService ¶
type VoiceService struct {
Options []option.RequestOption
Streaming *VoiceStreamingService
Transcription *VoiceTranscriptionService
V1 *VoiceV1Service
}
VoiceService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoiceService method instead.
func NewVoiceService ¶
func NewVoiceService(opts ...option.RequestOption) (r *VoiceService)
NewVoiceService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type VoiceStreamingGetURLResponse ¶
type VoiceStreamingGetURLResponse struct {
AudioFormat VoiceStreamingGetURLResponseAudioFormat `json:"audio_format"`
// Complete WebSocket URL with authentication token
ConnectURL string `json:"connect_url"`
Pricing VoiceStreamingGetURLResponsePricing `json:"pricing"`
// Connection protocol
Protocol string `json:"protocol"`
// Base WebSocket URL for streaming transcription
URL string `json:"url"`
JSON voiceStreamingGetURLResponseJSON `json:"-"`
}
func (*VoiceStreamingGetURLResponse) UnmarshalJSON ¶
func (r *VoiceStreamingGetURLResponse) UnmarshalJSON(data []byte) (err error)
type VoiceStreamingGetURLResponseAudioFormat ¶
type VoiceStreamingGetURLResponseAudioFormat struct {
// Number of audio channels
Channels int64 `json:"channels"`
// Required audio encoding format
Encoding string `json:"encoding"`
// Required audio sample rate in Hz
SampleRate int64 `json:"sample_rate"`
JSON voiceStreamingGetURLResponseAudioFormatJSON `json:"-"`
}
func (*VoiceStreamingGetURLResponseAudioFormat) UnmarshalJSON ¶
func (r *VoiceStreamingGetURLResponseAudioFormat) UnmarshalJSON(data []byte) (err error)
type VoiceStreamingGetURLResponsePricing ¶
type VoiceStreamingGetURLResponsePricing struct {
// Currency for pricing
Currency string `json:"currency"`
// Cost per hour of transcription
PerHour float64 `json:"per_hour"`
// Cost per minute of transcription
PerMinute float64 `json:"per_minute"`
JSON voiceStreamingGetURLResponsePricingJSON `json:"-"`
}
func (*VoiceStreamingGetURLResponsePricing) UnmarshalJSON ¶
func (r *VoiceStreamingGetURLResponsePricing) UnmarshalJSON(data []byte) (err error)
type VoiceStreamingService ¶
type VoiceStreamingService struct {
Options []option.RequestOption
}
VoiceStreamingService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoiceStreamingService method instead.
func NewVoiceStreamingService ¶
func NewVoiceStreamingService(opts ...option.RequestOption) (r *VoiceStreamingService)
NewVoiceStreamingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VoiceStreamingService) GetURL ¶
func (r *VoiceStreamingService) GetURL(ctx context.Context, opts ...option.RequestOption) (res *VoiceStreamingGetURLResponse, err error)
Returns the WebSocket URL and connection details for real-time audio transcription. The returned URL can be used to establish a WebSocket connection for streaming audio data and receiving transcribed text in real-time.
**Audio Requirements:**
- Sample Rate: 16kHz - Encoding: PCM 16-bit little-endian - Channels: Mono (1 channel)
**Pricing:** $0.01 per minute ($0.60 per hour)
type VoiceTranscriptionGetResponse ¶
type VoiceTranscriptionGetResponse struct {
// Unique transcription job ID
ID string `json:"id,required"`
// Current status of the transcription job
Status VoiceTranscriptionGetResponseStatus `json:"status,required"`
// Duration of the audio file in seconds
AudioDuration float64 `json:"audio_duration"`
// Overall confidence score (0-100)
Confidence float64 `json:"confidence"`
// Error message (only present when status is failed)
Error string `json:"error"`
// Result transcript object ID (vault-based jobs, when completed)
ResultObjectID string `json:"result_object_id"`
// Source audio object ID (vault-based jobs only)
SourceObjectID string `json:"source_object_id"`
// Full transcription text (legacy direct URL jobs only)
Text string `json:"text"`
// Vault ID (vault-based jobs only)
VaultID string `json:"vault_id"`
// Number of words in the transcript
WordCount int64 `json:"word_count"`
// Word-level timestamps (legacy direct URL jobs only)
Words []interface{} `json:"words"`
JSON voiceTranscriptionGetResponseJSON `json:"-"`
}
func (*VoiceTranscriptionGetResponse) UnmarshalJSON ¶
func (r *VoiceTranscriptionGetResponse) UnmarshalJSON(data []byte) (err error)
type VoiceTranscriptionGetResponseStatus ¶
type VoiceTranscriptionGetResponseStatus string
Current status of the transcription job
const ( VoiceTranscriptionGetResponseStatusQueued VoiceTranscriptionGetResponseStatus = "queued" VoiceTranscriptionGetResponseStatusProcessing VoiceTranscriptionGetResponseStatus = "processing" VoiceTranscriptionGetResponseStatusCompleted VoiceTranscriptionGetResponseStatus = "completed" VoiceTranscriptionGetResponseStatusFailed VoiceTranscriptionGetResponseStatus = "failed" )
func (VoiceTranscriptionGetResponseStatus) IsKnown ¶
func (r VoiceTranscriptionGetResponseStatus) IsKnown() bool
type VoiceTranscriptionNewParams ¶
type VoiceTranscriptionNewParams struct {
// URL of the audio file to transcribe (legacy mode, no auto-storage)
AudioURL param.Field[string] `json:"audio_url"`
// Automatically extract key phrases and topics
AutoHighlights param.Field[bool] `json:"auto_highlights"`
// How much to boost custom vocabulary
BoostParam param.Field[VoiceTranscriptionNewParamsBoostParam] `json:"boost_param"`
// Enable content moderation and safety labeling
ContentSafetyLabels param.Field[bool] `json:"content_safety_labels"`
// Output format for the transcript when using vault mode
Format param.Field[VoiceTranscriptionNewParamsFormat] `json:"format"`
// Format text with proper capitalization
FormatText param.Field[bool] `json:"format_text"`
// Language code (e.g., 'en_us', 'es', 'fr'). If not specified, language will be
// auto-detected
LanguageCode param.Field[string] `json:"language_code"`
// Enable automatic language detection
LanguageDetection param.Field[bool] `json:"language_detection"`
// Object ID of the audio file in the vault (use with vault_id)
ObjectID param.Field[string] `json:"object_id"`
// Add punctuation to the transcript
Punctuate param.Field[bool] `json:"punctuate"`
// Enable speaker identification and labeling
SpeakerLabels param.Field[bool] `json:"speaker_labels"`
// Expected number of speakers (improves accuracy when known)
SpeakersExpected param.Field[int64] `json:"speakers_expected"`
// Priority-ordered speech models to use
SpeechModels param.Field[[]string] `json:"speech_models"`
// Vault ID containing the audio file (use with object_id)
VaultID param.Field[string] `json:"vault_id"`
// Custom vocabulary words to boost (e.g., legal terms)
WordBoost param.Field[[]string] `json:"word_boost"`
}
func (VoiceTranscriptionNewParams) MarshalJSON ¶
func (r VoiceTranscriptionNewParams) MarshalJSON() (data []byte, err error)
type VoiceTranscriptionNewParamsBoostParam ¶
type VoiceTranscriptionNewParamsBoostParam string
How much to boost custom vocabulary
const ( VoiceTranscriptionNewParamsBoostParamLow VoiceTranscriptionNewParamsBoostParam = "low" VoiceTranscriptionNewParamsBoostParamDefault VoiceTranscriptionNewParamsBoostParam = "default" VoiceTranscriptionNewParamsBoostParamHigh VoiceTranscriptionNewParamsBoostParam = "high" )
func (VoiceTranscriptionNewParamsBoostParam) IsKnown ¶
func (r VoiceTranscriptionNewParamsBoostParam) IsKnown() bool
type VoiceTranscriptionNewParamsFormat ¶
type VoiceTranscriptionNewParamsFormat string
Output format for the transcript when using vault mode
const ( VoiceTranscriptionNewParamsFormatJson VoiceTranscriptionNewParamsFormat = "json" VoiceTranscriptionNewParamsFormatText VoiceTranscriptionNewParamsFormat = "text" )
func (VoiceTranscriptionNewParamsFormat) IsKnown ¶
func (r VoiceTranscriptionNewParamsFormat) IsKnown() bool
type VoiceTranscriptionNewResponse ¶
type VoiceTranscriptionNewResponse struct {
// Unique transcription job ID
ID string `json:"id"`
// Source audio object ID (only for vault-based transcription)
SourceObjectID string `json:"source_object_id"`
// Current status of the transcription job
Status VoiceTranscriptionNewResponseStatus `json:"status"`
// Vault ID (only for vault-based transcription)
VaultID string `json:"vault_id"`
JSON voiceTranscriptionNewResponseJSON `json:"-"`
}
func (*VoiceTranscriptionNewResponse) UnmarshalJSON ¶
func (r *VoiceTranscriptionNewResponse) UnmarshalJSON(data []byte) (err error)
type VoiceTranscriptionNewResponseStatus ¶
type VoiceTranscriptionNewResponseStatus string
Current status of the transcription job
const ( VoiceTranscriptionNewResponseStatusQueued VoiceTranscriptionNewResponseStatus = "queued" VoiceTranscriptionNewResponseStatusProcessing VoiceTranscriptionNewResponseStatus = "processing" VoiceTranscriptionNewResponseStatusCompleted VoiceTranscriptionNewResponseStatus = "completed" VoiceTranscriptionNewResponseStatusError VoiceTranscriptionNewResponseStatus = "error" )
func (VoiceTranscriptionNewResponseStatus) IsKnown ¶
func (r VoiceTranscriptionNewResponseStatus) IsKnown() bool
type VoiceTranscriptionService ¶
type VoiceTranscriptionService struct {
Options []option.RequestOption
}
VoiceTranscriptionService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoiceTranscriptionService method instead.
func NewVoiceTranscriptionService ¶
func NewVoiceTranscriptionService(opts ...option.RequestOption) (r *VoiceTranscriptionService)
NewVoiceTranscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VoiceTranscriptionService) Delete ¶
func (r *VoiceTranscriptionService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)
Deletes a transcription job. For managed vault jobs (tr\_\*), also removes local job records and managed transcript result objects. Idempotent: returns success if already deleted.
func (*VoiceTranscriptionService) Get ¶
func (r *VoiceTranscriptionService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *VoiceTranscriptionGetResponse, err error)
Retrieve the status and result of an audio transcription job. For vault-based jobs, returns status and result_object_id when complete. For legacy direct URL jobs, returns the full transcription data.
func (*VoiceTranscriptionService) New ¶
func (r *VoiceTranscriptionService) New(ctx context.Context, body VoiceTranscriptionNewParams, opts ...option.RequestOption) (res *VoiceTranscriptionNewResponse, err error)
Creates an asynchronous transcription job for audio files. Supports two modes:
**Vault-based (recommended)**: Pass `vault_id` and `object_id` to transcribe audio from your vault. The transcript will automatically be saved back to the vault when complete.
**Direct URL (legacy)**: Pass `audio_url` for direct transcription without automatic storage.
type VoiceV1ListVoicesParams ¶
type VoiceV1ListVoicesParams struct {
// Filter by voice category
Category param.Field[string] `query:"category"`
// Filter by voice collection ID
CollectionID param.Field[string] `query:"collection_id"`
// Whether to include total count in response
IncludeTotalCount param.Field[bool] `query:"include_total_count"`
// Token for retrieving the next page of results
NextPageToken param.Field[string] `query:"next_page_token"`
// Number of voices to return per page (max 100)
PageSize param.Field[int64] `query:"page_size"`
// Search term to filter voices by name or description
Search param.Field[string] `query:"search"`
// Field to sort by
Sort param.Field[VoiceV1ListVoicesParamsSort] `query:"sort"`
// Sort direction
SortDirection param.Field[VoiceV1ListVoicesParamsSortDirection] `query:"sort_direction"`
// Filter by voice type
VoiceType param.Field[VoiceV1ListVoicesParamsVoiceType] `query:"voice_type"`
}
func (VoiceV1ListVoicesParams) URLQuery ¶
func (r VoiceV1ListVoicesParams) URLQuery() (v url.Values)
URLQuery serializes VoiceV1ListVoicesParams's query parameters as `url.Values`.
type VoiceV1ListVoicesParamsSort ¶
type VoiceV1ListVoicesParamsSort string
Field to sort by
const ( VoiceV1ListVoicesParamsSortName VoiceV1ListVoicesParamsSort = "name" VoiceV1ListVoicesParamsSortCreatedAt VoiceV1ListVoicesParamsSort = "created_at" VoiceV1ListVoicesParamsSortUpdatedAt VoiceV1ListVoicesParamsSort = "updated_at" )
func (VoiceV1ListVoicesParamsSort) IsKnown ¶
func (r VoiceV1ListVoicesParamsSort) IsKnown() bool
type VoiceV1ListVoicesParamsSortDirection ¶
type VoiceV1ListVoicesParamsSortDirection string
Sort direction
const ( VoiceV1ListVoicesParamsSortDirectionAsc VoiceV1ListVoicesParamsSortDirection = "asc" VoiceV1ListVoicesParamsSortDirectionDesc VoiceV1ListVoicesParamsSortDirection = "desc" )
func (VoiceV1ListVoicesParamsSortDirection) IsKnown ¶
func (r VoiceV1ListVoicesParamsSortDirection) IsKnown() bool
type VoiceV1ListVoicesParamsVoiceType ¶
type VoiceV1ListVoicesParamsVoiceType string
Filter by voice type
const ( VoiceV1ListVoicesParamsVoiceTypePremade VoiceV1ListVoicesParamsVoiceType = "premade" VoiceV1ListVoicesParamsVoiceTypeCloned VoiceV1ListVoicesParamsVoiceType = "cloned" VoiceV1ListVoicesParamsVoiceTypeProfessional VoiceV1ListVoicesParamsVoiceType = "professional" )
func (VoiceV1ListVoicesParamsVoiceType) IsKnown ¶
func (r VoiceV1ListVoicesParamsVoiceType) IsKnown() bool
type VoiceV1ListVoicesResponse ¶
type VoiceV1ListVoicesResponse struct {
// Token for next page of results
NextPageToken string `json:"next_page_token"`
// Total number of voices (if requested)
TotalCount int64 `json:"total_count"`
Voices []VoiceV1ListVoicesResponseVoice `json:"voices"`
JSON voiceV1ListVoicesResponseJSON `json:"-"`
}
func (*VoiceV1ListVoicesResponse) UnmarshalJSON ¶
func (r *VoiceV1ListVoicesResponse) UnmarshalJSON(data []byte) (err error)
type VoiceV1ListVoicesResponseVoice ¶
type VoiceV1ListVoicesResponseVoice struct {
// Available subscription tiers
AvailableForTiers []string `json:"available_for_tiers"`
// Voice category
Category string `json:"category"`
// Voice description
Description string `json:"description"`
// Voice characteristics and metadata
Labels interface{} `json:"labels"`
// Voice name
Name string `json:"name"`
// URL to preview audio sample
PreviewURL string `json:"preview_url"`
// Unique voice identifier
VoiceID string `json:"voice_id"`
JSON voiceV1ListVoicesResponseVoiceJSON `json:"-"`
}
func (*VoiceV1ListVoicesResponseVoice) UnmarshalJSON ¶
func (r *VoiceV1ListVoicesResponseVoice) UnmarshalJSON(data []byte) (err error)
type VoiceV1Service ¶
type VoiceV1Service struct {
Options []option.RequestOption
Speak *VoiceV1SpeakService
}
VoiceV1Service contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoiceV1Service method instead.
func NewVoiceV1Service ¶
func NewVoiceV1Service(opts ...option.RequestOption) (r *VoiceV1Service)
NewVoiceV1Service generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VoiceV1Service) ListVoices ¶
func (r *VoiceV1Service) ListVoices(ctx context.Context, query VoiceV1ListVoicesParams, opts ...option.RequestOption) (res *VoiceV1ListVoicesResponse, err error)
Retrieve a list of available voices for text-to-speech synthesis. This endpoint provides access to a comprehensive catalog of voices with various characteristics, languages, and styles suitable for legal document narration, client presentations, and accessibility purposes.
type VoiceV1SpeakNewParams ¶
type VoiceV1SpeakNewParams struct {
// Text to convert to speech
Text param.Field[string] `json:"text,required"`
// Apply automatic text normalization
ApplyTextNormalization param.Field[bool] `json:"apply_text_normalization"`
// Enable request logging
EnableLogging param.Field[bool] `json:"enable_logging"`
// Language code for multilingual models
LanguageCode param.Field[string] `json:"language_code"`
// ElevenLabs model ID
ModelID param.Field[VoiceV1SpeakNewParamsModelID] `json:"model_id"`
// Next context for better pronunciation
NextText param.Field[string] `json:"next_text"`
// Optimize for streaming latency (0-4)
OptimizeStreamingLatency param.Field[int64] `json:"optimize_streaming_latency"`
// Audio output format
OutputFormat param.Field[VoiceV1SpeakNewParamsOutputFormat] `json:"output_format"`
// Previous context for better pronunciation
PreviousText param.Field[string] `json:"previous_text"`
// Seed for reproducible generation
Seed param.Field[int64] `json:"seed"`
// ElevenLabs voice ID (defaults to Rachel - professional, clear)
VoiceID param.Field[string] `json:"voice_id"`
// Voice customization settings
VoiceSettings param.Field[VoiceV1SpeakNewParamsVoiceSettings] `json:"voice_settings"`
}
func (VoiceV1SpeakNewParams) MarshalJSON ¶
func (r VoiceV1SpeakNewParams) MarshalJSON() (data []byte, err error)
type VoiceV1SpeakNewParamsModelID ¶
type VoiceV1SpeakNewParamsModelID string
ElevenLabs model ID
const ( VoiceV1SpeakNewParamsModelIDElevenMultilingualV2 VoiceV1SpeakNewParamsModelID = "eleven_multilingual_v2" VoiceV1SpeakNewParamsModelIDElevenTurboV2 VoiceV1SpeakNewParamsModelID = "eleven_turbo_v2" VoiceV1SpeakNewParamsModelIDElevenMonolingualV1 VoiceV1SpeakNewParamsModelID = "eleven_monolingual_v1" )
func (VoiceV1SpeakNewParamsModelID) IsKnown ¶
func (r VoiceV1SpeakNewParamsModelID) IsKnown() bool
type VoiceV1SpeakNewParamsOutputFormat ¶
type VoiceV1SpeakNewParamsOutputFormat string
Audio output format
const ( VoiceV1SpeakNewParamsOutputFormatMP3_44100_128 VoiceV1SpeakNewParamsOutputFormat = "mp3_44100_128" VoiceV1SpeakNewParamsOutputFormatMP3_44100_192 VoiceV1SpeakNewParamsOutputFormat = "mp3_44100_192" VoiceV1SpeakNewParamsOutputFormatPcm16000 VoiceV1SpeakNewParamsOutputFormat = "pcm_16000" VoiceV1SpeakNewParamsOutputFormatPcm22050 VoiceV1SpeakNewParamsOutputFormat = "pcm_22050" VoiceV1SpeakNewParamsOutputFormatPcm24000 VoiceV1SpeakNewParamsOutputFormat = "pcm_24000" VoiceV1SpeakNewParamsOutputFormatPcm44100 VoiceV1SpeakNewParamsOutputFormat = "pcm_44100" )
func (VoiceV1SpeakNewParamsOutputFormat) IsKnown ¶
func (r VoiceV1SpeakNewParamsOutputFormat) IsKnown() bool
type VoiceV1SpeakNewParamsVoiceSettings ¶
type VoiceV1SpeakNewParamsVoiceSettings struct {
// Similarity boost (0-1)
SimilarityBoost param.Field[float64] `json:"similarity_boost"`
// Voice stability (0-1)
Stability param.Field[float64] `json:"stability"`
// Style exaggeration (0-1)
Style param.Field[float64] `json:"style"`
// Enable speaker boost
UseSpeakerBoost param.Field[bool] `json:"use_speaker_boost"`
}
Voice customization settings
func (VoiceV1SpeakNewParamsVoiceSettings) MarshalJSON ¶
func (r VoiceV1SpeakNewParamsVoiceSettings) MarshalJSON() (data []byte, err error)
type VoiceV1SpeakService ¶
type VoiceV1SpeakService struct {
Options []option.RequestOption
}
VoiceV1SpeakService contains methods and other services that help with interacting with the casedev API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVoiceV1SpeakService method instead.
func NewVoiceV1SpeakService ¶
func NewVoiceV1SpeakService(opts ...option.RequestOption) (r *VoiceV1SpeakService)
NewVoiceV1SpeakService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*VoiceV1SpeakService) New ¶
func (r *VoiceV1SpeakService) New(ctx context.Context, body VoiceV1SpeakNewParams, opts ...option.RequestOption) (res *http.Response, err error)
Convert text to natural-sounding audio using ElevenLabs voices. Ideal for creating audio summaries of legal documents, client presentations, or accessibility features. Supports multiple languages and voice customization.
Source Files
¶
- agent.go
- agentv1.go
- agentv1agent.go
- agentv1run.go
- aliases.go
- application.go
- applicationv1.go
- applicationv1deployment.go
- applicationv1project.go
- applicationv1workflow.go
- client.go
- compute.go
- computev1.go
- computev1environment.go
- computev1instance.go
- computev1instancetype.go
- computev1secret.go
- database.go
- databasev1.go
- databasev1project.go
- field.go
- format.go
- formatv1.go
- formatv1template.go
- legal.go
- legalv1.go
- llm.go
- llmv1.go
- llmv1chat.go
- memory.go
- memoryv1.go
- ocr.go
- ocrv1.go
- privilege.go
- privilegev1.go
- search.go
- searchv1.go
- superdoc.go
- superdocv1.go
- system.go
- translate.go
- translatev1.go
- vault.go
- vaultevent.go
- vaulteventsubscription.go
- vaultgraphrag.go
- vaultgroup.go
- vaultmultipart.go
- vaultobject.go
- voice.go
- voicestreaming.go
- voicetranscription.go
- voicev1.go
- voicev1speak.go