githubcomcasemarkcasedevgo

package module
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

README

Casedev Go API Library

Go Reference

The Casedev Go library provides convenient access to the Casedev REST API from applications written in Go.

It is generated with Stainless.

Installation

import (
	"github.com/CaseMark/casedev-go" // imported as githubcomcasemarkcasedevgo
)

Or to pin the version:

go get -u 'github.com/CaseMark/casedev-go@v0.57.0'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/CaseMark/casedev-go"
	"github.com/CaseMark/casedev-go/option"
)

func main() {
	client := githubcomcasemarkcasedevgo.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("CASEDEV_API_KEY")
		option.WithEnvironmentLocal(),   // defaults to option.WithEnvironmentProduction()
	)
	response, err := client.Llm.V1.Chat.NewCompletion(context.TODO(), githubcomcasemarkcasedevgo.LlmV1ChatNewCompletionParams{
		Messages: githubcomcasemarkcasedevgo.F([]githubcomcasemarkcasedevgo.LlmV1ChatNewCompletionParamsMessage{{
			Role:    githubcomcasemarkcasedevgo.F(githubcomcasemarkcasedevgo.LlmV1ChatNewCompletionParamsMessagesRoleUser),
			Content: githubcomcasemarkcasedevgo.F("Hello!"),
		}}),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response.ID)
}

Request fields

All request parameters are wrapped in a generic Field type, which we use to distinguish zero values from null or omitted fields.

This prevents accidentally sending a zero value if you forget a required parameter, and enables explicitly sending null, false, '', or 0 on optional parameters. Any field not specified is not sent.

To construct fields with values, use the helpers String(), Int(), Float(), or most commonly, the generic F[T](). To send a null, use Null[T](), and to send a nonconforming value, use Raw[T](any). For example:

params := FooParams{
	Name: githubcomcasemarkcasedevgo.F("hello"),

	// Explicitly send `"description": null`
	Description: githubcomcasemarkcasedevgo.Null[string](),

	Point: githubcomcasemarkcasedevgo.F(githubcomcasemarkcasedevgo.Point{
		X: githubcomcasemarkcasedevgo.Int(0),
		Y: githubcomcasemarkcasedevgo.Int(1),

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: githubcomcasemarkcasedevgo.Raw[int64](0.01), // sends a float
	}),
}
Response objects

All fields in response structs are value types (not pointers or wrappers).

If a given field is null, not present, or invalid, the corresponding field will simply be its zero value.

All response structs also include a special JSON field, containing more detailed information about each property, which you can use like so:

if res.Name == "" {
	// true if `"name"` is either not present or explicitly null
	res.JSON.Name.IsNull()

	// true if the `"name"` key was not present in the response JSON at all
	res.JSON.Name.IsMissing()

	// When the API returns data that cannot be coerced to the expected type:
	if res.JSON.Name.IsInvalid() {
		raw := res.JSON.Name.Raw()

		legacyName := struct{
			First string `json:"first"`
			Last  string `json:"last"`
		}{}
		json.Unmarshal([]byte(raw), &legacyName)
		name = legacyName.First + " " + legacyName.Last
	}
}

These .JSON structs also include an Extras map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := githubcomcasemarkcasedevgo.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Vault.New(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

Errors

When the API returns a non-success status code, we return an error with type *githubcomcasemarkcasedevgo.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Vault.New(context.TODO(), githubcomcasemarkcasedevgo.VaultNewParams{
	Name: githubcomcasemarkcasedevgo.F("My Vault"),
})
if err != nil {
	var apierr *githubcomcasemarkcasedevgo.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/vault": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Vault.New(
	ctx,
	githubcomcasemarkcasedevgo.VaultNewParams{
		Name: githubcomcasemarkcasedevgo.F("My Vault"),
	},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as param.Field[io.Reader]. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper githubcomcasemarkcasedevgo.FileParam(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := githubcomcasemarkcasedevgo.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Vault.New(
	context.TODO(),
	githubcomcasemarkcasedevgo.VaultNewParams{
		Name: githubcomcasemarkcasedevgo.F("My Vault"),
	},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
vault, err := client.Vault.New(
	context.TODO(),
	githubcomcasemarkcasedevgo.VaultNewParams{
		Name: githubcomcasemarkcasedevgo.F("My Vault"),
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", vault)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]interface{}

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   githubcomcasemarkcasedevgo.F("id_xxxx"),
    Data: githubcomcasemarkcasedevgo.F(FooNewParamsData{
        FirstName: githubcomcasemarkcasedevgo.F("John"),
    }),
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := githubcomcasemarkcasedevgo.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) param.Field[bool]

Bool is a param field helper which helps specify bools.

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

func F[T any](value T) param.Field[T]

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 FileParam

func FileParam(reader io.Reader, filename string, contentType string) param.Field[io.Reader]

FileParam is a param field helper which helps files with a mime content-type.

func Float

func Float(value float64) param.Field[float64]

Float is a param field helper which helps specify floats.

func Int

func Int(value int64) param.Field[int64]

Int is a param field helper which helps specify integers. This is particularly helpful when specifying integer constants for fields.

func Null

func Null[T any]() param.Field[T]

Null is a param field helper which explicitly sends null to the API.

func Raw

func Raw[T any](value any) param.Field[T]

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

func String

func String(value string) param.Field[string]

String is a param field helper which helps specify strings.

Types

type Client

type Client struct {
	Options    []option.RequestOption
	Connectors *ConnectorService
	// Public system metadata and discovery endpoints
	System  *SystemService
	Compute *ComputeService
	Legal   *LegalService
	Linc    *LincService
	Matters *MatterService
	// Access 40+ language models through a unified API
	Llm       *LlmService
	Memory    *MemoryService
	Media     *MediaService
	Ocr       *OcrService
	Privilege *PrivilegeService
	// Search and read legal AI skills for agents
	Skills    *SkillService
	Search    *SearchService
	Translate *TranslateService
	Usage     *UsageService
	// Secure document storage with semantic search and GraphRAG
	Vault    *VaultService
	Voice    *VoiceService
	Webhooks *WebhookService
}

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.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params interface{}, res interface{}, opts ...option.RequestOption) error

Put makes a PUT 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
	// Serverless GPU and CPU infrastructure
	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" api:"required"`
	Success bool                                   `json:"success" api:"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" api:"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

type ComputeV1EnvironmentService

type ComputeV1EnvironmentService struct {
	Options []option.RequestOption
}

Serverless GPU and CPU infrastructure

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

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

Retrieve a specific compute environment by name. Returns environment configuration including status, domain, and metadata for your serverless compute infrastructure.

func (*ComputeV1EnvironmentService) List

Retrieve all compute environments for your organization. Environments provide isolated execution contexts for running code and workflows.

func (*ComputeV1EnvironmentService) New

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

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"`
	CreatedAt             string                           `json:"createdAt"`
	CurrentCost           string                           `json:"currentCost"`
	CurrentRuntimeSeconds int64                            `json:"currentRuntimeSeconds"`
	GPU                   string                           `json:"gpu"`
	InstanceType          string                           `json:"instanceType"`
	IP                    string                           `json:"ip" api:"nullable"`
	Name                  string                           `json:"name"`
	PricePerHour          string                           `json:"pricePerHour"`
	Region                string                           `json:"region"`
	Specs                 interface{}                      `json:"specs"`
	SSH                   ComputeV1InstanceGetResponseSSH  `json:"ssh" api:"nullable"`
	StartedAt             string                           `json:"startedAt" api:"nullable"`
	Status                string                           `json:"status"`
	VaultMounts           interface{}                      `json:"vaultMounts" api:"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"`
	CreatedAt           time.Time                                    `json:"createdAt" format:"date-time"`
	GPU                 string                                       `json:"gpu"`
	InstanceType        string                                       `json:"instanceType"`
	IP                  string                                       `json:"ip" api:"nullable"`
	Name                string                                       `json:"name"`
	PricePerHour        string                                       `json:"pricePerHour"`
	Region              string                                       `json:"region"`
	StartedAt           time.Time                                    `json:"startedAt" api:"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

type ComputeV1InstanceNewParams

type ComputeV1InstanceNewParams struct {
	// GPU type (e.g., 'gpu_1x_h100_sxm5')
	InstanceType param.Field[string] `json:"instanceType" api:"required"`
	// Instance name
	Name param.Field[string] `json:"name" api:"required"`
	// Region (e.g., 'us-west-1')
	Region param.Field[string] `json:"region" api:"required"`
	// 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"`
	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
}

Serverless GPU and CPU infrastructure

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

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

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

Retrieves all GPU compute instances for your organization with real-time status updates from Lambda Labs. Includes pricing and runtime metrics. Perfect for monitoring AI workloads, document processing jobs, and cost tracking.

func (*ComputeV1InstanceService) New

Launches a new GPU compute instance with automatic SSH key generation. Supports mounting Case.dev Vaults as filesystems. 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" api:"required"`
	InstanceTypes []ComputeV1InstanceTypeListResponseInstanceType `json:"instanceTypes" api:"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
}

Serverless GPU and CPU infrastructure

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

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" api:"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
}

Serverless GPU and CPU infrastructure

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

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

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

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

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

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" api:"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
	// Serverless GPU and CPU infrastructure
	Environments *ComputeV1EnvironmentService
	// Serverless GPU and CPU infrastructure
	InstanceTypes *ComputeV1InstanceTypeService
	// Serverless GPU and CPU infrastructure
	Instances *ComputeV1InstanceService
	// Serverless GPU and CPU infrastructure
	Secrets *ComputeV1SecretService
}

Serverless GPU and CPU infrastructure

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

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 ConnectorService added in v0.57.0

type ConnectorService struct {
	Options []option.RequestOption
	// Import and export between provider folders (Google Drive) and vaults
	V1 *ConnectorV1Service
}

ConnectorService 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 NewConnectorService method instead.

func NewConnectorService added in v0.57.0

func NewConnectorService(opts ...option.RequestOption) (r *ConnectorService)

NewConnectorService 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 ConnectorV1ConnectionBrowseParams added in v0.57.0

type ConnectorV1ConnectionBrowseParams struct {
	// Container id to list, or the container containing parent
	Container param.Field[string] `query:"container"`
	Cursor    param.Field[string] `query:"cursor"`
	PageSize  param.Field[int64]  `query:"page_size"`
	// Folder id to list
	Parent param.Field[string] `query:"parent"`
	// Optional provider-supported search text
	Query param.Field[string] `query:"query"`
	// Site id to list
	Site param.Field[string] `query:"site"`
}

func (ConnectorV1ConnectionBrowseParams) URLQuery added in v0.57.0

func (r ConnectorV1ConnectionBrowseParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1ConnectionBrowseParams's query parameters as `url.Values`.

type ConnectorV1ConnectionBrowseResponse added in v0.57.0

type ConnectorV1ConnectionBrowseResponse struct {
	Cursor string                                    `json:"cursor" api:"nullable"`
	Items  []ConnectorV1ConnectionBrowseResponseItem `json:"items"`
	JSON   connectorV1ConnectionBrowseResponseJSON   `json:"-"`
}

func (*ConnectorV1ConnectionBrowseResponse) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1ConnectionBrowseResponse) UnmarshalJSON(data []byte) (err error)

type ConnectorV1ConnectionBrowseResponseItem added in v0.57.0

type ConnectorV1ConnectionBrowseResponseItem struct {
	ID          string                                       `json:"id"`
	BrowseRef   interface{}                                  `json:"browse_ref" api:"nullable"`
	ContainerID string                                       `json:"container_id" api:"nullable"`
	Kind        ConnectorV1ConnectionBrowseResponseItemsKind `json:"kind"`
	MimeType    string                                       `json:"mime_type" api:"nullable"`
	ModifiedAt  string                                       `json:"modified_at" api:"nullable"`
	Name        string                                       `json:"name"`
	ParentIDs   []string                                     `json:"parent_ids"`
	Path        string                                       `json:"path" api:"nullable"`
	SizeBytes   int64                                        `json:"size_bytes" api:"nullable"`
	JSON        connectorV1ConnectionBrowseResponseItemJSON  `json:"-"`
}

func (*ConnectorV1ConnectionBrowseResponseItem) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1ConnectionBrowseResponseItem) UnmarshalJSON(data []byte) (err error)

type ConnectorV1ConnectionBrowseResponseItemsKind added in v0.57.0

type ConnectorV1ConnectionBrowseResponseItemsKind string
const (
	ConnectorV1ConnectionBrowseResponseItemsKindMyDrive         ConnectorV1ConnectionBrowseResponseItemsKind = "my_drive"
	ConnectorV1ConnectionBrowseResponseItemsKindSharedDrive     ConnectorV1ConnectionBrowseResponseItemsKind = "shared_drive"
	ConnectorV1ConnectionBrowseResponseItemsKindMatter          ConnectorV1ConnectionBrowseResponseItemsKind = "matter"
	ConnectorV1ConnectionBrowseResponseItemsKindSite            ConnectorV1ConnectionBrowseResponseItemsKind = "site"
	ConnectorV1ConnectionBrowseResponseItemsKindDocumentLibrary ConnectorV1ConnectionBrowseResponseItemsKind = "document_library"
	ConnectorV1ConnectionBrowseResponseItemsKindFolder          ConnectorV1ConnectionBrowseResponseItemsKind = "folder"
	ConnectorV1ConnectionBrowseResponseItemsKindFile            ConnectorV1ConnectionBrowseResponseItemsKind = "file"
)

func (ConnectorV1ConnectionBrowseResponseItemsKind) IsKnown added in v0.57.0

type ConnectorV1ConnectionDeleteParams added in v0.57.0

type ConnectorV1ConnectionDeleteParams struct {
	Purge param.Field[bool] `query:"purge"`
}

func (ConnectorV1ConnectionDeleteParams) URLQuery added in v0.57.0

func (r ConnectorV1ConnectionDeleteParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1ConnectionDeleteParams's query parameters as `url.Values`.

type ConnectorV1ConnectionListParams added in v0.57.0

type ConnectorV1ConnectionListParams struct {
	Provider param.Field[string]                                `query:"provider"`
	Status   param.Field[ConnectorV1ConnectionListParamsStatus] `query:"status"`
}

func (ConnectorV1ConnectionListParams) URLQuery added in v0.57.0

func (r ConnectorV1ConnectionListParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1ConnectionListParams's query parameters as `url.Values`.

type ConnectorV1ConnectionListParamsStatus added in v0.57.0

type ConnectorV1ConnectionListParamsStatus string
const (
	ConnectorV1ConnectionListParamsStatusPending        ConnectorV1ConnectionListParamsStatus = "pending"
	ConnectorV1ConnectionListParamsStatusHealthy        ConnectorV1ConnectionListParamsStatus = "healthy"
	ConnectorV1ConnectionListParamsStatusReauthRequired ConnectorV1ConnectionListParamsStatus = "reauth_required"
	ConnectorV1ConnectionListParamsStatusRevoked        ConnectorV1ConnectionListParamsStatus = "revoked"
	ConnectorV1ConnectionListParamsStatusThrottled      ConnectorV1ConnectionListParamsStatus = "throttled"
)

func (ConnectorV1ConnectionListParamsStatus) IsKnown added in v0.57.0

type ConnectorV1ConnectionListResponse added in v0.57.0

type ConnectorV1ConnectionListResponse struct {
	Capabilities ConnectorV1ConnectionListResponseCapabilities `json:"capabilities"`
	Connections  []interface{}                                 `json:"connections"`
	Cursor       string                                        `json:"cursor" api:"nullable"`
	JSON         connectorV1ConnectionListResponseJSON         `json:"-"`
}

func (*ConnectorV1ConnectionListResponse) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1ConnectionListResponse) UnmarshalJSON(data []byte) (err error)

type ConnectorV1ConnectionListResponseCapabilities added in v0.57.0

type ConnectorV1ConnectionListResponseCapabilities struct {
	GoogleDriveFolderMirroring bool                                              `json:"google_drive_folder_mirroring"`
	JSON                       connectorV1ConnectionListResponseCapabilitiesJSON `json:"-"`
}

func (*ConnectorV1ConnectionListResponseCapabilities) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1ConnectionListResponseCapabilities) UnmarshalJSON(data []byte) (err error)

type ConnectorV1ConnectionNewParams added in v0.57.0

type ConnectorV1ConnectionNewParams struct {
	Provider param.Field[ConnectorV1ConnectionNewParamsProvider] `json:"provider" api:"required"`
	// HTTPS URL the user is sent back to after consent.
	ReturnURL param.Field[string] `json:"return_url" api:"required"`
	// Provider-specific OAuth permission tier. Omit to use the provider's default.
	ScopeTier param.Field[ConnectorV1ConnectionNewParamsScopeTier] `json:"scope_tier"`
}

func (ConnectorV1ConnectionNewParams) MarshalJSON added in v0.57.0

func (r ConnectorV1ConnectionNewParams) MarshalJSON() (data []byte, err error)

type ConnectorV1ConnectionNewParamsProvider added in v0.57.0

type ConnectorV1ConnectionNewParamsProvider string
const (
	ConnectorV1ConnectionNewParamsProviderClio      ConnectorV1ConnectionNewParamsProvider = "clio"
	ConnectorV1ConnectionNewParamsProviderGdrive    ConnectorV1ConnectionNewParamsProvider = "gdrive"
	ConnectorV1ConnectionNewParamsProviderMicrosoft ConnectorV1ConnectionNewParamsProvider = "microsoft"
)

func (ConnectorV1ConnectionNewParamsProvider) IsKnown added in v0.57.0

type ConnectorV1ConnectionNewParamsScopeTier added in v0.57.0

type ConnectorV1ConnectionNewParamsScopeTier string

Provider-specific OAuth permission tier. Omit to use the provider's default.

const (
	ConnectorV1ConnectionNewParamsScopeTierClioUs        ConnectorV1ConnectionNewParamsScopeTier = "clio.us"
	ConnectorV1ConnectionNewParamsScopeTierDrive         ConnectorV1ConnectionNewParamsScopeTier = "drive"
	ConnectorV1ConnectionNewParamsScopeTierMicrosoftRead ConnectorV1ConnectionNewParamsScopeTier = "microsoft.read"
)

func (ConnectorV1ConnectionNewParamsScopeTier) IsKnown added in v0.57.0

type ConnectorV1ConnectionNewResponse added in v0.57.0

type ConnectorV1ConnectionNewResponse struct {
	ConnectURL   string                               `json:"connect_url"`
	ConnectionID string                               `json:"connection_id"`
	ExpiresAt    string                               `json:"expires_at"`
	JSON         connectorV1ConnectionNewResponseJSON `json:"-"`
}

func (*ConnectorV1ConnectionNewResponse) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1ConnectionNewResponse) UnmarshalJSON(data []byte) (err error)

type ConnectorV1ConnectionService added in v0.57.0

type ConnectorV1ConnectionService struct {
	Options []option.RequestOption
}

Import and export between provider folders (Google Drive) and vaults

ConnectorV1ConnectionService 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 NewConnectorV1ConnectionService method instead.

func NewConnectorV1ConnectionService added in v0.57.0

func NewConnectorV1ConnectionService(opts ...option.RequestOption) (r *ConnectorV1ConnectionService)

NewConnectorV1ConnectionService 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 (*ConnectorV1ConnectionService) Browse added in v0.57.0

Browse the provider one level at a time. Without a site, container, or parent, returns top-level resources. Pass the stable browse_ref fields returned by one response to navigate into the next level. Returns 403 provider_scope_insufficient when the connection scope cannot browse server-side.

func (*ConnectorV1ConnectionService) Delete added in v0.57.0

Unlink a provider account: revoke tokens at the provider and delete them. purge=true additionally deletes the vault documents its import links brought in.

func (*ConnectorV1ConnectionService) Get added in v0.57.0

Retrieve one provider connection, including account identity and health.

func (*ConnectorV1ConnectionService) List added in v0.57.0

List provider connections for the organization, with health status.

func (*ConnectorV1ConnectionService) New added in v0.57.0

Create a pending provider connection and return a one-time connect_url for the hosted OAuth flow. The user completes provider consent at connect_url and is redirected to return_url with ?connection_id=.

type ConnectorV1InstallationEnsureParams added in v0.57.0

type ConnectorV1InstallationEnsureParams struct {
	// Consuming application key (e.g. "p3").
	Application param.Field[string] `json:"application" api:"required"`
	// The application's own tenant identifier (e.g. a P3 organization id).
	ExternalTenantID param.Field[string] `json:"external_tenant_id" api:"required"`
}

func (ConnectorV1InstallationEnsureParams) MarshalJSON added in v0.57.0

func (r ConnectorV1InstallationEnsureParams) MarshalJSON() (data []byte, err error)

type ConnectorV1InstallationListParams added in v0.57.0

type ConnectorV1InstallationListParams struct {
	Application      param.Field[string] `query:"application"`
	ExternalTenantID param.Field[string] `query:"external_tenant_id"`
}

func (ConnectorV1InstallationListParams) URLQuery added in v0.57.0

func (r ConnectorV1InstallationListParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1InstallationListParams's query parameters as `url.Values`.

type ConnectorV1InstallationService added in v0.57.0

type ConnectorV1InstallationService struct {
	Options []option.RequestOption
	// Import and export between provider folders (Google Drive) and vaults
	Vaults *ConnectorV1InstallationVaultService
}

Import and export between provider folders (Google Drive) and vaults

ConnectorV1InstallationService 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 NewConnectorV1InstallationService method instead.

func NewConnectorV1InstallationService added in v0.57.0

func NewConnectorV1InstallationService(opts ...option.RequestOption) (r *ConnectorV1InstallationService)

NewConnectorV1InstallationService 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 (*ConnectorV1InstallationService) Ensure added in v0.57.0

Idempotently create (or return) the installation for (application, external_tenant_id) in this organization. Send the returned installation id as X-Case-Installation-Id on connector requests to scope them to this tenant.

func (*ConnectorV1InstallationService) List added in v0.57.0

List application installations (tenants) in this organization.

type ConnectorV1InstallationVaultGrantParams added in v0.57.0

type ConnectorV1InstallationVaultGrantParams struct {
	CanManage    param.Field[bool]                                                `json:"can_manage"`
	CanRead      param.Field[bool]                                                `json:"can_read"`
	CanWrite     param.Field[bool]                                                `json:"can_write"`
	Relationship param.Field[ConnectorV1InstallationVaultGrantParamsRelationship] `json:"relationship"`
	Source       param.Field[ConnectorV1InstallationVaultGrantParamsSource]       `json:"source"`
}

func (ConnectorV1InstallationVaultGrantParams) MarshalJSON added in v0.57.0

func (r ConnectorV1InstallationVaultGrantParams) MarshalJSON() (data []byte, err error)

type ConnectorV1InstallationVaultGrantParamsRelationship added in v0.57.0

type ConnectorV1InstallationVaultGrantParamsRelationship string
const (
	ConnectorV1InstallationVaultGrantParamsRelationshipOwned  ConnectorV1InstallationVaultGrantParamsRelationship = "owned"
	ConnectorV1InstallationVaultGrantParamsRelationshipShared ConnectorV1InstallationVaultGrantParamsRelationship = "shared"
)

func (ConnectorV1InstallationVaultGrantParamsRelationship) IsKnown added in v0.57.0

type ConnectorV1InstallationVaultGrantParamsSource added in v0.57.0

type ConnectorV1InstallationVaultGrantParamsSource string
const (
	ConnectorV1InstallationVaultGrantParamsSourceProvisioning  ConnectorV1InstallationVaultGrantParamsSource = "provisioning"
	ConnectorV1InstallationVaultGrantParamsSourceLazyReconcile ConnectorV1InstallationVaultGrantParamsSource = "lazy_reconcile"
	ConnectorV1InstallationVaultGrantParamsSourceExplicitShare ConnectorV1InstallationVaultGrantParamsSource = "explicit_share"
)

func (ConnectorV1InstallationVaultGrantParamsSource) IsKnown added in v0.57.0

type ConnectorV1InstallationVaultService added in v0.57.0

type ConnectorV1InstallationVaultService struct {
	Options []option.RequestOption
}

Import and export between provider folders (Google Drive) and vaults

ConnectorV1InstallationVaultService 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 NewConnectorV1InstallationVaultService method instead.

func NewConnectorV1InstallationVaultService added in v0.57.0

func NewConnectorV1InstallationVaultService(opts ...option.RequestOption) (r *ConnectorV1InstallationVaultService)

NewConnectorV1InstallationVaultService 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 (*ConnectorV1InstallationVaultService) Grant added in v0.57.0

Grant (or update) an installation's access to a vault. Re-granting a revoked vault reactivates it. Import links need can_write; export links need can_read; mirror deletion and purge need can_manage.

func (*ConnectorV1InstallationVaultService) List added in v0.57.0

List the vaults an installation may use, with capabilities and revocation state.

func (*ConnectorV1InstallationVaultService) Revoke added in v0.57.0

func (r *ConnectorV1InstallationVaultService) Revoke(ctx context.Context, id string, vaultID string, opts ...option.RequestOption) (err error)

Revoke an installation's access to a vault. Links using the vault pause at their next run; nothing is deleted.

type ConnectorV1LinkDeleteParams added in v0.57.0

type ConnectorV1LinkDeleteParams struct {
	VaultDocs param.Field[ConnectorV1LinkDeleteParamsVaultDocs] `query:"vault_docs"`
}

func (ConnectorV1LinkDeleteParams) URLQuery added in v0.57.0

func (r ConnectorV1LinkDeleteParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1LinkDeleteParams's query parameters as `url.Values`.

type ConnectorV1LinkDeleteParamsVaultDocs added in v0.57.0

type ConnectorV1LinkDeleteParamsVaultDocs string
const (
	ConnectorV1LinkDeleteParamsVaultDocsKeep   ConnectorV1LinkDeleteParamsVaultDocs = "keep"
	ConnectorV1LinkDeleteParamsVaultDocsDelete ConnectorV1LinkDeleteParamsVaultDocs = "delete"
)

func (ConnectorV1LinkDeleteParamsVaultDocs) IsKnown added in v0.57.0

type ConnectorV1LinkListObjectsParams added in v0.57.0

type ConnectorV1LinkListObjectsParams struct {
	Cursor param.Field[string]                                `query:"cursor"`
	State  param.Field[ConnectorV1LinkListObjectsParamsState] `query:"state"`
}

func (ConnectorV1LinkListObjectsParams) URLQuery added in v0.57.0

func (r ConnectorV1LinkListObjectsParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1LinkListObjectsParams's query parameters as `url.Values`.

type ConnectorV1LinkListObjectsParamsState added in v0.57.0

type ConnectorV1LinkListObjectsParamsState string
const (
	ConnectorV1LinkListObjectsParamsStatePending      ConnectorV1LinkListObjectsParamsState = "pending"
	ConnectorV1LinkListObjectsParamsStateTransferring ConnectorV1LinkListObjectsParamsState = "transferring"
	ConnectorV1LinkListObjectsParamsStateIngesting    ConnectorV1LinkListObjectsParamsState = "ingesting"
	ConnectorV1LinkListObjectsParamsStateSynced       ConnectorV1LinkListObjectsParamsState = "synced"
	ConnectorV1LinkListObjectsParamsStateSkipped      ConnectorV1LinkListObjectsParamsState = "skipped"
	ConnectorV1LinkListObjectsParamsStateFailed       ConnectorV1LinkListObjectsParamsState = "failed"
	ConnectorV1LinkListObjectsParamsStateTombstoned   ConnectorV1LinkListObjectsParamsState = "tombstoned"
)

func (ConnectorV1LinkListObjectsParamsState) IsKnown added in v0.57.0

type ConnectorV1LinkListParams added in v0.57.0

type ConnectorV1LinkListParams struct {
	ConnectionID param.Field[string]                             `query:"connection_id"`
	Direction    param.Field[ConnectorV1LinkListParamsDirection] `query:"direction"`
	Mode         param.Field[ConnectorV1LinkListParamsMode]      `query:"mode"`
	PairID       param.Field[string]                             `query:"pair_id"`
	State        param.Field[ConnectorV1LinkListParamsState]     `query:"state"`
	VaultID      param.Field[string]                             `query:"vault_id"`
}

func (ConnectorV1LinkListParams) URLQuery added in v0.57.0

func (r ConnectorV1LinkListParams) URLQuery() (v url.Values)

URLQuery serializes ConnectorV1LinkListParams's query parameters as `url.Values`.

type ConnectorV1LinkListParamsDirection added in v0.57.0

type ConnectorV1LinkListParamsDirection string
const (
	ConnectorV1LinkListParamsDirectionImport ConnectorV1LinkListParamsDirection = "import"
	ConnectorV1LinkListParamsDirectionExport ConnectorV1LinkListParamsDirection = "export"
)

func (ConnectorV1LinkListParamsDirection) IsKnown added in v0.57.0

type ConnectorV1LinkListParamsMode added in v0.57.0

type ConnectorV1LinkListParamsMode string
const (
	ConnectorV1LinkListParamsModeOnce   ConnectorV1LinkListParamsMode = "once"
	ConnectorV1LinkListParamsModeSynced ConnectorV1LinkListParamsMode = "synced"
)

func (ConnectorV1LinkListParamsMode) IsKnown added in v0.57.0

func (r ConnectorV1LinkListParamsMode) IsKnown() bool

type ConnectorV1LinkListParamsState added in v0.57.0

type ConnectorV1LinkListParamsState string
const (
	ConnectorV1LinkListParamsStateReady    ConnectorV1LinkListParamsState = "ready"
	ConnectorV1LinkListParamsStateRunning  ConnectorV1LinkListParamsState = "running"
	ConnectorV1LinkListParamsStateActive   ConnectorV1LinkListParamsState = "active"
	ConnectorV1LinkListParamsStatePaused   ConnectorV1LinkListParamsState = "paused"
	ConnectorV1LinkListParamsStateOrphaned ConnectorV1LinkListParamsState = "orphaned"
	ConnectorV1LinkListParamsStateError    ConnectorV1LinkListParamsState = "error"
)

func (ConnectorV1LinkListParamsState) IsKnown added in v0.57.0

type ConnectorV1LinkService added in v0.57.0

type ConnectorV1LinkService struct {
	Options []option.RequestOption
}

Import and export between provider folders (Google Drive) and vaults

ConnectorV1LinkService 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 NewConnectorV1LinkService method instead.

func NewConnectorV1LinkService added in v0.57.0

func NewConnectorV1LinkService(opts ...option.RequestOption) (r *ConnectorV1LinkService)

NewConnectorV1LinkService 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 (*ConnectorV1LinkService) Delete added in v0.57.0

Delete a link and its ledger. vault_docs=delete additionally removes the vault documents an import link brought in (default: keep).

func (*ConnectorV1LinkService) Get added in v0.57.0

func (r *ConnectorV1LinkService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Retrieve one link: state, counts, and embedded active_run/last_run. Poll this after POST /transfer.

func (*ConnectorV1LinkService) List added in v0.57.0

List transfer links, filterable by vault, connection, direction, mode, and state.

func (*ConnectorV1LinkService) ListObjects added in v0.57.0

Per-file transfer ledger for a link: provider item, vault object, path, content version, state, and error.

func (*ConnectorV1LinkService) Update added in v0.57.0

Pause/resume a link (state "paused" | "ready"), change its mode (synced -> once is the sync downgrade), or edit its policy in place.

type ConnectorV1LinkUpdateParams added in v0.57.0

type ConnectorV1LinkUpdateParams struct {
	Mode   param.Field[ConnectorV1LinkUpdateParamsMode]  `json:"mode"`
	Policy param.Field[interface{}]                      `json:"policy"`
	State  param.Field[ConnectorV1LinkUpdateParamsState] `json:"state"`
}

func (ConnectorV1LinkUpdateParams) MarshalJSON added in v0.57.0

func (r ConnectorV1LinkUpdateParams) MarshalJSON() (data []byte, err error)

type ConnectorV1LinkUpdateParamsMode added in v0.57.0

type ConnectorV1LinkUpdateParamsMode string
const (
	ConnectorV1LinkUpdateParamsModeOnce   ConnectorV1LinkUpdateParamsMode = "once"
	ConnectorV1LinkUpdateParamsModeSynced ConnectorV1LinkUpdateParamsMode = "synced"
)

func (ConnectorV1LinkUpdateParamsMode) IsKnown added in v0.57.0

type ConnectorV1LinkUpdateParamsState added in v0.57.0

type ConnectorV1LinkUpdateParamsState string
const (
	ConnectorV1LinkUpdateParamsStatePaused ConnectorV1LinkUpdateParamsState = "paused"
	ConnectorV1LinkUpdateParamsStateReady  ConnectorV1LinkUpdateParamsState = "ready"
)

func (ConnectorV1LinkUpdateParamsState) IsKnown added in v0.57.0

type ConnectorV1Service added in v0.57.0

type ConnectorV1Service struct {
	Options []option.RequestOption
	// Import and export between provider folders (Google Drive) and vaults
	Installations *ConnectorV1InstallationService
	// Import and export between provider folders (Google Drive) and vaults
	Connections *ConnectorV1ConnectionService
	// Import and export between provider folders (Google Drive) and vaults
	Links *ConnectorV1LinkService
}

Import and export between provider folders (Google Drive) and vaults

ConnectorV1Service 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 NewConnectorV1Service method instead.

func NewConnectorV1Service added in v0.57.0

func NewConnectorV1Service(opts ...option.RequestOption) (r *ConnectorV1Service)

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

Standing promise: backfill now, then stay current (the sync sweeper re-runs synced links on a schedule). Same body as /transfer minus run_mode. Upserts the link identified by (connection_id, direction, remote, vault_id); an existing once-link is upgraded in place with its ledger and cursor preserved. Downgrade or pause via PATCH /links/{id}.

func (*ConnectorV1Service) Transfer added in v0.57.0

One-shot import (provider folder → vault) or export (vault → provider folder). Upserts the link identified by (connection_id, direction, remote, vault_id): first call backfills, later calls move only new/changed files via the ledger. Poll GET /links/{id} → active_run for progress.

type ConnectorV1SyncLinkParams added in v0.57.0

type ConnectorV1SyncLinkParams struct {
	ConnectionID param.Field[string]                             `json:"connection_id" api:"required"`
	Direction    param.Field[ConnectorV1SyncLinkParamsDirection] `json:"direction" api:"required"`
	Remote       param.Field[ConnectorV1SyncLinkParamsRemote]    `json:"remote" api:"required"`
	VaultID      param.Field[string]                             `json:"vault_id" api:"required"`
	MatterID     param.Field[string]                             `json:"matter_id"`
	Policy       param.Field[ConnectorV1SyncLinkParamsPolicy]    `json:"policy"`
}

func (ConnectorV1SyncLinkParams) MarshalJSON added in v0.57.0

func (r ConnectorV1SyncLinkParams) MarshalJSON() (data []byte, err error)

type ConnectorV1SyncLinkParamsDirection added in v0.57.0

type ConnectorV1SyncLinkParamsDirection string
const (
	ConnectorV1SyncLinkParamsDirectionImport ConnectorV1SyncLinkParamsDirection = "import"
	ConnectorV1SyncLinkParamsDirectionExport ConnectorV1SyncLinkParamsDirection = "export"
)

func (ConnectorV1SyncLinkParamsDirection) IsKnown added in v0.57.0

type ConnectorV1SyncLinkParamsPolicy added in v0.57.0

type ConnectorV1SyncLinkParamsPolicy struct {
	Collisions param.Field[ConnectorV1SyncLinkParamsPolicyCollisions] `json:"collisions"`
	Deletes    param.Field[ConnectorV1SyncLinkParamsPolicyDeletes]    `json:"deletes"`
	Filters    param.Field[ConnectorV1SyncLinkParamsPolicyFilters]    `json:"filters"`
}

func (ConnectorV1SyncLinkParamsPolicy) MarshalJSON added in v0.57.0

func (r ConnectorV1SyncLinkParamsPolicy) MarshalJSON() (data []byte, err error)

type ConnectorV1SyncLinkParamsPolicyCollisions added in v0.57.0

type ConnectorV1SyncLinkParamsPolicyCollisions string
const (
	ConnectorV1SyncLinkParamsPolicyCollisionsVersion   ConnectorV1SyncLinkParamsPolicyCollisions = "version"
	ConnectorV1SyncLinkParamsPolicyCollisionsOverwrite ConnectorV1SyncLinkParamsPolicyCollisions = "overwrite"
	ConnectorV1SyncLinkParamsPolicyCollisionsSkip      ConnectorV1SyncLinkParamsPolicyCollisions = "skip"
)

func (ConnectorV1SyncLinkParamsPolicyCollisions) IsKnown added in v0.57.0

type ConnectorV1SyncLinkParamsPolicyDeletes added in v0.57.0

type ConnectorV1SyncLinkParamsPolicyDeletes string
const (
	ConnectorV1SyncLinkParamsPolicyDeletesMirror   ConnectorV1SyncLinkParamsPolicyDeletes = "mirror"
	ConnectorV1SyncLinkParamsPolicyDeletesPreserve ConnectorV1SyncLinkParamsPolicyDeletes = "preserve"
)

func (ConnectorV1SyncLinkParamsPolicyDeletes) IsKnown added in v0.57.0

type ConnectorV1SyncLinkParamsPolicyFilters added in v0.57.0

type ConnectorV1SyncLinkParamsPolicyFilters struct {
	ExcludeMime  param.Field[[]string] `json:"exclude_mime"`
	MaxSizeBytes param.Field[int64]    `json:"max_size_bytes"`
}

func (ConnectorV1SyncLinkParamsPolicyFilters) MarshalJSON added in v0.57.0

func (r ConnectorV1SyncLinkParamsPolicyFilters) MarshalJSON() (data []byte, err error)

type ConnectorV1SyncLinkParamsRemote added in v0.57.0

type ConnectorV1SyncLinkParamsRemote struct {
	FolderID    param.Field[string] `json:"folder_id" api:"required"`
	ContainerID param.Field[string] `json:"container_id"`
	Path        param.Field[string] `json:"path"`
	SiteID      param.Field[string] `json:"site_id"`
}

func (ConnectorV1SyncLinkParamsRemote) MarshalJSON added in v0.57.0

func (r ConnectorV1SyncLinkParamsRemote) MarshalJSON() (data []byte, err error)

type ConnectorV1SyncLinkResponse added in v0.57.0

type ConnectorV1SyncLinkResponse struct {
	Links []interface{}                   `json:"links"`
	JSON  connectorV1SyncLinkResponseJSON `json:"-"`
}

func (*ConnectorV1SyncLinkResponse) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1SyncLinkResponse) UnmarshalJSON(data []byte) (err error)

type ConnectorV1TransferParams added in v0.57.0

type ConnectorV1TransferParams struct {
	ConnectionID param.Field[string]                             `json:"connection_id" api:"required"`
	Direction    param.Field[ConnectorV1TransferParamsDirection] `json:"direction" api:"required"`
	Remote       param.Field[ConnectorV1TransferParamsRemote]    `json:"remote" api:"required"`
	VaultID      param.Field[string]                             `json:"vault_id" api:"required"`
	MatterID     param.Field[string]                             `json:"matter_id"`
	Policy       param.Field[ConnectorV1TransferParamsPolicy]    `json:"policy"`
	RunMode      param.Field[ConnectorV1TransferParamsRunMode]   `json:"run_mode"`
}

func (ConnectorV1TransferParams) MarshalJSON added in v0.57.0

func (r ConnectorV1TransferParams) MarshalJSON() (data []byte, err error)

type ConnectorV1TransferParamsDirection added in v0.57.0

type ConnectorV1TransferParamsDirection string
const (
	ConnectorV1TransferParamsDirectionImport ConnectorV1TransferParamsDirection = "import"
	ConnectorV1TransferParamsDirectionExport ConnectorV1TransferParamsDirection = "export"
)

func (ConnectorV1TransferParamsDirection) IsKnown added in v0.57.0

type ConnectorV1TransferParamsPolicy added in v0.57.0

type ConnectorV1TransferParamsPolicy struct {
	Collisions param.Field[ConnectorV1TransferParamsPolicyCollisions] `json:"collisions"`
	Deletes    param.Field[ConnectorV1TransferParamsPolicyDeletes]    `json:"deletes"`
	Filters    param.Field[ConnectorV1TransferParamsPolicyFilters]    `json:"filters"`
}

func (ConnectorV1TransferParamsPolicy) MarshalJSON added in v0.57.0

func (r ConnectorV1TransferParamsPolicy) MarshalJSON() (data []byte, err error)

type ConnectorV1TransferParamsPolicyCollisions added in v0.57.0

type ConnectorV1TransferParamsPolicyCollisions string
const (
	ConnectorV1TransferParamsPolicyCollisionsVersion   ConnectorV1TransferParamsPolicyCollisions = "version"
	ConnectorV1TransferParamsPolicyCollisionsOverwrite ConnectorV1TransferParamsPolicyCollisions = "overwrite"
	ConnectorV1TransferParamsPolicyCollisionsSkip      ConnectorV1TransferParamsPolicyCollisions = "skip"
)

func (ConnectorV1TransferParamsPolicyCollisions) IsKnown added in v0.57.0

type ConnectorV1TransferParamsPolicyDeletes added in v0.57.0

type ConnectorV1TransferParamsPolicyDeletes string
const (
	ConnectorV1TransferParamsPolicyDeletesMirror   ConnectorV1TransferParamsPolicyDeletes = "mirror"
	ConnectorV1TransferParamsPolicyDeletesPreserve ConnectorV1TransferParamsPolicyDeletes = "preserve"
)

func (ConnectorV1TransferParamsPolicyDeletes) IsKnown added in v0.57.0

type ConnectorV1TransferParamsPolicyFilters added in v0.57.0

type ConnectorV1TransferParamsPolicyFilters struct {
	ExcludeMime  param.Field[[]string] `json:"exclude_mime"`
	MaxSizeBytes param.Field[int64]    `json:"max_size_bytes"`
}

func (ConnectorV1TransferParamsPolicyFilters) MarshalJSON added in v0.57.0

func (r ConnectorV1TransferParamsPolicyFilters) MarshalJSON() (data []byte, err error)

type ConnectorV1TransferParamsRemote added in v0.57.0

type ConnectorV1TransferParamsRemote struct {
	FolderID    param.Field[string] `json:"folder_id" api:"required"`
	ContainerID param.Field[string] `json:"container_id"`
	Path        param.Field[string] `json:"path"`
	SiteID      param.Field[string] `json:"site_id"`
}

func (ConnectorV1TransferParamsRemote) MarshalJSON added in v0.57.0

func (r ConnectorV1TransferParamsRemote) MarshalJSON() (data []byte, err error)

type ConnectorV1TransferParamsRunMode added in v0.57.0

type ConnectorV1TransferParamsRunMode string
const (
	ConnectorV1TransferParamsRunModeAuto          ConnectorV1TransferParamsRunMode = "auto"
	ConnectorV1TransferParamsRunModeFullReconcile ConnectorV1TransferParamsRunMode = "full_reconcile"
)

func (ConnectorV1TransferParamsRunMode) IsKnown added in v0.57.0

type ConnectorV1TransferResponse added in v0.57.0

type ConnectorV1TransferResponse struct {
	Links []interface{}                   `json:"links"`
	JSON  connectorV1TransferResponseJSON `json:"-"`
}

func (*ConnectorV1TransferResponse) UnmarshalJSON added in v0.57.0

func (r *ConnectorV1TransferResponse) UnmarshalJSON(data []byte) (err error)

type DocketDetail added in v0.8.0

type DocketDetail struct {
	ID             string           `json:"id"`
	AssignedTo     string           `json:"assignedTo" api:"nullable"`
	CaseName       string           `json:"caseName" api:"nullable"`
	Cause          string           `json:"cause" api:"nullable"`
	Court          string           `json:"court" api:"nullable"`
	CourtID        string           `json:"courtId" api:"nullable"`
	DateFiled      time.Time        `json:"dateFiled" api:"nullable" format:"date"`
	DateTerminated time.Time        `json:"dateTerminated" api:"nullable" format:"date"`
	DocketNumber   string           `json:"docketNumber" api:"nullable"`
	NatureOfSuit   string           `json:"natureOfSuit" api:"nullable"`
	PacerCaseID    string           `json:"pacerCaseId" api:"nullable"`
	Parties        []string         `json:"parties"`
	URL            string           `json:"url"`
	JSON           docketDetailJSON `json:"-"`
}

Full docket record (lookup mode)

func (*DocketDetail) UnmarshalJSON added in v0.8.0

func (r *DocketDetail) UnmarshalJSON(data []byte) (err error)

type DocketSearchResult added in v0.8.0

type DocketSearchResult struct {
	ID             string                 `json:"id"`
	AssignedTo     string                 `json:"assignedTo" api:"nullable"`
	CaseName       string                 `json:"caseName" api:"nullable"`
	Cause          string                 `json:"cause" api:"nullable"`
	Court          string                 `json:"court" api:"nullable"`
	CourtID        string                 `json:"courtId" api:"nullable"`
	DateFiled      time.Time              `json:"dateFiled" api:"nullable" format:"date"`
	DateTerminated time.Time              `json:"dateTerminated" api:"nullable" format:"date"`
	DocketNumber   string                 `json:"docketNumber" api:"nullable"`
	NatureOfSuit   string                 `json:"natureOfSuit" api:"nullable"`
	PacerCaseID    string                 `json:"pacerCaseId" api:"nullable"`
	Parties        []string               `json:"parties"`
	URL            string                 `json:"url"`
	JSON           docketSearchResultJSON `json:"-"`
}

func (*DocketSearchResult) UnmarshalJSON added in v0.8.0

func (r *DocketSearchResult) UnmarshalJSON(data []byte) (err error)

type Error

type Error = apierror.Error

type LegalService

type LegalService struct {
	Options []option.RequestOption
	// Legal research tools including citation verification
	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 LegalV1DocketParams added in v0.5.0

type LegalV1DocketParams struct {
	// Search dockets or look up a docket by ID
	Type param.Field[LegalV1DocketParamsType] `json:"type" api:"required"`
	// Required when live: true. Acknowledges that PACER fees (up to $3.00 per docket)
	// plus a $0.05 service fee will be charged to your account.
	AcknowledgePacerFees param.Field[bool] `json:"acknowledgePacerFees"`
	// Optional court slug for filtering (e.g. "nysd", "ca9", "cafc"). Use
	// legal.listCourts() to find slugs.
	Court param.Field[string] `json:"court"`
	// Optional lower bound for filing date (YYYY-MM-DD)
	DateFiledAfter param.Field[time.Time] `json:"dateFiledAfter" format:"date"`
	// Optional upper bound for filing date (YYYY-MM-DD)
	DateFiledBefore param.Field[time.Time] `json:"dateFiledBefore" format:"date"`
	// Docket ID (required for lookup)
	DocketID param.Field[string] `json:"docketId"`
	// Include docket entries/filings in lookup responses.
	IncludeEntries param.Field[bool] `json:"includeEntries"`
	// Page size for search results or entry list (default 25 for search, 50 for
	// lookup)
	Limit param.Field[int64] `json:"limit"`
	// Trigger a live PACER fetch for dockets not yet in the RECAP archive. Requires
	// acknowledgePacerFees: true. PACER charges up to $3.00 per docket sheet plus a
	// $0.05 service fee. Only valid with type: "lookup".
	Live param.Field[bool] `json:"live"`
	// Offset for search results or entry list (maximum 200 when including lookup
	// entries)
	Offset param.Field[int64] `json:"offset"`
	// Case name or party name search query (required for search)
	Query param.Field[string] `json:"query"`
}

func (LegalV1DocketParams) MarshalJSON added in v0.5.0

func (r LegalV1DocketParams) MarshalJSON() (data []byte, err error)

type LegalV1DocketParamsType added in v0.5.0

type LegalV1DocketParamsType string

Search dockets or look up a docket by ID

const (
	LegalV1DocketParamsTypeSearch LegalV1DocketParamsType = "search"
	LegalV1DocketParamsTypeLookup LegalV1DocketParamsType = "lookup"
)

func (LegalV1DocketParamsType) IsKnown added in v0.5.0

func (r LegalV1DocketParamsType) IsKnown() bool

type LegalV1DocketResponse added in v0.5.0

type LegalV1DocketResponse struct {
	// Echo of court filter (search mode only)
	Court string `json:"court" api:"nullable"`
	// Echo of date filter
	DateFiledAfter time.Time `json:"dateFiledAfter" api:"nullable" format:"date"`
	// Echo of date filter
	DateFiledBefore time.Time `json:"dateFiledBefore" api:"nullable" format:"date"`
	// Full docket record (lookup mode)
	Docket DocketDetail `json:"docket" api:"nullable"`
	// Search results (search mode)
	Dockets []DocketSearchResult `json:"dockets"`
	// Docket entries/filings (lookup mode with includeEntries)
	Entries []LegalV1DocketResponseEntry `json:"entries" api:"nullable"`
	Found   int64                        `json:"found"`
	// Whether entries were requested (lookup mode only)
	IncludeEntries bool `json:"includeEntries"`
	// Whether this was a live PACER fetch (lookup mode only)
	Live bool `json:"live"`
	// PACER fee information (present when live: true)
	PacerFees LegalV1DocketResponsePacerFees `json:"pacerFees" api:"nullable"`
	// Pagination info for entry list (lookup mode with includeEntries)
	Pagination LegalV1DocketResponsePagination `json:"pagination" api:"nullable"`
	// Echo of search query (search mode only)
	Query string                    `json:"query" api:"nullable"`
	Type  LegalV1DocketResponseType `json:"type"`
	JSON  legalV1DocketResponseJSON `json:"-"`
}

func (*LegalV1DocketResponse) UnmarshalJSON added in v0.5.0

func (r *LegalV1DocketResponse) UnmarshalJSON(data []byte) (err error)

type LegalV1DocketResponseEntriesDocument added in v0.5.0

type LegalV1DocketResponseEntriesDocument struct {
	ID               string                                   `json:"id"`
	AttachmentNumber int64                                    `json:"attachmentNumber" api:"nullable"`
	Description      string                                   `json:"description" api:"nullable"`
	DocumentNumber   string                                   `json:"documentNumber" api:"nullable"`
	IsAvailable      bool                                     `json:"isAvailable"`
	PageCount        int64                                    `json:"pageCount" api:"nullable"`
	PdfURL           string                                   `json:"pdfUrl" api:"nullable"`
	JSON             legalV1DocketResponseEntriesDocumentJSON `json:"-"`
}

func (*LegalV1DocketResponseEntriesDocument) UnmarshalJSON added in v0.5.0

func (r *LegalV1DocketResponseEntriesDocument) UnmarshalJSON(data []byte) (err error)

type LegalV1DocketResponseEntry added in v0.5.0

type LegalV1DocketResponseEntry struct {
	Date        time.Time                              `json:"date" api:"nullable" format:"date"`
	Description string                                 `json:"description" api:"nullable"`
	Documents   []LegalV1DocketResponseEntriesDocument `json:"documents"`
	EntryNumber int64                                  `json:"entryNumber" api:"nullable"`
	JSON        legalV1DocketResponseEntryJSON         `json:"-"`
}

func (*LegalV1DocketResponseEntry) UnmarshalJSON added in v0.5.0

func (r *LegalV1DocketResponseEntry) UnmarshalJSON(data []byte) (err error)

type LegalV1DocketResponsePacerFees added in v0.15.0

type LegalV1DocketResponsePacerFees struct {
	Currency LegalV1DocketResponsePacerFeesCurrency `json:"currency"`
	// Time taken for PACER fetch in milliseconds
	FetchDurationMs int64 `json:"fetchDurationMs"`
	// Maximum PACER charge per docket in USD
	MaxPacerCost float64 `json:"maxPacerCost"`
	// CaseMark service fee in USD
	ServiceFee float64                            `json:"serviceFee"`
	JSON       legalV1DocketResponsePacerFeesJSON `json:"-"`
}

PACER fee information (present when live: true)

func (*LegalV1DocketResponsePacerFees) UnmarshalJSON added in v0.15.0

func (r *LegalV1DocketResponsePacerFees) UnmarshalJSON(data []byte) (err error)

type LegalV1DocketResponsePacerFeesCurrency added in v0.15.0

type LegalV1DocketResponsePacerFeesCurrency string
const (
	LegalV1DocketResponsePacerFeesCurrencyUsd LegalV1DocketResponsePacerFeesCurrency = "USD"
)

func (LegalV1DocketResponsePacerFeesCurrency) IsKnown added in v0.15.0

type LegalV1DocketResponsePagination added in v0.5.0

type LegalV1DocketResponsePagination struct {
	Limit    int64                               `json:"limit"`
	Offset   int64                               `json:"offset"`
	Returned int64                               `json:"returned"`
	JSON     legalV1DocketResponsePaginationJSON `json:"-"`
}

Pagination info for entry list (lookup mode with includeEntries)

func (*LegalV1DocketResponsePagination) UnmarshalJSON added in v0.5.0

func (r *LegalV1DocketResponsePagination) UnmarshalJSON(data []byte) (err error)

type LegalV1DocketResponseType added in v0.5.0

type LegalV1DocketResponseType string
const (
	LegalV1DocketResponseTypeSearch LegalV1DocketResponseType = "search"
	LegalV1DocketResponseTypeLookup LegalV1DocketResponseType = "lookup"
)

func (LegalV1DocketResponseType) IsKnown added in v0.5.0

func (r LegalV1DocketResponseType) IsKnown() bool

type LegalV1FindParams

type LegalV1FindParams struct {
	// Search query (e.g., "fair use copyright", "Miranda rights")
	Query param.Field[string] `json:"query" api:"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" api:"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" api:"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" api:"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" api:"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" api:"nullable"`
	// Total characters in text
	CharacterCount int64 `json:"characterCount"`
	// Highlighted relevant passages
	Highlights []string `json:"highlights"`
	// Publication date
	PublishedDate string `json:"publishedDate" api:"nullable"`
	// AI-generated summary
	Summary string `json:"summary" api:"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 LegalV1ListCourtsParams added in v0.5.0

type LegalV1ListCourtsParams struct {
	// Only return courts with available docket data
	InUseOnly param.Field[bool] `json:"inUseOnly"`
	// Optional jurisdiction code filter (e.g. FD for Federal District, F for all
	// Federal, S for State)
	Jurisdiction param.Field[string] `json:"jurisdiction"`
	// Maximum number of courts to return
	Limit param.Field[int64] `json:"limit"`
	// Number of courts to skip before returning results
	Offset param.Field[int64] `json:"offset"`
	// Search by court name or slug (e.g. "Northern District", "nysd", "ca9")
	Query param.Field[string] `json:"query"`
}

func (LegalV1ListCourtsParams) MarshalJSON added in v0.5.0

func (r LegalV1ListCourtsParams) MarshalJSON() (data []byte, err error)

type LegalV1ListCourtsResponse added in v0.5.0

type LegalV1ListCourtsResponse struct {
	Courts []LegalV1ListCourtsResponseCourt `json:"courts"`
	Found  int64                            `json:"found"`
	// Whether results are filtered to in-use courts only
	InUseOnly    bool                          `json:"inUseOnly"`
	Jurisdiction string                        `json:"jurisdiction" api:"nullable"`
	Query        string                        `json:"query" api:"nullable"`
	JSON         legalV1ListCourtsResponseJSON `json:"-"`
}

func (*LegalV1ListCourtsResponse) UnmarshalJSON added in v0.5.0

func (r *LegalV1ListCourtsResponse) UnmarshalJSON(data []byte) (err error)

type LegalV1ListCourtsResponseCourt added in v0.5.0

type LegalV1ListCourtsResponseCourt struct {
	// Court slug (use as the court parameter in legal.docket())
	ID           string                             `json:"id"`
	FullName     string                             `json:"fullName" api:"nullable"`
	Jurisdiction string                             `json:"jurisdiction" api:"nullable"`
	PacerCourtID int64                              `json:"pacerCourtId" api:"nullable"`
	ShortName    string                             `json:"shortName" api:"nullable"`
	JSON         legalV1ListCourtsResponseCourtJSON `json:"-"`
}

func (*LegalV1ListCourtsResponseCourt) UnmarshalJSON added in v0.5.0

func (r *LegalV1ListCourtsResponseCourt) UnmarshalJSON(data []byte) (err error)

type LegalV1ListJurisdictionsParams

type LegalV1ListJurisdictionsParams struct {
	// Jurisdiction name (e.g., "California", "US Federal", "NY")
	Name param.Field[string] `json:"name" api:"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" api:"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

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" api:"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

type LegalV1PatentSearchParamsSortBy

type LegalV1PatentSearchParamsSortBy string

Field to sort results by

const (
	LegalV1PatentSearchParamsSortByFilingDate LegalV1PatentSearchParamsSortBy = "filingDate"
	LegalV1PatentSearchParamsSortByGrantDate  LegalV1PatentSearchParamsSortBy = "grantDate"
)

func (LegalV1PatentSearchParamsSortBy) IsKnown

type LegalV1PatentSearchParamsSortOrder

type LegalV1PatentSearchParamsSortOrder string

Sort order (default desc, newest first)

const (
	LegalV1PatentSearchParamsSortOrderAsc  LegalV1PatentSearchParamsSortOrder = "asc"
	LegalV1PatentSearchParamsSortOrderDesc LegalV1PatentSearchParamsSortOrder = "desc"
)

func (LegalV1PatentSearchParamsSortOrder) IsKnown

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" api:"nullable"`
	// Date the application was filed
	FilingDate time.Time `json:"filingDate" api:"nullable" format:"date"`
	// Date the patent was granted
	GrantDate time.Time `json:"grantDate" api:"nullable" format:"date"`
	// List of inventor names
	Inventors []string `json:"inventors"`
	// Granted patent number (if granted)
	PatentNumber string `json:"patentNumber" api:"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" api:"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" api:"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" api:"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 LegalV1SecFilingParams added in v0.19.0

type LegalV1SecFilingParams struct {
	// Run a full-text search or fetch a single entity filing history
	Type param.Field[LegalV1SecFilingParamsType] `json:"type" api:"required"`
	// CIK for entity lookups. Accepts padded or unpadded digits.
	Cik param.Field[string] `json:"cik"`
	// Optional lower filing date bound (YYYY-MM-DD)
	DateAfter param.Field[time.Time] `json:"dateAfter" format:"date"`
	// Optional upper filing date bound (YYYY-MM-DD)
	DateBefore param.Field[time.Time] `json:"dateBefore" format:"date"`
	// Optional entity filter passed through to EDGAR full-text search
	Entity param.Field[string] `json:"entity"`
	// Optional SEC form type filter such as 10-K, 10-Q, 8-K, or 4
	FormTypes param.Field[[]string] `json:"formTypes"`
	// Maximum filings to return
	Limit param.Field[int64] `json:"limit"`
	// Result offset for pagination
	Offset param.Field[int64] `json:"offset"`
	// Full-text SEC search query (required for type: search)
	Query param.Field[string] `json:"query"`
	// Optional company ticker. Valid for both search and entity lookups.
	Ticker param.Field[string] `json:"ticker"`
}

func (LegalV1SecFilingParams) MarshalJSON added in v0.19.0

func (r LegalV1SecFilingParams) MarshalJSON() (data []byte, err error)

type LegalV1SecFilingParamsType added in v0.19.0

type LegalV1SecFilingParamsType string

Run a full-text search or fetch a single entity filing history

const (
	LegalV1SecFilingParamsTypeSearch LegalV1SecFilingParamsType = "search"
	LegalV1SecFilingParamsTypeEntity LegalV1SecFilingParamsType = "entity"
)

func (LegalV1SecFilingParamsType) IsKnown added in v0.19.0

func (r LegalV1SecFilingParamsType) IsKnown() bool

type LegalV1SecFilingResponse added in v0.19.0

type LegalV1SecFilingResponse struct {
	Cik        string                           `json:"cik" api:"nullable"`
	DateAfter  time.Time                        `json:"dateAfter" api:"nullable" format:"date"`
	DateBefore time.Time                        `json:"dateBefore" api:"nullable" format:"date"`
	Entity     string                           `json:"entity" api:"nullable"`
	Filings    []LegalV1SecFilingResponseFiling `json:"filings"`
	FormTypes  []string                         `json:"formTypes"`
	Limit      int64                            `json:"limit"`
	Offset     int64                            `json:"offset"`
	Query      string                           `json:"query" api:"nullable"`
	Ticker     string                           `json:"ticker" api:"nullable"`
	Total      int64                            `json:"total"`
	Type       LegalV1SecFilingResponseType     `json:"type"`
	JSON       legalV1SecFilingResponseJSON     `json:"-"`
}

func (*LegalV1SecFilingResponse) UnmarshalJSON added in v0.19.0

func (r *LegalV1SecFilingResponse) UnmarshalJSON(data []byte) (err error)

type LegalV1SecFilingResponseFiling added in v0.19.0

type LegalV1SecFilingResponseFiling struct {
	AccessionNumber string                                    `json:"accessionNumber"`
	Description     string                                    `json:"description" api:"nullable"`
	Documents       []LegalV1SecFilingResponseFilingsDocument `json:"documents"`
	Entity          LegalV1SecFilingResponseFilingsEntity     `json:"entity"`
	FiledAt         time.Time                                 `json:"filedAt" format:"date"`
	FormType        string                                    `json:"formType"`
	PeriodOfReport  time.Time                                 `json:"periodOfReport" api:"nullable" format:"date"`
	SecURL          string                                    `json:"secUrl"`
	Snippet         string                                    `json:"snippet" api:"nullable"`
	JSON            legalV1SecFilingResponseFilingJSON        `json:"-"`
}

func (*LegalV1SecFilingResponseFiling) UnmarshalJSON added in v0.19.0

func (r *LegalV1SecFilingResponseFiling) UnmarshalJSON(data []byte) (err error)

type LegalV1SecFilingResponseFilingsDocument added in v0.19.0

type LegalV1SecFilingResponseFilingsDocument struct {
	Description string                                      `json:"description"`
	Type        string                                      `json:"type"`
	URL         string                                      `json:"url"`
	JSON        legalV1SecFilingResponseFilingsDocumentJSON `json:"-"`
}

func (*LegalV1SecFilingResponseFilingsDocument) UnmarshalJSON added in v0.19.0

func (r *LegalV1SecFilingResponseFilingsDocument) UnmarshalJSON(data []byte) (err error)

type LegalV1SecFilingResponseFilingsEntity added in v0.19.0

type LegalV1SecFilingResponseFilingsEntity struct {
	Cik                  string                                    `json:"cik"`
	EntityType           string                                    `json:"entityType" api:"nullable"`
	Name                 string                                    `json:"name" api:"nullable"`
	Sic                  string                                    `json:"sic" api:"nullable"`
	SicDescription       string                                    `json:"sicDescription" api:"nullable"`
	StateOfIncorporation string                                    `json:"stateOfIncorporation" api:"nullable"`
	Ticker               string                                    `json:"ticker" api:"nullable"`
	JSON                 legalV1SecFilingResponseFilingsEntityJSON `json:"-"`
}

func (*LegalV1SecFilingResponseFilingsEntity) UnmarshalJSON added in v0.19.0

func (r *LegalV1SecFilingResponseFilingsEntity) UnmarshalJSON(data []byte) (err error)

type LegalV1SecFilingResponseType added in v0.19.0

type LegalV1SecFilingResponseType string
const (
	LegalV1SecFilingResponseTypeSearch LegalV1SecFilingResponseType = "search"
	LegalV1SecFilingResponseTypeEntity LegalV1SecFilingResponseType = "entity"
)

func (LegalV1SecFilingResponseType) IsKnown added in v0.19.0

func (r LegalV1SecFilingResponseType) IsKnown() bool

type LegalV1Service

type LegalV1Service struct {
	Options []option.RequestOption
}

Legal research tools including citation verification

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) Docket added in v0.5.0

Search federal court dockets or retrieve a specific docket with optional filing entries. Use legal.listCourts() to resolve court slugs for filtering.

func (*LegalV1Service) Find

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

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

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

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) ListCourts added in v0.5.0

Returns court IDs (slugs) and names for use with the docket search endpoint. Use the returned court ID as the `court` parameter in legal.docket().

func (*LegalV1Service) ListJurisdictions

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

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

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) SecFiling added in v0.19.0

Search SEC EDGAR full-text filings via efts.sec.gov or fetch a filer's structured filing history via data.sec.gov. Returns direct SEC archive URLs with filing metadata and match snippets when available.

func (*LegalV1Service) Similar

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

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

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" api:"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" api:"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" api:"nullable"`
	// Date the application was filed
	FilingDate time.Time `json:"filingDate" api:"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" api:"nullable"`
	// The text of the trademark
	MarkText string `json:"markText" api:"nullable"`
	// Type of mark (e.g. "Standard Character Mark", "Design Mark")
	MarkType string `json:"markType" api:"nullable"`
	// Nice classification class numbers
	NiceClasses []int64 `json:"niceClasses"`
	// Current owner/applicant information
	Owner LegalV1TrademarkSearchResponseOwner `json:"owner" api:"nullable"`
	// Date the mark was registered
	RegistrationDate time.Time `json:"registrationDate" api:"nullable" format:"date"`
	// USPTO registration number (if registered)
	RegistrationNumber string `json:"registrationNumber" api:"nullable"`
	// USPTO serial number
	SerialNumber string `json:"serialNumber"`
	// Current status (e.g. "Registered", "Pending", "Abandoned", "Cancelled")
	Status string `json:"status" api:"nullable"`
	// Date of most recent status update
	StatusDate time.Time `json:"statusDate" api:"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" api:"nullable"`
	Description string                                            `json:"description" api:"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" api:"nullable"`
	EntityType string                                  `json:"entityType" api:"nullable"`
	Name       string                                  `json:"name" api:"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" api:"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

type LegalV1VerifyResponseCitationsVerificationSource

type LegalV1VerifyResponseCitationsVerificationSource string

Source of verification result (heuristic for fallback matches).

const (
	LegalV1VerifyResponseCitationsVerificationSourceCourtlistener LegalV1VerifyResponseCitationsVerificationSource = "courtlistener"
	LegalV1VerifyResponseCitationsVerificationSourceHeuristic     LegalV1VerifyResponseCitationsVerificationSource = "heuristic"
)

func (LegalV1VerifyResponseCitationsVerificationSource) IsKnown

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 LincService added in v0.57.0

type LincService struct {
	Options []option.RequestOption
	V1      *LincV1Service
}

LincService 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 NewLincService method instead.

func NewLincService added in v0.57.0

func NewLincService(opts ...option.RequestOption) (r *LincService)

NewLincService 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 LincV1Service added in v0.57.0

type LincV1Service struct {
	Options []option.RequestOption
	// Durable, stateful legal agent sessions with sandboxed tools and files
	Sessions *LincV1SessionService
}

LincV1Service 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 NewLincV1Service method instead.

func NewLincV1Service added in v0.57.0

func NewLincV1Service(opts ...option.RequestOption) (r *LincV1Service)

NewLincV1Service 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 LincV1SessionCancelParams added in v0.57.0

type LincV1SessionCancelParams struct {
	// Also clear queued steering/follow-up messages so the abort leaves the agent
	// fully idle. Cleared texts are returned in the `response.data.clearedQueue` field
	// of the response body. Without it, messages still queued when the abort settles
	// are auto-continued as a new run. Runtimes older than the Linc release that
	// supports this flag ignore it: the abort still happens but the queue is left
	// untouched.
	ClearQueue param.Field[bool] `json:"clearQueue"`
}

func (LincV1SessionCancelParams) MarshalJSON added in v0.57.0

func (r LincV1SessionCancelParams) MarshalJSON() (data []byte, err error)

type LincV1SessionGetEventsParams added in v0.57.0

type LincV1SessionGetEventsParams struct {
	// Alias for cursor. Ignored when cursor is also provided.
	AfterSeq param.Field[int64] `query:"afterSeq"`
	// Replay events with a sequence number greater than this cursor.
	Cursor param.Field[int64] `query:"cursor"`
	// Comma-separated Linc event types to omit from replay.
	ExcludeEventTypes param.Field[[]string] `query:"excludeEventTypes"`
	// Maximum number of events to return.
	Limit param.Field[int64] `query:"limit"`
}

func (LincV1SessionGetEventsParams) URLQuery added in v0.57.0

func (r LincV1SessionGetEventsParams) URLQuery() (v url.Values)

URLQuery serializes LincV1SessionGetEventsParams's query parameters as `url.Values`.

type LincV1SessionGetMessagesParams added in v0.57.0

type LincV1SessionGetMessagesParams struct {
	// Alias for cursor. Ignored when cursor is also provided.
	AfterSeq param.Field[int64] `query:"afterSeq"`
	// Replay messages with a source event sequence number greater than this cursor.
	Cursor param.Field[int64] `query:"cursor"`
	// Maximum number of source events to scan for completed messages.
	Limit param.Field[int64] `query:"limit"`
}

func (LincV1SessionGetMessagesParams) URLQuery added in v0.57.0

func (r LincV1SessionGetMessagesParams) URLQuery() (v url.Values)

URLQuery serializes LincV1SessionGetMessagesParams's query parameters as `url.Values`.

type LincV1SessionIngestEventsParams added in v0.57.0

type LincV1SessionIngestEventsParams struct {
	// Native Linc event frames to persist for replay.
	Frames param.Field[[]LincV1SessionIngestEventsParamsFrame] `json:"frames" api:"required"`
}

func (LincV1SessionIngestEventsParams) MarshalJSON added in v0.57.0

func (r LincV1SessionIngestEventsParams) MarshalJSON() (data []byte, err error)

type LincV1SessionIngestEventsParamsFrame added in v0.57.0

type LincV1SessionIngestEventsParamsFrame struct {
	// Native Linc event payload.
	Event param.Field[map[string]interface{}] `json:"event" api:"required"`
	// Monotonic native event sequence number.
	Seq param.Field[int64] `json:"seq" api:"required"`
	// Native Linc event type.
	Type param.Field[string] `json:"type" api:"required"`
}

func (LincV1SessionIngestEventsParamsFrame) MarshalJSON added in v0.57.0

func (r LincV1SessionIngestEventsParamsFrame) MarshalJSON() (data []byte, err error)

type LincV1SessionNewParams added in v0.57.0

type LincV1SessionNewParams struct {
	// Specific document template slugs to inject into the using-document-templates
	// skill.
	DocumentTemplateSlugs param.Field[[]string] `json:"documentTemplateSlugs"`
	IdleTimeoutMs         param.Field[int64]    `json:"idleTimeoutMs"`
	// When true, inject all active org document templates into the
	// using-document-templates skill.
	IncludeDocumentTemplates param.Field[bool] `json:"includeDocumentTemplates"`
	// Privileged C3-only hidden app instructions to append to the sandbox AGENTS.md.
	Instructions param.Field[string] `json:"instructions"`
	Model        param.Field[string] `json:"model"`
	// Optional caller-provided scoped Case.dev API key for the runtime.
	ScopedAPIKey param.Field[string] `json:"scopedApiKey"`
	// Processing tier for eligible OpenAI GPT models. Priority provides lower latency
	// at premium cost.
	ServiceTier param.Field[LincV1SessionNewParamsServiceTier] `json:"serviceTier"`
	// Skills API slugs to install into the runtime sandbox before the native session
	// starts.
	SkillSlugs param.Field[[]string] `json:"skillSlugs"`
	Title      param.Field[string]   `json:"title"`
	VaultIDs   param.Field[[]string] `json:"vaultIds"`
}

func (LincV1SessionNewParams) MarshalJSON added in v0.57.0

func (r LincV1SessionNewParams) MarshalJSON() (data []byte, err error)

type LincV1SessionNewParamsServiceTier added in v0.57.0

type LincV1SessionNewParamsServiceTier string

Processing tier for eligible OpenAI GPT models. Priority provides lower latency at premium cost.

const (
	LincV1SessionNewParamsServiceTierDefault  LincV1SessionNewParamsServiceTier = "default"
	LincV1SessionNewParamsServiceTierPriority LincV1SessionNewParamsServiceTier = "priority"
)

func (LincV1SessionNewParamsServiceTier) IsKnown added in v0.57.0

type LincV1SessionSendRpcParams added in v0.57.0

type LincV1SessionSendRpcParams struct {
	// Native Pi/Linc RPC command type. Prompt commands also require a string id for
	// idempotency.
	Type param.Field[string] `json:"type" api:"required"`
	// Command idempotency key. Required when type is prompt.
	ID param.Field[string] `json:"id"`
}

func (LincV1SessionSendRpcParams) MarshalJSON added in v0.57.0

func (r LincV1SessionSendRpcParams) MarshalJSON() (data []byte, err error)

type LincV1SessionService added in v0.57.0

type LincV1SessionService struct {
	Options []option.RequestOption
}

Durable, stateful legal agent sessions with sandboxed tools and files

LincV1SessionService 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 NewLincV1SessionService method instead.

func NewLincV1SessionService added in v0.57.0

func NewLincV1SessionService(opts ...option.RequestOption) (r *LincV1SessionService)

NewLincV1SessionService 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 (*LincV1SessionService) Cancel added in v0.57.0

Sends an abort RPC to the session runtime, ending the current turn while keeping the session alive. Body handling is intentionally lenient — cancel is a stop control, so unknown fields are ignored and an invalid or missing body is treated as empty rather than rejected.

func (*LincV1SessionService) Delete added in v0.57.0

func (r *LincV1SessionService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

End native Linc session

func (*LincV1SessionService) GetEvents added in v0.57.0

Returns persisted native Pi/Linc event envelopes after the requested cursor. Live delivery is handled by the Linc stream service.

func (*LincV1SessionService) GetMessages added in v0.57.0

Returns completed Pi/Linc message entries derived from durable native Linc events. This is the stable session-message read model for callers that need to persist or recover chat history without depending on a live SSE stream.

func (*LincV1SessionService) GetState added in v0.57.0

func (r *LincV1SessionService) GetState(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Get native Linc session state

func (*LincV1SessionService) IngestEvents added in v0.57.0

Runtime ingest endpoint for sandbox runtimes. Frames are persisted for replay; terminal frames emit the durable Linc session ended webhook.

func (*LincV1SessionService) New added in v0.57.0

Creates a Daytona-backed native Linc session with scoped Case.dev credentials. This endpoint starts the sandbox actor only; messages and event replay use separate endpoints.

func (*LincV1SessionService) SendRpc added in v0.57.0

Forwards a native Pi/Linc RPC command object to the sandbox-local Linc bridge unchanged. The route returns after Pi accepts or rejects the command; native events are read through the events endpoint.

type LlmGetConfigResponse

type LlmGetConfigResponse struct {
	Models []LlmGetConfigResponseModel `json:"models" api:"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" api:"required"`
	// Type of model (e.g., language, embedding)
	ModelType string `json:"modelType" api:"required"`
	// Human-readable model name
	Name string `json:"name" api:"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
	// Access 40+ language models through a unified API
	V1 *LlmV1Service
}

Access 40+ language models through a unified API

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" api:"required"`
	// CaseMark-only: controls whether reasoning fields appear in responses. Defaults
	// to false (suppressed) for most CaseMark models; defaults to true for
	// casemark/core-potassium.
	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/core-large 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

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
}

Access 40+ language models through a unified API

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

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" api:"required"`
	// Embedding model to use (e.g., text-embedding-ada-002, text-embedding-3-small)
	Model param.Field[string] `json:"model" api:"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

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
	// Access 40+ language models through a unified API
	Chat *LlmV1ChatService
}

Access 40+ language models through a unified API

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

Create vector embeddings from text using OpenAI-compatible models. Perfect for semantic search, document similarity, and building RAG systems for legal documents.

type MatterService added in v0.21.0

type MatterService struct {
	Options []option.RequestOption
	// Matter-native legal workspaces and orchestration primitives
	V1 *MatterV1Service
}

MatterService 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 NewMatterService method instead.

func NewMatterService added in v0.21.0

func NewMatterService(opts ...option.RequestOption) (r *MatterService)

NewMatterService 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 MatterV1AgentTypeListParams added in v0.21.0

type MatterV1AgentTypeListParams struct {
	Active param.Field[bool] `query:"active"`
}

func (MatterV1AgentTypeListParams) URLQuery added in v0.21.0

func (r MatterV1AgentTypeListParams) URLQuery() (v url.Values)

URLQuery serializes MatterV1AgentTypeListParams's query parameters as `url.Values`.

type MatterV1AgentTypeNewParams added in v0.21.0

type MatterV1AgentTypeNewParams struct {
	Instructions  param.Field[string]                 `json:"instructions" api:"required"`
	Name          param.Field[string]                 `json:"name" api:"required"`
	Description   param.Field[string]                 `json:"description"`
	DisabledTools param.Field[[]string]               `json:"disabled_tools"`
	EnabledTools  param.Field[[]string]               `json:"enabled_tools"`
	IsActive      param.Field[bool]                   `json:"is_active"`
	IsDefault     param.Field[bool]                   `json:"is_default"`
	Metadata      param.Field[map[string]interface{}] `json:"metadata"`
	Model         param.Field[string]                 `json:"model"`
	SkillRefs     param.Field[[]string]               `json:"skill_refs"`
	Slug          param.Field[string]                 `json:"slug"`
}

func (MatterV1AgentTypeNewParams) MarshalJSON added in v0.21.0

func (r MatterV1AgentTypeNewParams) MarshalJSON() (data []byte, err error)

type MatterV1AgentTypeService added in v0.21.0

type MatterV1AgentTypeService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1AgentTypeService 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 NewMatterV1AgentTypeService method instead.

func NewMatterV1AgentTypeService added in v0.21.0

func NewMatterV1AgentTypeService(opts ...option.RequestOption) (r *MatterV1AgentTypeService)

NewMatterV1AgentTypeService 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 (*MatterV1AgentTypeService) List added in v0.21.0

List reusable agent roles for the authenticated organization.

func (*MatterV1AgentTypeService) New added in v0.21.0

Create a reusable agent role for legal matter orchestration.

type MatterV1EventService added in v0.21.0

type MatterV1EventService struct {
	Options []option.RequestOption
	// Matter-native legal workspaces and orchestration primitives
	Subscriptions *MatterV1EventSubscriptionService
}

MatterV1EventService 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 NewMatterV1EventService method instead.

func NewMatterV1EventService added in v0.21.0

func NewMatterV1EventService(opts ...option.RequestOption) (r *MatterV1EventService)

NewMatterV1EventService 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 MatterV1EventSubscriptionNewParams added in v0.21.0

type MatterV1EventSubscriptionNewParams struct {
	CallbackURL   param.Field[string]   `json:"callbackUrl" api:"required" format:"uri"`
	EventTypes    param.Field[[]string] `json:"eventTypes"`
	SigningSecret param.Field[string]   `json:"signingSecret"`
}

func (MatterV1EventSubscriptionNewParams) MarshalJSON added in v0.21.0

func (r MatterV1EventSubscriptionNewParams) MarshalJSON() (data []byte, err error)

type MatterV1EventSubscriptionService added in v0.21.0

type MatterV1EventSubscriptionService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1EventSubscriptionService 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 NewMatterV1EventSubscriptionService method instead.

func NewMatterV1EventSubscriptionService added in v0.21.0

func NewMatterV1EventSubscriptionService(opts ...option.RequestOption) (r *MatterV1EventSubscriptionService)

NewMatterV1EventSubscriptionService 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 (*MatterV1EventSubscriptionService) Delete added in v0.21.0

func (r *MatterV1EventSubscriptionService) Delete(ctx context.Context, id string, subscriptionID string, opts ...option.RequestOption) (err error)

Deactivates a matter webhook subscription.

func (*MatterV1EventSubscriptionService) List added in v0.21.0

Lists webhook subscriptions configured for a matter.

func (*MatterV1EventSubscriptionService) New added in v0.21.0

Creates a webhook subscription for matter and work-item events.

type MatterV1ListParams added in v0.21.0

type MatterV1ListParams struct {
	MatterType   param.Field[string] `query:"matter_type"`
	PracticeArea param.Field[string] `query:"practice_area"`
	Query        param.Field[string] `query:"query"`
	Status       param.Field[string] `query:"status"`
}

func (MatterV1ListParams) URLQuery added in v0.21.0

func (r MatterV1ListParams) URLQuery() (v url.Values)

URLQuery serializes MatterV1ListParams's query parameters as `url.Values`.

type MatterV1LogExportParams added in v0.21.0

type MatterV1LogExportParams struct {
	// Filter by actor ID
	ActorID param.Field[string] `json:"actor_id"`
	// Filter by actor type
	ActorType param.Field[string] `json:"actor_type"`
	// End of time range (ISO 8601)
	EndTime param.Field[time.Time] `json:"end_time" format:"date-time"`
	// Filter by exact event type
	EventType param.Field[string] `json:"event_type"`
	// Export format. Defaults to jsonl.
	Format param.Field[MatterV1LogExportParamsFormat] `json:"format"`
	// Filter by scope: matter, work_item, execution, sharing, all
	Scope param.Field[MatterV1LogExportParamsScopeUnion] `json:"scope"`
	// Start of time range (ISO 8601)
	StartTime param.Field[time.Time] `json:"start_time" format:"date-time"`
	// Filter by work item ID
	WorkItemID param.Field[string] `json:"work_item_id"`
}

func (MatterV1LogExportParams) MarshalJSON added in v0.21.0

func (r MatterV1LogExportParams) MarshalJSON() (data []byte, err error)

type MatterV1LogExportParamsFormat added in v0.21.0

type MatterV1LogExportParamsFormat string

Export format. Defaults to jsonl.

const (
	MatterV1LogExportParamsFormatJson  MatterV1LogExportParamsFormat = "json"
	MatterV1LogExportParamsFormatJSONL MatterV1LogExportParamsFormat = "jsonl"
	MatterV1LogExportParamsFormatCsv   MatterV1LogExportParamsFormat = "csv"
	MatterV1LogExportParamsFormatTsv   MatterV1LogExportParamsFormat = "tsv"
)

func (MatterV1LogExportParamsFormat) IsKnown added in v0.21.0

func (r MatterV1LogExportParamsFormat) IsKnown() bool

type MatterV1LogExportParamsScopeArray added in v0.21.0

type MatterV1LogExportParamsScopeArray []string

func (MatterV1LogExportParamsScopeArray) ImplementsMatterV1LogExportParamsScopeUnion added in v0.21.0

func (r MatterV1LogExportParamsScopeArray) ImplementsMatterV1LogExportParamsScopeUnion()

type MatterV1LogExportParamsScopeUnion added in v0.21.0

type MatterV1LogExportParamsScopeUnion interface {
	ImplementsMatterV1LogExportParamsScopeUnion()
}

Filter by scope: matter, work_item, execution, sharing, all

Satisfied by [shared.UnionString], MatterV1LogExportParamsScopeArray.

type MatterV1LogExportResponse added in v0.21.0

type MatterV1LogExportResponse struct {
	Data []map[string]interface{}      `json:"data"`
	JSON matterV1LogExportResponseJSON `json:"-"`
}

func (*MatterV1LogExportResponse) UnmarshalJSON added in v0.21.0

func (r *MatterV1LogExportResponse) UnmarshalJSON(data []byte) (err error)

type MatterV1LogListParams added in v0.21.0

type MatterV1LogListParams struct {
	// Filter by actor ID
	ActorID param.Field[string] `query:"actor_id"`
	// Filter by actor type
	ActorType param.Field[string] `query:"actor_type"`
	// End of time range (ISO 8601)
	EndTime param.Field[time.Time] `query:"end_time" format:"date-time"`
	// Filter by exact event type
	EventType param.Field[string] `query:"event_type"`
	// Maximum number of log entries to return (max 200)
	Limit param.Field[int64] `query:"limit"`
	// Number of log entries to skip for pagination
	Offset param.Field[int64] `query:"offset"`
	// Filter by scope: matter, work_item, execution, sharing, all
	Scope param.Field[MatterV1LogListParamsScopeUnion] `query:"scope"`
	// Start of time range (ISO 8601)
	StartTime param.Field[time.Time] `query:"start_time" format:"date-time"`
	// Filter by work item ID
	WorkItemID param.Field[string] `query:"work_item_id"`
}

func (MatterV1LogListParams) URLQuery added in v0.21.0

func (r MatterV1LogListParams) URLQuery() (v url.Values)

URLQuery serializes MatterV1LogListParams's query parameters as `url.Values`.

type MatterV1LogListParamsScopeArray added in v0.21.0

type MatterV1LogListParamsScopeArray []string

func (MatterV1LogListParamsScopeArray) ImplementsMatterV1LogListParamsScopeUnion added in v0.21.0

func (r MatterV1LogListParamsScopeArray) ImplementsMatterV1LogListParamsScopeUnion()

type MatterV1LogListParamsScopeUnion added in v0.21.0

type MatterV1LogListParamsScopeUnion interface {
	ImplementsMatterV1LogListParamsScopeUnion()
}

Filter by scope: matter, work_item, execution, sharing, all

Satisfied by [shared.UnionString], MatterV1LogListParamsScopeArray.

type MatterV1LogNewParams added in v0.21.0

type MatterV1LogNewParams struct {
	Summary    param.Field[string]                 `json:"summary" api:"required"`
	Details    param.Field[map[string]interface{}] `json:"details"`
	EventType  param.Field[string]                 `json:"event_type"`
	WorkItemID param.Field[string]                 `json:"work_item_id"`
}

func (MatterV1LogNewParams) MarshalJSON added in v0.21.0

func (r MatterV1LogNewParams) MarshalJSON() (data []byte, err error)

type MatterV1LogService added in v0.21.0

type MatterV1LogService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1LogService 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 NewMatterV1LogService method instead.

func NewMatterV1LogService added in v0.21.0

func NewMatterV1LogService(opts ...option.RequestOption) (r *MatterV1LogService)

NewMatterV1LogService 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 (*MatterV1LogService) Export added in v0.21.0

Bulk export matter log entries for audits, visibility, and eval pipelines. Supports json, csv, tsv, and jsonl. Limited to 10,000 entries per request.

func (*MatterV1LogService) List added in v0.21.0

List the operational history for a matter.

func (*MatterV1LogService) New added in v0.21.0

Append a manual operational note or event to a matter log.

type MatterV1MatterPartyNewParams added in v0.21.0

type MatterV1MatterPartyNewParams struct {
	PartyID      param.Field[string]                           `json:"party_id" api:"required"`
	Role         param.Field[MatterV1MatterPartyNewParamsRole] `json:"role" api:"required"`
	CustomFields param.Field[map[string]interface{}]           `json:"custom_fields"`
	IsPrimary    param.Field[bool]                             `json:"is_primary"`
	Metadata     param.Field[map[string]interface{}]           `json:"metadata"`
	Notes        param.Field[string]                           `json:"notes"`
	SetAsClient  param.Field[bool]                             `json:"set_as_client"`
}

func (MatterV1MatterPartyNewParams) MarshalJSON added in v0.21.0

func (r MatterV1MatterPartyNewParams) MarshalJSON() (data []byte, err error)

type MatterV1MatterPartyNewParamsRole added in v0.21.0

type MatterV1MatterPartyNewParamsRole string
const (
	MatterV1MatterPartyNewParamsRoleClient          MatterV1MatterPartyNewParamsRole = "client"
	MatterV1MatterPartyNewParamsRoleProspect        MatterV1MatterPartyNewParamsRole = "prospect"
	MatterV1MatterPartyNewParamsRoleOpposingParty   MatterV1MatterPartyNewParamsRole = "opposing_party"
	MatterV1MatterPartyNewParamsRoleOpposingCounsel MatterV1MatterPartyNewParamsRole = "opposing_counsel"
	MatterV1MatterPartyNewParamsRoleCoCounsel       MatterV1MatterPartyNewParamsRole = "co_counsel"
	MatterV1MatterPartyNewParamsRoleJudge           MatterV1MatterPartyNewParamsRole = "judge"
	MatterV1MatterPartyNewParamsRoleExpert          MatterV1MatterPartyNewParamsRole = "expert"
	MatterV1MatterPartyNewParamsRoleWitness         MatterV1MatterPartyNewParamsRole = "witness"
	MatterV1MatterPartyNewParamsRoleVendor          MatterV1MatterPartyNewParamsRole = "vendor"
	MatterV1MatterPartyNewParamsRoleInsurer         MatterV1MatterPartyNewParamsRole = "insurer"
	MatterV1MatterPartyNewParamsRoleOther           MatterV1MatterPartyNewParamsRole = "other"
)

func (MatterV1MatterPartyNewParamsRole) IsKnown added in v0.21.0

type MatterV1MatterPartyService added in v0.21.0

type MatterV1MatterPartyService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1MatterPartyService 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 NewMatterV1MatterPartyService method instead.

func NewMatterV1MatterPartyService added in v0.21.0

func NewMatterV1MatterPartyService(opts ...option.RequestOption) (r *MatterV1MatterPartyService)

NewMatterV1MatterPartyService 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 (*MatterV1MatterPartyService) List added in v0.21.0

func (r *MatterV1MatterPartyService) List(ctx context.Context, id string, opts ...option.RequestOption) (err error)

List parties attached to a matter.

func (*MatterV1MatterPartyService) New added in v0.21.0

Attach a reusable party to a matter with a matter-specific role.

type MatterV1NewParams added in v0.21.0

type MatterV1NewParams struct {
	Title                 param.Field[string]                  `json:"title" api:"required"`
	Billing               param.Field[map[string]interface{}]  `json:"billing"`
	ClientName            param.Field[string]                  `json:"client_name"`
	ClientPartyID         param.Field[string]                  `json:"client_party_id"`
	CustomFields          param.Field[map[string]interface{}]  `json:"custom_fields"`
	Description           param.Field[string]                  `json:"description"`
	DisplayID             param.Field[string]                  `json:"display_id"`
	ImportantDates        param.Field[map[string]interface{}]  `json:"important_dates"`
	Jurisdiction          param.Field[map[string]interface{}]  `json:"jurisdiction"`
	MatterType            param.Field[string]                  `json:"matter_type"`
	Metadata              param.Field[map[string]interface{}]  `json:"metadata"`
	PracticeArea          param.Field[string]                  `json:"practice_area"`
	ResponsibleAttorneyID param.Field[string]                  `json:"responsible_attorney_id"`
	Status                param.Field[MatterV1NewParamsStatus] `json:"status"`
	Subtype               param.Field[string]                  `json:"subtype"`
	Vault                 param.Field[MatterV1NewParamsVault]  `json:"vault"`
	VaultID               param.Field[string]                  `json:"vault_id"`
}

func (MatterV1NewParams) MarshalJSON added in v0.21.0

func (r MatterV1NewParams) MarshalJSON() (data []byte, err error)

type MatterV1NewParamsStatus added in v0.21.0

type MatterV1NewParamsStatus string
const (
	MatterV1NewParamsStatusIntake   MatterV1NewParamsStatus = "intake"
	MatterV1NewParamsStatusOpen     MatterV1NewParamsStatus = "open"
	MatterV1NewParamsStatusPending  MatterV1NewParamsStatus = "pending"
	MatterV1NewParamsStatusClosed   MatterV1NewParamsStatus = "closed"
	MatterV1NewParamsStatusArchived MatterV1NewParamsStatus = "archived"
)

func (MatterV1NewParamsStatus) IsKnown added in v0.21.0

func (r MatterV1NewParamsStatus) IsKnown() bool

type MatterV1NewParamsVault added in v0.21.0

type MatterV1NewParamsVault struct {
	Description    param.Field[string]                 `json:"description"`
	EnableGraph    param.Field[bool]                   `json:"enableGraph"`
	EnableIndexing param.Field[bool]                   `json:"enableIndexing"`
	Metadata       param.Field[map[string]interface{}] `json:"metadata"`
}

func (MatterV1NewParamsVault) MarshalJSON added in v0.21.0

func (r MatterV1NewParamsVault) MarshalJSON() (data []byte, err error)

type MatterV1PartyListParams added in v0.21.0

type MatterV1PartyListParams struct {
	Email param.Field[string]                      `query:"email"`
	Query param.Field[string]                      `query:"query"`
	Type  param.Field[MatterV1PartyListParamsType] `query:"type"`
}

func (MatterV1PartyListParams) URLQuery added in v0.21.0

func (r MatterV1PartyListParams) URLQuery() (v url.Values)

URLQuery serializes MatterV1PartyListParams's query parameters as `url.Values`.

type MatterV1PartyListParamsType added in v0.21.0

type MatterV1PartyListParamsType string
const (
	MatterV1PartyListParamsTypePerson       MatterV1PartyListParamsType = "person"
	MatterV1PartyListParamsTypeOrganization MatterV1PartyListParamsType = "organization"
)

func (MatterV1PartyListParamsType) IsKnown added in v0.21.0

func (r MatterV1PartyListParamsType) IsKnown() bool

type MatterV1PartyNewParams added in v0.21.0

type MatterV1PartyNewParams struct {
	Name         param.Field[string]                     `json:"name" api:"required"`
	Addresses    param.Field[[]map[string]interface{}]   `json:"addresses"`
	CustomFields param.Field[map[string]interface{}]     `json:"custom_fields"`
	Email        param.Field[string]                     `json:"email"`
	Metadata     param.Field[map[string]interface{}]     `json:"metadata"`
	Notes        param.Field[string]                     `json:"notes"`
	Phone        param.Field[string]                     `json:"phone"`
	Type         param.Field[MatterV1PartyNewParamsType] `json:"type"`
}

func (MatterV1PartyNewParams) MarshalJSON added in v0.21.0

func (r MatterV1PartyNewParams) MarshalJSON() (data []byte, err error)

type MatterV1PartyNewParamsType added in v0.21.0

type MatterV1PartyNewParamsType string
const (
	MatterV1PartyNewParamsTypePerson       MatterV1PartyNewParamsType = "person"
	MatterV1PartyNewParamsTypeOrganization MatterV1PartyNewParamsType = "organization"
)

func (MatterV1PartyNewParamsType) IsKnown added in v0.21.0

func (r MatterV1PartyNewParamsType) IsKnown() bool

type MatterV1PartyService added in v0.21.0

type MatterV1PartyService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1PartyService 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 NewMatterV1PartyService method instead.

func NewMatterV1PartyService added in v0.21.0

func NewMatterV1PartyService(opts ...option.RequestOption) (r *MatterV1PartyService)

NewMatterV1PartyService 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 (*MatterV1PartyService) Get added in v0.21.0

func (r *MatterV1PartyService) Get(ctx context.Context, partyID string, opts ...option.RequestOption) (err error)

Get a reusable legal party by ID.

func (*MatterV1PartyService) List added in v0.21.0

List reusable legal parties for the authenticated organization.

func (*MatterV1PartyService) New added in v0.21.0

Create a reusable legal party for the authenticated organization.

func (*MatterV1PartyService) Update added in v0.21.0

func (r *MatterV1PartyService) Update(ctx context.Context, partyID string, opts ...option.RequestOption) (err error)

Update a reusable legal party.

type MatterV1Service added in v0.21.0

type MatterV1Service struct {
	Options []option.RequestOption
	// Matter-native legal workspaces and orchestration primitives
	AgentTypes *MatterV1AgentTypeService
	// Matter-native legal workspaces and orchestration primitives
	Parties *MatterV1PartyService
	// Matter-native legal workspaces and orchestration primitives
	Types  *MatterV1TypeService
	Events *MatterV1EventService
	// Matter-native legal workspaces and orchestration primitives
	Log *MatterV1LogService
	// Matter-native legal workspaces and orchestration primitives
	MatterParties *MatterV1MatterPartyService
	// Matter-native legal workspaces and orchestration primitives
	Shares *MatterV1ShareService
	// Matter-native legal workspaces and orchestration primitives
	WorkItems *MatterV1WorkItemService
}

Matter-native legal workspaces and orchestration primitives

MatterV1Service 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 NewMatterV1Service method instead.

func NewMatterV1Service added in v0.21.0

func NewMatterV1Service(opts ...option.RequestOption) (r *MatterV1Service)

NewMatterV1Service 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 (*MatterV1Service) Get added in v0.21.0

func (r *MatterV1Service) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Get a single matter by ID.

func (*MatterV1Service) List added in v0.21.0

func (r *MatterV1Service) List(ctx context.Context, query MatterV1ListParams, opts ...option.RequestOption) (err error)

List matters for the authenticated organization.

func (*MatterV1Service) New added in v0.21.0

func (r *MatterV1Service) New(ctx context.Context, body MatterV1NewParams, opts ...option.RequestOption) (err error)

Create a new legal matter and optionally link an existing primary vault.

func (*MatterV1Service) Update added in v0.21.0

func (r *MatterV1Service) Update(ctx context.Context, id string, body MatterV1UpdateParams, opts ...option.RequestOption) (err error)

Update mutable matter fields.

type MatterV1ShareNewParams added in v0.21.0

type MatterV1ShareNewParams struct {
	TargetOrgID param.Field[string]                           `json:"target_org_id" api:"required"`
	ExpiresAt   param.Field[time.Time]                        `json:"expires_at" format:"date-time"`
	Permission  param.Field[MatterV1ShareNewParamsPermission] `json:"permission"`
}

func (MatterV1ShareNewParams) MarshalJSON added in v0.21.0

func (r MatterV1ShareNewParams) MarshalJSON() (data []byte, err error)

type MatterV1ShareNewParamsPermission added in v0.21.0

type MatterV1ShareNewParamsPermission string
const (
	MatterV1ShareNewParamsPermissionRead MatterV1ShareNewParamsPermission = "read"
	MatterV1ShareNewParamsPermissionEdit MatterV1ShareNewParamsPermission = "edit"
)

func (MatterV1ShareNewParamsPermission) IsKnown added in v0.21.0

type MatterV1ShareService added in v0.21.0

type MatterV1ShareService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1ShareService 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 NewMatterV1ShareService method instead.

func NewMatterV1ShareService added in v0.21.0

func NewMatterV1ShareService(opts ...option.RequestOption) (r *MatterV1ShareService)

NewMatterV1ShareService 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 (*MatterV1ShareService) Delete added in v0.21.0

func (r *MatterV1ShareService) Delete(ctx context.Context, id string, shareID string, opts ...option.RequestOption) (err error)

Revoke a matter share and its linked vault share.

func (*MatterV1ShareService) List added in v0.21.0

func (r *MatterV1ShareService) List(ctx context.Context, id string, opts ...option.RequestOption) (err error)

List cross-org shares for a matter. Owner only.

func (*MatterV1ShareService) New added in v0.21.0

Grant another organization scoped access to this matter and its primary vault.

type MatterV1TypeListParams added in v0.21.0

type MatterV1TypeListParams struct {
	Active param.Field[bool] `query:"active"`
}

func (MatterV1TypeListParams) URLQuery added in v0.21.0

func (r MatterV1TypeListParams) URLQuery() (v url.Values)

URLQuery serializes MatterV1TypeListParams's query parameters as `url.Values`.

type MatterV1TypeNewParams added in v0.21.0

type MatterV1TypeNewParams struct {
	Name               param.Field[string]                                 `json:"name" api:"required"`
	DefaultAgentTypeID param.Field[string]                                 `json:"default_agent_type_id"`
	DefaultMetadata    param.Field[map[string]interface{}]                 `json:"default_metadata"`
	DefaultWorkItems   param.Field[[]map[string]interface{}]               `json:"default_work_items"`
	Description        param.Field[string]                                 `json:"description"`
	ExitCriteria       param.Field[[]string]                               `json:"exit_criteria"`
	Instructions       param.Field[string]                                 `json:"instructions"`
	IntakeRequirements param.Field[[]string]                               `json:"intake_requirements"`
	IsActive           param.Field[bool]                                   `json:"is_active"`
	OrchestrationMode  param.Field[MatterV1TypeNewParamsOrchestrationMode] `json:"orchestration_mode"`
	ReviewAgentTypeID  param.Field[string]                                 `json:"review_agent_type_id"`
	ReviewCriteria     param.Field[[]string]                               `json:"review_criteria"`
	SkillRefs          param.Field[[]string]                               `json:"skill_refs"`
	Slug               param.Field[string]                                 `json:"slug"`
}

func (MatterV1TypeNewParams) MarshalJSON added in v0.21.0

func (r MatterV1TypeNewParams) MarshalJSON() (data []byte, err error)

type MatterV1TypeNewParamsOrchestrationMode added in v0.21.0

type MatterV1TypeNewParamsOrchestrationMode string
const (
	MatterV1TypeNewParamsOrchestrationModeAuto  MatterV1TypeNewParamsOrchestrationMode = "auto"
	MatterV1TypeNewParamsOrchestrationModeHuman MatterV1TypeNewParamsOrchestrationMode = "human"
)

func (MatterV1TypeNewParamsOrchestrationMode) IsKnown added in v0.21.0

type MatterV1TypeService added in v0.21.0

type MatterV1TypeService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1TypeService 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 NewMatterV1TypeService method instead.

func NewMatterV1TypeService added in v0.21.0

func NewMatterV1TypeService(opts ...option.RequestOption) (r *MatterV1TypeService)

NewMatterV1TypeService 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 (*MatterV1TypeService) Get added in v0.21.0

func (r *MatterV1TypeService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Get a single matter type.

func (*MatterV1TypeService) List added in v0.21.0

List matter types for the authenticated organization.

func (*MatterV1TypeService) New added in v0.21.0

Create a matter type with plain-English operating instructions and seeded work.

func (*MatterV1TypeService) Update added in v0.21.0

Update a matter type.

type MatterV1TypeUpdateParams added in v0.21.0

type MatterV1TypeUpdateParams struct {
	DefaultAgentTypeID param.Field[string]                                    `json:"default_agent_type_id"`
	DefaultMetadata    param.Field[map[string]interface{}]                    `json:"default_metadata"`
	DefaultWorkItems   param.Field[[]map[string]interface{}]                  `json:"default_work_items"`
	Description        param.Field[string]                                    `json:"description"`
	ExitCriteria       param.Field[[]string]                                  `json:"exit_criteria"`
	Instructions       param.Field[string]                                    `json:"instructions"`
	IntakeRequirements param.Field[[]string]                                  `json:"intake_requirements"`
	IsActive           param.Field[bool]                                      `json:"is_active"`
	Name               param.Field[string]                                    `json:"name"`
	OrchestrationMode  param.Field[MatterV1TypeUpdateParamsOrchestrationMode] `json:"orchestration_mode"`
	ReviewAgentTypeID  param.Field[string]                                    `json:"review_agent_type_id"`
	ReviewCriteria     param.Field[[]string]                                  `json:"review_criteria"`
	SkillRefs          param.Field[[]string]                                  `json:"skill_refs"`
	Slug               param.Field[string]                                    `json:"slug"`
}

func (MatterV1TypeUpdateParams) MarshalJSON added in v0.21.0

func (r MatterV1TypeUpdateParams) MarshalJSON() (data []byte, err error)

type MatterV1TypeUpdateParamsOrchestrationMode added in v0.21.0

type MatterV1TypeUpdateParamsOrchestrationMode string
const (
	MatterV1TypeUpdateParamsOrchestrationModeAuto  MatterV1TypeUpdateParamsOrchestrationMode = "auto"
	MatterV1TypeUpdateParamsOrchestrationModeHuman MatterV1TypeUpdateParamsOrchestrationMode = "human"
)

func (MatterV1TypeUpdateParamsOrchestrationMode) IsKnown added in v0.21.0

type MatterV1UpdateParams added in v0.21.0

type MatterV1UpdateParams struct {
	ArchivedAt            param.Field[time.Time]                  `json:"archived_at" format:"date-time"`
	Billing               param.Field[map[string]interface{}]     `json:"billing"`
	ClientName            param.Field[string]                     `json:"client_name"`
	ClientPartyID         param.Field[string]                     `json:"client_party_id"`
	CustomFields          param.Field[map[string]interface{}]     `json:"custom_fields"`
	Description           param.Field[string]                     `json:"description"`
	DisplayID             param.Field[string]                     `json:"display_id"`
	ImportantDates        param.Field[map[string]interface{}]     `json:"important_dates"`
	Jurisdiction          param.Field[map[string]interface{}]     `json:"jurisdiction"`
	MatterType            param.Field[string]                     `json:"matter_type"`
	Metadata              param.Field[map[string]interface{}]     `json:"metadata"`
	PracticeArea          param.Field[string]                     `json:"practice_area"`
	ResponsibleAttorneyID param.Field[string]                     `json:"responsible_attorney_id"`
	Status                param.Field[MatterV1UpdateParamsStatus] `json:"status"`
	Subtype               param.Field[string]                     `json:"subtype"`
	Title                 param.Field[string]                     `json:"title"`
}

func (MatterV1UpdateParams) MarshalJSON added in v0.21.0

func (r MatterV1UpdateParams) MarshalJSON() (data []byte, err error)

type MatterV1UpdateParamsStatus added in v0.21.0

type MatterV1UpdateParamsStatus string
const (
	MatterV1UpdateParamsStatusIntake   MatterV1UpdateParamsStatus = "intake"
	MatterV1UpdateParamsStatusOpen     MatterV1UpdateParamsStatus = "open"
	MatterV1UpdateParamsStatusPending  MatterV1UpdateParamsStatus = "pending"
	MatterV1UpdateParamsStatusClosed   MatterV1UpdateParamsStatus = "closed"
	MatterV1UpdateParamsStatusArchived MatterV1UpdateParamsStatus = "archived"
)

func (MatterV1UpdateParamsStatus) IsKnown added in v0.21.0

func (r MatterV1UpdateParamsStatus) IsKnown() bool

type MatterV1WorkItemDecideParams added in v0.21.0

type MatterV1WorkItemDecideParams struct {
	Decision param.Field[MatterV1WorkItemDecideParamsDecision] `json:"decision" api:"required"`
	Metadata param.Field[map[string]interface{}]               `json:"metadata"`
	Reason   param.Field[string]                               `json:"reason"`
}

func (MatterV1WorkItemDecideParams) MarshalJSON added in v0.21.0

func (r MatterV1WorkItemDecideParams) MarshalJSON() (data []byte, err error)

type MatterV1WorkItemDecideParamsDecision added in v0.21.0

type MatterV1WorkItemDecideParamsDecision string
const (
	MatterV1WorkItemDecideParamsDecisionApprove MatterV1WorkItemDecideParamsDecision = "approve"
	MatterV1WorkItemDecideParamsDecisionBlock   MatterV1WorkItemDecideParamsDecision = "block"
)

func (MatterV1WorkItemDecideParamsDecision) IsKnown added in v0.21.0

type MatterV1WorkItemListParams added in v0.21.0

type MatterV1WorkItemListParams struct {
	AssigneeID param.Field[string] `query:"assignee_id"`
	Status     param.Field[string] `query:"status"`
}

func (MatterV1WorkItemListParams) URLQuery added in v0.21.0

func (r MatterV1WorkItemListParams) URLQuery() (v url.Values)

URLQuery serializes MatterV1WorkItemListParams's query parameters as `url.Values`.

type MatterV1WorkItemNewParams added in v0.21.0

type MatterV1WorkItemNewParams struct {
	Title        param.Field[string]                            `json:"title" api:"required"`
	AssigneeID   param.Field[string]                            `json:"assignee_id"`
	Description  param.Field[string]                            `json:"description"`
	DueAt        param.Field[time.Time]                         `json:"due_at" format:"date-time"`
	ExitCriteria param.Field[[]string]                          `json:"exit_criteria"`
	Instructions param.Field[string]                            `json:"instructions"`
	Metadata     param.Field[map[string]interface{}]            `json:"metadata"`
	Priority     param.Field[MatterV1WorkItemNewParamsPriority] `json:"priority"`
	Type         param.Field[MatterV1WorkItemNewParamsType]     `json:"type"`
}

func (MatterV1WorkItemNewParams) MarshalJSON added in v0.21.0

func (r MatterV1WorkItemNewParams) MarshalJSON() (data []byte, err error)

type MatterV1WorkItemNewParamsPriority added in v0.21.0

type MatterV1WorkItemNewParamsPriority string
const (
	MatterV1WorkItemNewParamsPriorityLow    MatterV1WorkItemNewParamsPriority = "low"
	MatterV1WorkItemNewParamsPriorityNormal MatterV1WorkItemNewParamsPriority = "normal"
	MatterV1WorkItemNewParamsPriorityHigh   MatterV1WorkItemNewParamsPriority = "high"
	MatterV1WorkItemNewParamsPriorityUrgent MatterV1WorkItemNewParamsPriority = "urgent"
)

func (MatterV1WorkItemNewParamsPriority) IsKnown added in v0.21.0

type MatterV1WorkItemNewParamsType added in v0.21.0

type MatterV1WorkItemNewParamsType string
const (
	MatterV1WorkItemNewParamsTypeTask          MatterV1WorkItemNewParamsType = "task"
	MatterV1WorkItemNewParamsTypeDeadline      MatterV1WorkItemNewParamsType = "deadline"
	MatterV1WorkItemNewParamsTypeReview        MatterV1WorkItemNewParamsType = "review"
	MatterV1WorkItemNewParamsTypeFiling        MatterV1WorkItemNewParamsType = "filing"
	MatterV1WorkItemNewParamsTypeCommunication MatterV1WorkItemNewParamsType = "communication"
	MatterV1WorkItemNewParamsTypeResearch      MatterV1WorkItemNewParamsType = "research"
	MatterV1WorkItemNewParamsTypeDrafting      MatterV1WorkItemNewParamsType = "drafting"
	MatterV1WorkItemNewParamsTypeCollection    MatterV1WorkItemNewParamsType = "collection"
	MatterV1WorkItemNewParamsTypeIntake        MatterV1WorkItemNewParamsType = "intake"
)

func (MatterV1WorkItemNewParamsType) IsKnown added in v0.21.0

func (r MatterV1WorkItemNewParamsType) IsKnown() bool

type MatterV1WorkItemService added in v0.21.0

type MatterV1WorkItemService struct {
	Options []option.RequestOption
}

Matter-native legal workspaces and orchestration primitives

MatterV1WorkItemService 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 NewMatterV1WorkItemService method instead.

func NewMatterV1WorkItemService added in v0.21.0

func NewMatterV1WorkItemService(opts ...option.RequestOption) (r *MatterV1WorkItemService)

NewMatterV1WorkItemService 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 (*MatterV1WorkItemService) Decide added in v0.21.0

func (r *MatterV1WorkItemService) Decide(ctx context.Context, id string, workItemID string, body MatterV1WorkItemDecideParams, opts ...option.RequestOption) (err error)

Approve or block a work item.

func (*MatterV1WorkItemService) Get added in v0.21.0

func (r *MatterV1WorkItemService) Get(ctx context.Context, id string, workItemID string, opts ...option.RequestOption) (err error)

Get a single work item for a matter.

func (*MatterV1WorkItemService) List added in v0.21.0

List active work items for a matter.

func (*MatterV1WorkItemService) New added in v0.21.0

Create an active work item on a matter.

func (*MatterV1WorkItemService) Update added in v0.21.0

func (r *MatterV1WorkItemService) Update(ctx context.Context, id string, workItemID string, body MatterV1WorkItemUpdateParams, opts ...option.RequestOption) (err error)

Update a matter work item.

type MatterV1WorkItemUpdateParams added in v0.21.0

type MatterV1WorkItemUpdateParams struct {
	AssigneeID   param.Field[string]                               `json:"assignee_id"`
	CompletedAt  param.Field[time.Time]                            `json:"completed_at" format:"date-time"`
	Description  param.Field[string]                               `json:"description"`
	DueAt        param.Field[time.Time]                            `json:"due_at" format:"date-time"`
	ExitCriteria param.Field[[]string]                             `json:"exit_criteria"`
	Instructions param.Field[string]                               `json:"instructions"`
	Metadata     param.Field[map[string]interface{}]               `json:"metadata"`
	Priority     param.Field[MatterV1WorkItemUpdateParamsPriority] `json:"priority"`
	StartedAt    param.Field[time.Time]                            `json:"started_at" format:"date-time"`
	Status       param.Field[MatterV1WorkItemUpdateParamsStatus]   `json:"status"`
	Title        param.Field[string]                               `json:"title"`
	Type         param.Field[MatterV1WorkItemUpdateParamsType]     `json:"type"`
}

func (MatterV1WorkItemUpdateParams) MarshalJSON added in v0.21.0

func (r MatterV1WorkItemUpdateParams) MarshalJSON() (data []byte, err error)

type MatterV1WorkItemUpdateParamsPriority added in v0.21.0

type MatterV1WorkItemUpdateParamsPriority string
const (
	MatterV1WorkItemUpdateParamsPriorityLow    MatterV1WorkItemUpdateParamsPriority = "low"
	MatterV1WorkItemUpdateParamsPriorityNormal MatterV1WorkItemUpdateParamsPriority = "normal"
	MatterV1WorkItemUpdateParamsPriorityHigh   MatterV1WorkItemUpdateParamsPriority = "high"
	MatterV1WorkItemUpdateParamsPriorityUrgent MatterV1WorkItemUpdateParamsPriority = "urgent"
)

func (MatterV1WorkItemUpdateParamsPriority) IsKnown added in v0.21.0

type MatterV1WorkItemUpdateParamsStatus added in v0.21.0

type MatterV1WorkItemUpdateParamsStatus string
const (
	MatterV1WorkItemUpdateParamsStatusDraft         MatterV1WorkItemUpdateParamsStatus = "draft"
	MatterV1WorkItemUpdateParamsStatusQueued        MatterV1WorkItemUpdateParamsStatus = "queued"
	MatterV1WorkItemUpdateParamsStatusInProgress    MatterV1WorkItemUpdateParamsStatus = "in_progress"
	MatterV1WorkItemUpdateParamsStatusBlocked       MatterV1WorkItemUpdateParamsStatus = "blocked"
	MatterV1WorkItemUpdateParamsStatusInReview      MatterV1WorkItemUpdateParamsStatus = "in_review"
	MatterV1WorkItemUpdateParamsStatusAwaitingHuman MatterV1WorkItemUpdateParamsStatus = "awaiting_human"
	MatterV1WorkItemUpdateParamsStatusDone          MatterV1WorkItemUpdateParamsStatus = "done"
	MatterV1WorkItemUpdateParamsStatusCanceled      MatterV1WorkItemUpdateParamsStatus = "canceled"
)

func (MatterV1WorkItemUpdateParamsStatus) IsKnown added in v0.21.0

type MatterV1WorkItemUpdateParamsType added in v0.21.0

type MatterV1WorkItemUpdateParamsType string
const (
	MatterV1WorkItemUpdateParamsTypeTask          MatterV1WorkItemUpdateParamsType = "task"
	MatterV1WorkItemUpdateParamsTypeDeadline      MatterV1WorkItemUpdateParamsType = "deadline"
	MatterV1WorkItemUpdateParamsTypeReview        MatterV1WorkItemUpdateParamsType = "review"
	MatterV1WorkItemUpdateParamsTypeFiling        MatterV1WorkItemUpdateParamsType = "filing"
	MatterV1WorkItemUpdateParamsTypeCommunication MatterV1WorkItemUpdateParamsType = "communication"
	MatterV1WorkItemUpdateParamsTypeResearch      MatterV1WorkItemUpdateParamsType = "research"
	MatterV1WorkItemUpdateParamsTypeDrafting      MatterV1WorkItemUpdateParamsType = "drafting"
	MatterV1WorkItemUpdateParamsTypeCollection    MatterV1WorkItemUpdateParamsType = "collection"
	MatterV1WorkItemUpdateParamsTypeIntake        MatterV1WorkItemUpdateParamsType = "intake"
)

func (MatterV1WorkItemUpdateParamsType) IsKnown added in v0.21.0

type MediaService added in v0.55.0

type MediaService struct {
	Options []option.RequestOption
	V1      *MediaV1Service
}

MediaService 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 NewMediaService method instead.

func NewMediaService added in v0.55.0

func NewMediaService(opts ...option.RequestOption) (r *MediaService)

NewMediaService 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 MediaV1ClipService added in v0.55.0

type MediaV1ClipService struct {
	Options []option.RequestOption
}

Transcript retrieval and captioned media clip generation

MediaV1ClipService 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 NewMediaV1ClipService method instead.

func NewMediaV1ClipService added in v0.55.0

func NewMediaV1ClipService(opts ...option.RequestOption) (r *MediaV1ClipService)

NewMediaV1ClipService 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 (*MediaV1ClipService) Get added in v0.55.0

func (r *MediaV1ClipService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Get media clip job

func (*MediaV1ClipService) New added in v0.55.0

func (r *MediaV1ClipService) New(ctx context.Context, opts ...option.RequestOption) (err error)

Create a captioned media clip

type MediaV1Service added in v0.55.0

type MediaV1Service struct {
	Options []option.RequestOption
	// Transcript retrieval and captioned media clip generation
	Clips       *MediaV1ClipService
	Transcripts *MediaV1TranscriptService
}

MediaV1Service 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 NewMediaV1Service method instead.

func NewMediaV1Service added in v0.55.0

func NewMediaV1Service(opts ...option.RequestOption) (r *MediaV1Service)

NewMediaV1Service 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 MediaV1TranscriptRetrieveNewParams added in v0.57.0

type MediaV1TranscriptRetrieveNewParams struct {
	// Object ID for either the source audio/video file or transcript artifact.
	ObjectID param.Field[string] `json:"object_id" api:"required"`
	// Vault ID containing the source media or transcript object.
	VaultID param.Field[string] `json:"vault_id" api:"required"`
	// Alternative nested transcript object reference.
	Transcript param.Field[MediaV1TranscriptRetrieveNewParamsTranscript] `json:"transcript"`
}

func (MediaV1TranscriptRetrieveNewParams) MarshalJSON added in v0.57.0

func (r MediaV1TranscriptRetrieveNewParams) MarshalJSON() (data []byte, err error)

type MediaV1TranscriptRetrieveNewParamsTranscript added in v0.57.0

type MediaV1TranscriptRetrieveNewParamsTranscript struct {
	ObjectID param.Field[string] `json:"object_id"`
	VaultID  param.Field[string] `json:"vault_id"`
}

Alternative nested transcript object reference.

func (MediaV1TranscriptRetrieveNewParamsTranscript) MarshalJSON added in v0.57.0

func (r MediaV1TranscriptRetrieveNewParamsTranscript) MarshalJSON() (data []byte, err error)

type MediaV1TranscriptRetrieveNewResponse added in v0.57.0

type MediaV1TranscriptRetrieveNewResponse struct {
	// Requested object ID.
	ObjectID string                                     `json:"object_id" api:"required"`
	Status   MediaV1TranscriptRetrieveNewResponseStatus `json:"status" api:"required"`
	// Full transcript text.
	Text          string `json:"text" api:"required"`
	VaultID       string `json:"vault_id" api:"required"`
	AudioDuration int64  `json:"audio_duration"`
	Confidence    int64  `json:"confidence"`
	Filename      string `json:"filename"`
	// Source media object ID when known.
	SourceObjectID string `json:"source_object_id"`
	// Transcript object ID when known.
	TranscriptObjectID string `json:"transcript_object_id"`
	// Transcription job ID when known.
	TranscriptionJobID string                                   `json:"transcription_job_id"`
	WordCount          int64                                    `json:"word_count"`
	JSON               mediaV1TranscriptRetrieveNewResponseJSON `json:"-"`
}

func (*MediaV1TranscriptRetrieveNewResponse) UnmarshalJSON added in v0.57.0

func (r *MediaV1TranscriptRetrieveNewResponse) UnmarshalJSON(data []byte) (err error)

type MediaV1TranscriptRetrieveNewResponseStatus added in v0.57.0

type MediaV1TranscriptRetrieveNewResponseStatus string
const (
	MediaV1TranscriptRetrieveNewResponseStatusCompleted MediaV1TranscriptRetrieveNewResponseStatus = "completed"
)

func (MediaV1TranscriptRetrieveNewResponseStatus) IsKnown added in v0.57.0

type MediaV1TranscriptRetrieveService added in v0.57.0

type MediaV1TranscriptRetrieveService struct {
	Options []option.RequestOption
}

Transcript retrieval and captioned media clip generation

MediaV1TranscriptRetrieveService 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 NewMediaV1TranscriptRetrieveService method instead.

func NewMediaV1TranscriptRetrieveService added in v0.57.0

func NewMediaV1TranscriptRetrieveService(opts ...option.RequestOption) (r *MediaV1TranscriptRetrieveService)

NewMediaV1TranscriptRetrieveService 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 (*MediaV1TranscriptRetrieveService) New added in v0.57.0

Retrieves the full transcript text for a vault transcript object or an audio/video source object with a completed transcription job. When object_id is a source media object, access to that source object grants access to its generated transcript artifact.

type MediaV1TranscriptSearchService added in v0.55.0

type MediaV1TranscriptSearchService struct {
	Options []option.RequestOption
}

Transcript retrieval and captioned media clip generation

MediaV1TranscriptSearchService 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 NewMediaV1TranscriptSearchService method instead.

func NewMediaV1TranscriptSearchService added in v0.55.0

func NewMediaV1TranscriptSearchService(opts ...option.RequestOption) (r *MediaV1TranscriptSearchService)

NewMediaV1TranscriptSearchService 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 (*MediaV1TranscriptSearchService) New added in v0.55.0

Search transcript words

type MediaV1TranscriptService added in v0.55.0

type MediaV1TranscriptService struct {
	Options []option.RequestOption
	// Transcript retrieval and captioned media clip generation
	Search *MediaV1TranscriptSearchService
	// Transcript retrieval and captioned media clip generation
	Retrieve *MediaV1TranscriptRetrieveService
}

MediaV1TranscriptService 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 NewMediaV1TranscriptService method instead.

func NewMediaV1TranscriptService added in v0.55.0

func NewMediaV1TranscriptService(opts ...option.RequestOption) (r *MediaV1TranscriptService)

NewMediaV1TranscriptService 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 MemoryService

type MemoryService struct {
	Options []option.RequestOption
	// Persistent memory for AI agents with semantic search and 12 generic indexed tag
	// fields
	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" api:"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" api:"required"`
	// Message role
	Role param.Field[MemoryV1NewParamsMessagesRole] `json:"role" api:"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

type MemoryV1SearchParams

type MemoryV1SearchParams struct {
	// Search query for semantic matching
	Query param.Field[string] `json:"query" api:"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
}

Persistent memory for AI agents with semantic search and 12 generic indexed tag fields

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

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

List all memories with optional filtering by tags and category.

func (*MemoryV1Service) New

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

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
	// Extract text from PDFs, images, and scanned documents
	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 OcrV1GetParams added in v0.35.0

type OcrV1GetParams struct {
	// Include full OCR text in completed responses (default: false)
	IncludeText param.Field[OcrV1GetParamsIncludeText] `query:"include_text"`
}

func (OcrV1GetParams) URLQuery added in v0.35.0

func (r OcrV1GetParams) URLQuery() (v url.Values)

URLQuery serializes OcrV1GetParams's query parameters as `url.Values`.

type OcrV1GetParamsIncludeText added in v0.35.0

type OcrV1GetParamsIncludeText string

Include full OCR text in completed responses (default: false)

const (
	OcrV1GetParamsIncludeTextTrue  OcrV1GetParamsIncludeText = "true"
	OcrV1GetParamsIncludeTextFalse OcrV1GetParamsIncludeText = "false"
)

func (OcrV1GetParamsIncludeText) IsKnown added in v0.35.0

func (r OcrV1GetParamsIncludeText) IsKnown() bool

type OcrV1GetResponse

type OcrV1GetResponse struct {
	// OCR job ID
	ID string `json:"id" api:"required"`
	// Job creation timestamp
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// Current job status
	Status OcrV1GetResponseStatus `json:"status" api:"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 and include_text=true
	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" api:"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

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
}

Extract text from PDFs, images, and scanned documents

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 by redirecting to the OCR service download URL.

func (*OcrV1Service) Get

func (r *OcrV1Service) Get(ctx context.Context, id string, query OcrV1GetParams, opts ...option.RequestOption) (res *OcrV1GetResponse, err error)

Retrieve the status and results of an OCR job. Returns job progress and metadata; full extracted text is included only when include_text=true.

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
	// Privilege detection for e-discovery and litigation workflows
	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
	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"
)

func (PrivilegeV1DetectParamsCategory) IsKnown

type PrivilegeV1DetectParamsJurisdiction

type PrivilegeV1DetectParamsJurisdiction string

Jurisdiction for privilege rules

const (
	PrivilegeV1DetectParamsJurisdictionUsFederal PrivilegeV1DetectParamsJurisdiction = "US-Federal"
)

func (PrivilegeV1DetectParamsJurisdiction) IsKnown

type PrivilegeV1DetectResponse

type PrivilegeV1DetectResponse struct {
	Categories []PrivilegeV1DetectResponseCategory `json:"categories" api:"required"`
	// Overall confidence score (0-1)
	Confidence float64 `json:"confidence" api:"required"`
	// Policy-friendly explanation for privilege log
	PolicyRationale string `json:"policy_rationale" api:"required"`
	// Whether any privilege was detected
	Privileged bool `json:"privileged" api:"required"`
	// Recommended action for discovery
	Recommendation PrivilegeV1DetectResponseRecommendation `json:"recommendation" api:"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

type PrivilegeV1Service

type PrivilegeV1Service struct {
	Options []option.RequestOption
}

Privilege detection for e-discovery and litigation workflows

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

Analyzes text or vault documents for legal privilege review. Detects attorney-client privilege, work product doctrine, and common interest privilege.

Returns structured review flags with confidence scores and policy-friendly rationale suitable for discovery workflows and privilege logs. This endpoint is an AI-assisted triage tool and does not replace attorney judgment.

**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 ReadResponseFileBundle added in v0.50.0

type ReadResponseFileBundle struct {
	Path        string                     `json:"path" api:"required"`
	Role        ReadResponseFileBundleRole `json:"role" api:"required"`
	RootSlug    string                     `json:"root_slug" api:"required"`
	ContentType string                     `json:"content_type" api:"nullable"`
	JSON        readResponseFileBundleJSON `json:"-"`
}

func (*ReadResponseFileBundle) UnmarshalJSON added in v0.50.0

func (r *ReadResponseFileBundle) UnmarshalJSON(data []byte) (err error)

type ReadResponseFileBundleRole added in v0.50.0

type ReadResponseFileBundleRole string
const (
	ReadResponseFileBundleRoleFile ReadResponseFileBundleRole = "file"
)

func (ReadResponseFileBundleRole) IsKnown added in v0.50.0

func (r ReadResponseFileBundleRole) IsKnown() bool

type ReadResponseRootBundle added in v0.50.0

type ReadResponseRootBundle struct {
	Files []ReadResponseRootBundleFile `json:"files" api:"required"`
	Role  ReadResponseRootBundleRole   `json:"role" api:"required"`
	JSON  readResponseRootBundleJSON   `json:"-"`
}

func (*ReadResponseRootBundle) UnmarshalJSON added in v0.50.0

func (r *ReadResponseRootBundle) UnmarshalJSON(data []byte) (err error)

type ReadResponseRootBundleFile added in v0.50.0

type ReadResponseRootBundleFile struct {
	Path        string                         `json:"path" api:"required"`
	Slug        string                         `json:"slug" api:"required"`
	ContentType string                         `json:"content_type" api:"nullable"`
	Name        string                         `json:"name" api:"nullable"`
	JSON        readResponseRootBundleFileJSON `json:"-"`
}

func (*ReadResponseRootBundleFile) UnmarshalJSON added in v0.50.0

func (r *ReadResponseRootBundleFile) UnmarshalJSON(data []byte) (err error)

type ReadResponseRootBundleRole added in v0.50.0

type ReadResponseRootBundleRole string
const (
	ReadResponseRootBundleRoleRoot ReadResponseRootBundleRole = "root"
)

func (ReadResponseRootBundleRole) IsKnown added in v0.50.0

func (r ReadResponseRootBundleRole) IsKnown() bool

type SearchService

type SearchService struct {
	Options []option.RequestOption
	// Web search and AI answers
	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" api:"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

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" api:"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 SearchV1SearchParams

type SearchV1SearchParams struct {
	// Primary search query
	Query param.Field[string] `json:"query" api:"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
}

Web search and AI answers

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

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

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) Search

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

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" api:"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 SkillCustomListParams added in v0.18.0

type SkillCustomListParams struct {
	// Cursor for pagination (skill ID from previous page)
	Cursor param.Field[string] `query:"cursor"`
	// Maximum number of results (1-100)
	Limit param.Field[int64] `query:"limit"`
	// Filter by tag
	Tag param.Field[string] `query:"tag"`
}

func (SkillCustomListParams) URLQuery added in v0.18.0

func (r SkillCustomListParams) URLQuery() (v url.Values)

URLQuery serializes SkillCustomListParams's query parameters as `url.Values`.

type SkillCustomListResponse added in v0.18.0

type SkillCustomListResponse struct {
	HasMore    bool                           `json:"has_more"`
	NextCursor string                         `json:"next_cursor" api:"nullable"`
	Skills     []SkillCustomListResponseSkill `json:"skills"`
	JSON       skillCustomListResponseJSON    `json:"-"`
}

func (*SkillCustomListResponse) UnmarshalJSON added in v0.18.0

func (r *SkillCustomListResponse) UnmarshalJSON(data []byte) (err error)

type SkillCustomListResponseSkill added in v0.18.0

type SkillCustomListResponseSkill struct {
	CreatedAt time.Time                        `json:"created_at" format:"date-time"`
	Metadata  interface{}                      `json:"metadata"`
	Name      string                           `json:"name"`
	Slug      string                           `json:"slug"`
	Summary   string                           `json:"summary" api:"nullable"`
	Tags      []string                         `json:"tags"`
	UpdatedAt time.Time                        `json:"updated_at" format:"date-time"`
	Version   int64                            `json:"version"`
	JSON      skillCustomListResponseSkillJSON `json:"-"`
}

func (*SkillCustomListResponseSkill) UnmarshalJSON added in v0.18.0

func (r *SkillCustomListResponseSkill) UnmarshalJSON(data []byte) (err error)

type SkillCustomService added in v0.18.0

type SkillCustomService struct {
	Options []option.RequestOption
}

Search and read legal AI skills for agents

SkillCustomService 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 NewSkillCustomService method instead.

func NewSkillCustomService added in v0.18.0

func NewSkillCustomService(opts ...option.RequestOption) (r *SkillCustomService)

NewSkillCustomService 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 (*SkillCustomService) List added in v0.18.0

List all custom skills for the authenticated organization. Supports cursor-based pagination.

type SkillDeleteResponse added in v0.18.0

type SkillDeleteResponse struct {
	Deleted bool                    `json:"deleted"`
	Slug    string                  `json:"slug"`
	JSON    skillDeleteResponseJSON `json:"-"`
}

func (*SkillDeleteResponse) UnmarshalJSON added in v0.18.0

func (r *SkillDeleteResponse) UnmarshalJSON(data []byte) (err error)

type SkillExportParams added in v0.56.0

type SkillExportParams struct {
	// Agent runtime skill directory convention to export for. Most callers should omit
	// this and pass skillSlugs when creating a runtime.
	Target param.Field[string] `query:"target"`
}

func (SkillExportParams) URLQuery added in v0.56.0

func (r SkillExportParams) URLQuery() (v url.Values)

URLQuery serializes SkillExportParams's query parameters as `url.Values`.

type SkillExportResponse added in v0.56.0

type SkillExportResponse struct {
	Files  []SkillExportResponseFile `json:"files"`
	Root   string                    `json:"root"`
	Slug   string                    `json:"slug"`
	Source SkillExportResponseSource `json:"source"`
	Target string                    `json:"target"`
	JSON   skillExportResponseJSON   `json:"-"`
}

func (*SkillExportResponse) UnmarshalJSON added in v0.56.0

func (r *SkillExportResponse) UnmarshalJSON(data []byte) (err error)

type SkillExportResponseFile added in v0.56.0

type SkillExportResponseFile struct {
	Content     string                      `json:"content"`
	ContentType string                      `json:"content_type"`
	Path        string                      `json:"path"`
	Sha256      string                      `json:"sha256"`
	SizeBytes   int64                       `json:"size_bytes"`
	JSON        skillExportResponseFileJSON `json:"-"`
}

func (*SkillExportResponseFile) UnmarshalJSON added in v0.56.0

func (r *SkillExportResponseFile) UnmarshalJSON(data []byte) (err error)

type SkillExportResponseSource added in v0.56.0

type SkillExportResponseSource string
const (
	SkillExportResponseSourceCustom  SkillExportResponseSource = "custom"
	SkillExportResponseSourceCurated SkillExportResponseSource = "curated"
)

func (SkillExportResponseSource) IsKnown added in v0.56.0

func (r SkillExportResponseSource) IsKnown() bool

type SkillNewParams added in v0.18.0

type SkillNewParams struct {
	// Full skill content in markdown
	Content param.Field[string] `json:"content" api:"required"`
	// Skill name
	Name param.Field[string] `json:"name" api:"required"`
	// Optional bundled companion files installed alongside the skill as <slug>/<path>
	// in sandbox skill directories.
	Files param.Field[[]SkillNewParamsFile] `json:"files"`
	// Arbitrary metadata (author, license, etc.)
	Metadata param.Field[interface{}] `json:"metadata"`
	// URL-safe slug. Auto-generated from name if omitted.
	Slug param.Field[string] `json:"slug"`
	// Brief description (1-2 sentences)
	Summary param.Field[string] `json:"summary"`
	// Tags for categorization and search boosting
	Tags param.Field[[]string] `json:"tags"`
}

func (SkillNewParams) MarshalJSON added in v0.18.0

func (r SkillNewParams) MarshalJSON() (data []byte, err error)

type SkillNewParamsFile added in v0.56.0

type SkillNewParamsFile struct {
	Content param.Field[string] `json:"content" api:"required"`
	// Relative path inside the skill directory. SKILL.md is reserved for the root
	// skill content.
	Path        param.Field[string]      `json:"path" api:"required"`
	ContentType param.Field[string]      `json:"contentType"`
	Metadata    param.Field[interface{}] `json:"metadata"`
	Name        param.Field[string]      `json:"name"`
	Summary     param.Field[string]      `json:"summary"`
	Tags        param.Field[[]string]    `json:"tags"`
}

func (SkillNewParamsFile) MarshalJSON added in v0.56.0

func (r SkillNewParamsFile) MarshalJSON() (data []byte, err error)

type SkillNewResponse added in v0.18.0

type SkillNewResponse struct {
	Bundle    interface{}          `json:"bundle" api:"nullable"`
	Content   string               `json:"content"`
	CreatedAt time.Time            `json:"created_at" format:"date-time"`
	Metadata  interface{}          `json:"metadata"`
	Name      string               `json:"name"`
	Slug      string               `json:"slug"`
	Summary   string               `json:"summary" api:"nullable"`
	Tags      []string             `json:"tags"`
	Version   int64                `json:"version"`
	JSON      skillNewResponseJSON `json:"-"`
}

func (*SkillNewResponse) UnmarshalJSON added in v0.18.0

func (r *SkillNewResponse) UnmarshalJSON(data []byte) (err error)

type SkillReadResponse added in v0.5.0

type SkillReadResponse struct {
	// Skill author
	AuthorName string `json:"author_name"`
	// Skill bundle metadata for root skills and companion file rows
	Bundle SkillReadResponseBundle `json:"bundle" api:"nullable"`
	// Full skill content in markdown
	Content string `json:"content"`
	// Skill license
	License string `json:"license"`
	// Custom metadata (custom skills only)
	Metadata interface{} `json:"metadata"`
	// Skill name
	Name string `json:"name"`
	// Unique skill identifier
	Slug string `json:"slug"`
	// Skill source (authenticated requests only)
	Source SkillReadResponseSource `json:"source"`
	// Brief skill description
	Summary string `json:"summary"`
	// Skill tags
	Tags []string `json:"tags"`
	// Skill version
	Version string                `json:"version"`
	JSON    skillReadResponseJSON `json:"-"`
}

func (*SkillReadResponse) UnmarshalJSON added in v0.5.0

func (r *SkillReadResponse) UnmarshalJSON(data []byte) (err error)

type SkillReadResponseBundle added in v0.48.0

type SkillReadResponseBundle struct {
	Role        SkillReadResponseBundleRole `json:"role" api:"required"`
	ContentType string                      `json:"content_type" api:"nullable"`
	// This field can have the runtime type of [[]ReadResponseRootBundleFile].
	Files    interface{}                 `json:"files"`
	Path     string                      `json:"path"`
	RootSlug string                      `json:"root_slug"`
	JSON     skillReadResponseBundleJSON `json:"-"`
	// contains filtered or unexported fields
}

Skill bundle metadata for root skills and companion file rows

func (SkillReadResponseBundle) AsUnion added in v0.48.0

AsUnion returns a SkillReadResponseBundleUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are ReadResponseRootBundle, ReadResponseFileBundle.

func (*SkillReadResponseBundle) UnmarshalJSON added in v0.48.0

func (r *SkillReadResponseBundle) UnmarshalJSON(data []byte) (err error)

type SkillReadResponseBundleRole added in v0.48.0

type SkillReadResponseBundleRole string
const (
	SkillReadResponseBundleRoleRoot SkillReadResponseBundleRole = "root"
	SkillReadResponseBundleRoleFile SkillReadResponseBundleRole = "file"
)

func (SkillReadResponseBundleRole) IsKnown added in v0.48.0

func (r SkillReadResponseBundleRole) IsKnown() bool

type SkillReadResponseBundleUnion added in v0.48.0

type SkillReadResponseBundleUnion interface {
	// contains filtered or unexported methods
}

Skill bundle metadata for root skills and companion file rows

Union satisfied by ReadResponseRootBundle or ReadResponseFileBundle.

type SkillReadResponseSource added in v0.18.0

type SkillReadResponseSource string

Skill source (authenticated requests only)

const (
	SkillReadResponseSourceCurated SkillReadResponseSource = "curated"
	SkillReadResponseSourceCustom  SkillReadResponseSource = "custom"
)

func (SkillReadResponseSource) IsKnown added in v0.18.0

func (r SkillReadResponseSource) IsKnown() bool

type SkillResolveParams added in v0.5.0

type SkillResolveParams struct {
	// Search query string
	Q param.Field[string] `query:"q" api:"required"`
	// Maximum number of results to return (1-20)
	Limit param.Field[int64] `query:"limit"`
}

func (SkillResolveParams) URLQuery added in v0.5.0

func (r SkillResolveParams) URLQuery() (v url.Values)

URLQuery serializes SkillResolveParams's query parameters as `url.Values`.

type SkillResolveResponse added in v0.5.0

type SkillResolveResponse struct {
	// Search methods used (text, tag, semantic)
	MethodsUsed []string                     `json:"methods_used"`
	Results     []SkillResolveResponseResult `json:"results"`
	JSON        skillResolveResponseJSON     `json:"-"`
}

func (*SkillResolveResponse) UnmarshalJSON added in v0.5.0

func (r *SkillResolveResponse) UnmarshalJSON(data []byte) (err error)

type SkillResolveResponseResult added in v0.5.0

type SkillResolveResponseResult struct {
	// Skill name
	Name string `json:"name"`
	// Relevance score
	Score float64 `json:"score"`
	// Unique skill identifier
	Slug string `json:"slug"`
	// Whether the skill is curated or org-custom
	Source SkillResolveResponseResultsSource `json:"source"`
	// Brief skill description
	Summary string `json:"summary"`
	// Skill tags
	Tags []string                       `json:"tags"`
	JSON skillResolveResponseResultJSON `json:"-"`
}

func (*SkillResolveResponseResult) UnmarshalJSON added in v0.5.0

func (r *SkillResolveResponseResult) UnmarshalJSON(data []byte) (err error)

type SkillResolveResponseResultsSource added in v0.18.0

type SkillResolveResponseResultsSource string

Whether the skill is curated or org-custom

const (
	SkillResolveResponseResultsSourceCurated SkillResolveResponseResultsSource = "curated"
	SkillResolveResponseResultsSourceCustom  SkillResolveResponseResultsSource = "custom"
)

func (SkillResolveResponseResultsSource) IsKnown added in v0.18.0

type SkillService added in v0.5.0

type SkillService struct {
	Options []option.RequestOption
	// Search and read legal AI skills for agents
	Custom *SkillCustomService
}

Search and read legal AI skills for agents

SkillService 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 NewSkillService method instead.

func NewSkillService added in v0.5.0

func NewSkillService(opts ...option.RequestOption) (r *SkillService)

NewSkillService 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 (*SkillService) Delete added in v0.18.0

func (r *SkillService) Delete(ctx context.Context, slug string, opts ...option.RequestOption) (res *SkillDeleteResponse, err error)

Soft-delete an org-scoped custom skill by slug. The skill will no longer appear in search results.

func (*SkillService) Export added in v0.56.0

func (r *SkillService) Export(ctx context.Context, slug string, query SkillExportParams, opts ...option.RequestOption) (res *SkillExportResponse, err error)

Export a skill as an installable filesystem tree for sandbox runtimes. Authenticated org-scoped custom skills are resolved before curated skills.

func (*SkillService) New added in v0.18.0

func (r *SkillService) New(ctx context.Context, body SkillNewParams, opts ...option.RequestOption) (res *SkillNewResponse, err error)

Create an org-scoped custom skill. The skill will be searchable via /skills/resolve alongside curated skills.

func (*SkillService) Read added in v0.5.0

func (r *SkillService) Read(ctx context.Context, slug string, opts ...option.RequestOption) (res *SkillReadResponse, err error)

Read the full content of a legal skill by its slug. Returns markdown content, tags, and metadata.

func (*SkillService) Resolve added in v0.5.0

func (r *SkillService) Resolve(ctx context.Context, query SkillResolveParams, opts ...option.RequestOption) (res *SkillResolveResponse, err error)

Search the Legal Skills Store using hybrid search (text + tag + semantic). Returns ranked results with relevance scores.

func (*SkillService) Update added in v0.18.0

func (r *SkillService) Update(ctx context.Context, slug string, body SkillUpdateParams, opts ...option.RequestOption) (res *SkillUpdateResponse, err error)

Update an org-scoped custom skill by slug. Only provided fields are updated. Version is auto-incremented.

type SkillUpdateParams added in v0.18.0

type SkillUpdateParams struct {
	Content param.Field[string] `json:"content"`
	// Optional replacement companion file tree. Omit to leave existing bundled files
	// unchanged; send [] to remove bundled files.
	Files    param.Field[[]SkillUpdateParamsFile] `json:"files"`
	Metadata param.Field[interface{}]             `json:"metadata"`
	Name     param.Field[string]                  `json:"name"`
	// New slug (renames the skill)
	Slug    param.Field[string]   `json:"slug"`
	Summary param.Field[string]   `json:"summary"`
	Tags    param.Field[[]string] `json:"tags"`
}

func (SkillUpdateParams) MarshalJSON added in v0.18.0

func (r SkillUpdateParams) MarshalJSON() (data []byte, err error)

type SkillUpdateParamsFile added in v0.56.0

type SkillUpdateParamsFile struct {
	Content     param.Field[string]      `json:"content" api:"required"`
	Path        param.Field[string]      `json:"path" api:"required"`
	ContentType param.Field[string]      `json:"contentType"`
	Metadata    param.Field[interface{}] `json:"metadata"`
	Name        param.Field[string]      `json:"name"`
	Summary     param.Field[string]      `json:"summary"`
	Tags        param.Field[[]string]    `json:"tags"`
}

func (SkillUpdateParamsFile) MarshalJSON added in v0.56.0

func (r SkillUpdateParamsFile) MarshalJSON() (data []byte, err error)

type SkillUpdateResponse added in v0.18.0

type SkillUpdateResponse struct {
	Bundle    interface{}             `json:"bundle" api:"nullable"`
	Content   string                  `json:"content"`
	Metadata  interface{}             `json:"metadata"`
	Name      string                  `json:"name"`
	Slug      string                  `json:"slug"`
	Summary   string                  `json:"summary" api:"nullable"`
	Tags      []string                `json:"tags"`
	UpdatedAt time.Time               `json:"updated_at" format:"date-time"`
	Version   int64                   `json:"version"`
	JSON      skillUpdateResponseJSON `json:"-"`
}

func (*SkillUpdateResponse) UnmarshalJSON added in v0.18.0

func (r *SkillUpdateResponse) UnmarshalJSON(data []byte) (err error)

type SystemListServicesResponse

type SystemListServicesResponse struct {
	Services []SystemListServicesResponseService `json:"services" api:"required"`
	JSON     systemListServicesResponseJSON      `json:"-"`
}

func (*SystemListServicesResponse) UnmarshalJSON

func (r *SystemListServicesResponse) UnmarshalJSON(data []byte) (err error)

type SystemListServicesResponseService

type SystemListServicesResponseService struct {
	ID          string                                `json:"id" api:"required"`
	Description string                                `json:"description" api:"required"`
	Href        string                                `json:"href" api:"required"`
	Icon        string                                `json:"icon" api:"required"`
	Name        string                                `json:"name" api:"required"`
	Order       int64                                 `json:"order" api:"required"`
	JSON        systemListServicesResponseServiceJSON `json:"-"`
}

func (*SystemListServicesResponseService) UnmarshalJSON

func (r *SystemListServicesResponseService) UnmarshalJSON(data []byte) (err error)

type SystemService

type SystemService struct {
	Options []option.RequestOption
}

Public system metadata and discovery endpoints

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
	// Language detection and translation for multilingual legal workflows
	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" api:"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

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
}

Language detection and translation for multilingual legal workflows

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

Detect the language of text. Returns the most likely language code and confidence score. Supports batch detection for multiple texts.

func (*TranslateV1Service) ListLanguages

Get the list of languages supported for translation. Optionally specify a target language to get translated language names.

func (*TranslateV1Service) Translate

Translate text between languages using Google Cloud Translation API. Supports 100+ languages, automatic language detection, HTML preservation, and batch translation.

func (*TranslateV1Service) TranslateDocument added in v0.57.0

func (r *TranslateV1Service) TranslateDocument(ctx context.Context, body TranslateV1TranslateDocumentParams, opts ...option.RequestOption) (res *http.Response, err error)

Translate one TXT, DOCX, or searchable PDF document. DOCX and PDF translations preserve the source document format and retain as much layout and formatting as possible.

type TranslateV1TranslateDocumentParams added in v0.57.0

type TranslateV1TranslateDocumentParams struct {
	// TXT, DOCX, or searchable PDF document (max 20MB)
	File param.Field[io.Reader] `json:"file" api:"required" format:"binary"`
	// Target BCP-47 language code
	Target param.Field[string] `json:"target" api:"required"`
	// Optional source BCP-47 language code. Auto-detected when omitted.
	Source param.Field[string] `json:"source"`
}

func (TranslateV1TranslateDocumentParams) MarshalMultipart added in v0.57.0

func (r TranslateV1TranslateDocumentParams) MarshalMultipart() (data []byte, contentType string, err error)

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" api:"required"`
	// Target language code (ISO 639-1)
	Target param.Field[string] `json:"target" api:"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

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

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 UsageService added in v0.29.0

type UsageService struct {
	Options []option.RequestOption
	// Usage reporting and webhook subscriptions
	V1 *UsageV1Service
}

UsageService 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 NewUsageService method instead.

func NewUsageService added in v0.29.0

func NewUsageService(opts ...option.RequestOption) (r *UsageService)

NewUsageService 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 UsageV1GetParams added in v0.29.0

type UsageV1GetParams struct {
	// Whether to return period totals only or include daily buckets.
	Granularity param.Field[UsageV1GetParamsGranularity] `query:"granularity"`
	// Optionally include usage groups keyed by native Linc session id. Only
	// Linc-session-attributable usage is grouped.
	GroupBy param.Field[UsageV1GetParamsGroupBy] `query:"groupBy"`
	// Restrict usage to a native Linc session. The session must belong to the
	// authenticated organization.
	LincSessionID param.Field[string] `query:"lincSessionId"`
	// Period end date. Defaults to now.
	PeriodEnd param.Field[time.Time] `query:"periodEnd" format:"date-time"`
	// Period start date. Defaults to the start of the current calendar month.
	PeriodStart param.Field[time.Time] `query:"periodStart" format:"date-time"`
}

func (UsageV1GetParams) URLQuery added in v0.29.0

func (r UsageV1GetParams) URLQuery() (v url.Values)

URLQuery serializes UsageV1GetParams's query parameters as `url.Values`.

type UsageV1GetParamsGranularity added in v0.29.0

type UsageV1GetParamsGranularity string

Whether to return period totals only or include daily buckets.

const (
	UsageV1GetParamsGranularitySummary UsageV1GetParamsGranularity = "summary"
	UsageV1GetParamsGranularityDaily   UsageV1GetParamsGranularity = "daily"
)

func (UsageV1GetParamsGranularity) IsKnown added in v0.29.0

func (r UsageV1GetParamsGranularity) IsKnown() bool

type UsageV1GetParamsGroupBy added in v0.57.0

type UsageV1GetParamsGroupBy string

Optionally include usage groups keyed by native Linc session id. Only Linc-session-attributable usage is grouped.

const (
	UsageV1GetParamsGroupByLincSessionID UsageV1GetParamsGroupBy = "lincSessionId"
)

func (UsageV1GetParamsGroupBy) IsKnown added in v0.57.0

func (r UsageV1GetParamsGroupBy) IsKnown() bool

type UsageV1Service added in v0.29.0

type UsageV1Service struct {
	Options []option.RequestOption
	// Usage reporting and webhook subscriptions
	Subscriptions *UsageV1SubscriptionService
}

Usage reporting and webhook subscriptions

UsageV1Service 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 NewUsageV1Service method instead.

func NewUsageV1Service added in v0.29.0

func NewUsageV1Service(opts ...option.RequestOption) (r *UsageV1Service)

NewUsageV1Service 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 (*UsageV1Service) Get added in v0.29.0

func (r *UsageV1Service) Get(ctx context.Context, query UsageV1GetParams, opts ...option.RequestOption) (err error)

Returns customer-facing usage metrics and costs for the requested period. Supports summary totals and daily buckets for timestamped usage sources. Vault storage is intentionally omitted from totals because it is not yet periodized for arbitrary windows.

type UsageV1SubscriptionNewParams added in v0.29.0

type UsageV1SubscriptionNewParams struct {
	CallbackURL   param.Field[string]   `json:"callbackUrl" api:"required" format:"uri"`
	EventTypes    param.Field[[]string] `json:"eventTypes"`
	SigningSecret param.Field[string]   `json:"signingSecret"`
}

func (UsageV1SubscriptionNewParams) MarshalJSON added in v0.29.0

func (r UsageV1SubscriptionNewParams) MarshalJSON() (data []byte, err error)

type UsageV1SubscriptionService added in v0.29.0

type UsageV1SubscriptionService struct {
	Options []option.RequestOption
}

Usage reporting and webhook subscriptions

UsageV1SubscriptionService 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 NewUsageV1SubscriptionService method instead.

func NewUsageV1SubscriptionService added in v0.29.0

func NewUsageV1SubscriptionService(opts ...option.RequestOption) (r *UsageV1SubscriptionService)

NewUsageV1SubscriptionService 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 (*UsageV1SubscriptionService) Delete added in v0.29.0

func (r *UsageV1SubscriptionService) Delete(ctx context.Context, subscriptionID string, opts ...option.RequestOption) (err error)

Deactivates a usage webhook subscription.

func (*UsageV1SubscriptionService) List added in v0.29.0

Lists webhook subscriptions configured for usage and billing events.

func (*UsageV1SubscriptionService) New added in v0.29.0

Creates a webhook subscription for usage, balance, and billing events.

func (*UsageV1SubscriptionService) Test added in v0.29.0

func (r *UsageV1SubscriptionService) Test(ctx context.Context, subscriptionID string, body UsageV1SubscriptionTestParams, opts ...option.RequestOption) (err error)

Delivers a test event to a single usage webhook subscription using the same payload shape and signing behavior as production delivery.

func (*UsageV1SubscriptionService) Update added in v0.29.0

func (r *UsageV1SubscriptionService) Update(ctx context.Context, subscriptionID string, body UsageV1SubscriptionUpdateParams, opts ...option.RequestOption) (err error)

Updates callback URL, event filters, active state, or signing secret.

type UsageV1SubscriptionTestParams added in v0.29.0

type UsageV1SubscriptionTestParams struct {
	EventType param.Field[string]                 `json:"eventType"`
	Payload   param.Field[map[string]interface{}] `json:"payload"`
}

func (UsageV1SubscriptionTestParams) MarshalJSON added in v0.29.0

func (r UsageV1SubscriptionTestParams) MarshalJSON() (data []byte, err error)

type UsageV1SubscriptionUpdateParams added in v0.29.0

type UsageV1SubscriptionUpdateParams 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"`
	SigningSecret      param.Field[string]   `json:"signingSecret"`
}

func (UsageV1SubscriptionUpdateParams) MarshalJSON added in v0.29.0

func (r UsageV1SubscriptionUpdateParams) MarshalJSON() (data []byte, err error)

type VaultConfirmUploadParams

type VaultConfirmUploadParams struct {
	// Whether the upload succeeded
	Success param.Field[bool] `json:"success" api:"required"`
	// When true and the object was uploaded with auto_index, trigger ingestion
	// immediately after a successful confirmation (no separate ingest call needed).
	// The ingest outcome is reported in the `ingest` response field; an ingest failure
	// does not fail the confirmation.
	AutoIngest param.Field[bool] `json:"autoIngest"`
	// Client-side error code. Required when success=false.
	ErrorCode param.Field[string] `json:"errorCode"`
	// Client-side error message. Required when success=false.
	ErrorMessage param.Field[string] `json:"errorMessage"`
	// S3 ETag for the uploaded object (optional if client cannot access ETag header).
	// Only meaningful when success=true.
	Etag param.Field[string] `json:"etag"`
	// Uploaded file size in bytes. Required when success=true.
	SizeBytes param.Field[int64] `json:"sizeBytes"`
}

func (VaultConfirmUploadParams) MarshalJSON

func (r VaultConfirmUploadParams) MarshalJSON() (data []byte, err error)

type VaultConfirmUploadResponse

type VaultConfirmUploadResponse struct {
	AlreadyConfirmed bool `json:"alreadyConfirmed"`
	// Present when autoIngest was requested on a successful confirmation
	Ingest   VaultConfirmUploadResponseIngest `json:"ingest"`
	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 VaultConfirmUploadResponseIngest added in v0.57.0

type VaultConfirmUploadResponseIngest struct {
	Error      string                               `json:"error"`
	Triggered  bool                                 `json:"triggered"`
	WorkflowID string                               `json:"workflowId" api:"nullable"`
	JSON       vaultConfirmUploadResponseIngestJSON `json:"-"`
}

Present when autoIngest was requested on a successful confirmation

func (*VaultConfirmUploadResponseIngest) UnmarshalJSON added in v0.57.0

func (r *VaultConfirmUploadResponseIngest) UnmarshalJSON(data []byte) (err error)

type VaultConfirmUploadResponseStatus

type VaultConfirmUploadResponseStatus string
const (
	VaultConfirmUploadResponseStatusCompleted VaultConfirmUploadResponseStatus = "completed"
	VaultConfirmUploadResponseStatusFailed    VaultConfirmUploadResponseStatus = "failed"
)

func (VaultConfirmUploadResponseStatus) IsKnown

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
	// Vault-scoped event subscriptions and delivery testing
	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 {
	// Webhook endpoint URL that will receive vault event deliveries
	CallbackURL param.Field[string] `json:"callbackUrl" api:"required" format:"uri"`
	// Vault event types to deliver. Omit to receive the default supported set.
	EventTypes param.Field[[]string] `json:"eventTypes"`
	// Vault object IDs to limit notifications to. Omit to receive events for all
	// objects in the vault.
	ObjectIDs param.Field[[]string] `json:"objectIds"`
	// Optional secret used to sign outbound webhook deliveries
	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
}

Vault-scoped event subscriptions and delivery testing

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

Lists webhook subscriptions configured for a vault.

func (*VaultEventSubscriptionService) New

Creates a webhook subscription for vault lifecycle events. Optional object filters can limit notifications to specific vault objects.

func (*VaultEventSubscriptionService) Test

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

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 {
	// Updated webhook endpoint URL for deliveries
	CallbackURL param.Field[string] `json:"callbackUrl" format:"uri"`
	// Whether to remove the existing signing secret
	ClearSigningSecret param.Field[bool] `json:"clearSigningSecret"`
	// Updated event types to deliver for this subscription
	EventTypes param.Field[[]string] `json:"eventTypes"`
	// Whether the subscription should continue delivering events
	IsActive param.Field[bool] `json:"isActive"`
	// Updated vault object IDs to limit notifications to. Pass an empty array to
	// remove the filter.
	ObjectIDs param.Field[[]string] `json:"objectIds"`
	// Replacement secret used to sign webhook deliveries
	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" api:"required"`
	// Vault creation timestamp
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	// S3 bucket for document storage
	FilesBucket string `json:"filesBucket" api:"required"`
	// Vault name
	Name string `json:"name" api:"required"`
	// AWS region
	Region string `json:"region" api:"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" api:"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 VaultGroupNewParams added in v0.14.0

type VaultGroupNewParams struct {
	// Human-readable name for the vault group
	Name param.Field[string] `json:"name" api:"required"`
	// Optional description of the vault group purpose
	Description param.Field[string] `json:"description"`
}

func (VaultGroupNewParams) MarshalJSON added in v0.14.0

func (r VaultGroupNewParams) MarshalJSON() (data []byte, err error)

type VaultGroupService

type VaultGroupService struct {
	Options []option.RequestOption
}

Secure document storage with semantic search and GraphRAG

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)

Soft-deletes a vault group that no longer has any active vaults assigned. This operation is blocked when the group still contains vaults.

func (*VaultGroupService) List

func (r *VaultGroupService) List(ctx context.Context, opts ...option.RequestOption) (err error)

Lists vault groups visible to the authenticated organization. Group-scoped API keys only receive groups within their allowed scope.

func (*VaultGroupService) New

Creates a vault group for organizing vaults and applying group-scoped access controls. Group-scoped API keys cannot create or manage vault groups.

func (*VaultGroupService) Update

func (r *VaultGroupService) Update(ctx context.Context, groupID string, body VaultGroupUpdateParams, opts ...option.RequestOption) (err error)

Updates a vault group for the authenticated organization. Only provided fields are changed, and setting description to null removes the current description.

type VaultGroupUpdateParams added in v0.14.0

type VaultGroupUpdateParams struct {
	// Updated vault group description. Pass null to remove the current description.
	Description param.Field[string] `json:"description"`
	// New human-readable name for the vault group
	Name param.Field[string] `json:"name"`
}

func (VaultGroupUpdateParams) MarshalJSON added in v0.14.0

func (r VaultGroupUpdateParams) MarshalJSON() (data []byte, err error)

type VaultIngestResponse

type VaultIngestResponse struct {
	// Always false; retained for response compatibility
	EnableGraphRag bool `json:"enableGraphRAG" api:"required"`
	// Human-readable status message
	Message string `json:"message" api:"required"`
	// ID of the vault object being processed
	ObjectID string `json:"objectId" api:"required"`
	// Current ingestion status. 'stored' for file types without text extraction (no
	// chunks/vectors created).
	Status VaultIngestResponseStatus `json:"status" api:"required"`
	// Workflow run ID for tracking progress. Null for file types that skip processing.
	WorkflowID string                  `json:"workflowId" api:"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 VaultMemoryListResponse added in v0.25.0

type VaultMemoryListResponse struct {
	Entries []VaultMemoryListResponseEntry `json:"entries"`
	Meta    VaultMemoryListResponseMeta    `json:"meta"`
	JSON    vaultMemoryListResponseJSON    `json:"-"`
}

func (*VaultMemoryListResponse) UnmarshalJSON added in v0.25.0

func (r *VaultMemoryListResponse) UnmarshalJSON(data []byte) (err error)

type VaultMemoryListResponseEntry added in v0.25.0

type VaultMemoryListResponseEntry struct {
	ID        string                           `json:"id"`
	Content   string                           `json:"content"`
	CreatedAt time.Time                        `json:"created_at" format:"date-time"`
	CreatedBy string                           `json:"created_by" api:"nullable"`
	Source    string                           `json:"source" api:"nullable"`
	Tags      []string                         `json:"tags"`
	Type      string                           `json:"type"`
	UpdatedAt time.Time                        `json:"updated_at" format:"date-time"`
	JSON      vaultMemoryListResponseEntryJSON `json:"-"`
}

func (*VaultMemoryListResponseEntry) UnmarshalJSON added in v0.25.0

func (r *VaultMemoryListResponseEntry) UnmarshalJSON(data []byte) (err error)

type VaultMemoryListResponseMeta added in v0.25.0

type VaultMemoryListResponseMeta struct {
	Chars     int64                           `json:"chars"`
	Count     int64                           `json:"count"`
	MaxChars  int64                           `json:"max_chars"`
	UpdatedAt time.Time                       `json:"updated_at" api:"nullable" format:"date-time"`
	JSON      vaultMemoryListResponseMetaJSON `json:"-"`
}

func (*VaultMemoryListResponseMeta) UnmarshalJSON added in v0.25.0

func (r *VaultMemoryListResponseMeta) UnmarshalJSON(data []byte) (err error)

type VaultMemoryNewParams added in v0.25.0

type VaultMemoryNewParams struct {
	Content param.Field[string]                   `json:"content" api:"required"`
	Type    param.Field[VaultMemoryNewParamsType] `json:"type" api:"required"`
	Source  param.Field[string]                   `json:"source"`
	Tags    param.Field[[]string]                 `json:"tags"`
}

func (VaultMemoryNewParams) MarshalJSON added in v0.25.0

func (r VaultMemoryNewParams) MarshalJSON() (data []byte, err error)

type VaultMemoryNewParamsType added in v0.25.0

type VaultMemoryNewParamsType string
const (
	VaultMemoryNewParamsTypeFact       VaultMemoryNewParamsType = "fact"
	VaultMemoryNewParamsTypeParty      VaultMemoryNewParamsType = "party"
	VaultMemoryNewParamsTypeIssue      VaultMemoryNewParamsType = "issue"
	VaultMemoryNewParamsTypeDeadline   VaultMemoryNewParamsType = "deadline"
	VaultMemoryNewParamsTypeDiscovery  VaultMemoryNewParamsType = "discovery"
	VaultMemoryNewParamsTypeCorrection VaultMemoryNewParamsType = "correction"
	VaultMemoryNewParamsTypePreference VaultMemoryNewParamsType = "preference"
)

func (VaultMemoryNewParamsType) IsKnown added in v0.25.0

func (r VaultMemoryNewParamsType) IsKnown() bool

type VaultMemoryNewResponse added in v0.25.0

type VaultMemoryNewResponse struct {
	Entry VaultMemoryNewResponseEntry `json:"entry"`
	JSON  vaultMemoryNewResponseJSON  `json:"-"`
}

func (*VaultMemoryNewResponse) UnmarshalJSON added in v0.25.0

func (r *VaultMemoryNewResponse) UnmarshalJSON(data []byte) (err error)

type VaultMemoryNewResponseEntry added in v0.25.0

type VaultMemoryNewResponseEntry struct {
	ID        string                          `json:"id"`
	Content   string                          `json:"content"`
	CreatedAt time.Time                       `json:"created_at" format:"date-time"`
	CreatedBy string                          `json:"created_by" api:"nullable"`
	Source    string                          `json:"source" api:"nullable"`
	Tags      []string                        `json:"tags"`
	Type      string                          `json:"type"`
	UpdatedAt time.Time                       `json:"updated_at" format:"date-time"`
	JSON      vaultMemoryNewResponseEntryJSON `json:"-"`
}

func (*VaultMemoryNewResponseEntry) UnmarshalJSON added in v0.25.0

func (r *VaultMemoryNewResponseEntry) UnmarshalJSON(data []byte) (err error)

type VaultMemorySearchParams added in v0.25.0

type VaultMemorySearchParams struct {
	Query param.Field[string]   `json:"query" api:"required"`
	Limit param.Field[int64]    `json:"limit"`
	Tags  param.Field[[]string] `json:"tags"`
	Types param.Field[[]string] `json:"types"`
}

func (VaultMemorySearchParams) MarshalJSON added in v0.25.0

func (r VaultMemorySearchParams) MarshalJSON() (data []byte, err error)

type VaultMemorySearchResponse added in v0.25.0

type VaultMemorySearchResponse struct {
	Results []VaultMemorySearchResponseResult `json:"results"`
	JSON    vaultMemorySearchResponseJSON     `json:"-"`
}

func (*VaultMemorySearchResponse) UnmarshalJSON added in v0.25.0

func (r *VaultMemorySearchResponse) UnmarshalJSON(data []byte) (err error)

type VaultMemorySearchResponseResult added in v0.25.0

type VaultMemorySearchResponseResult struct {
	ID        string                              `json:"id"`
	Content   string                              `json:"content"`
	CreatedAt time.Time                           `json:"created_at" format:"date-time"`
	CreatedBy string                              `json:"created_by" api:"nullable"`
	Source    string                              `json:"source" api:"nullable"`
	Tags      []string                            `json:"tags"`
	Type      string                              `json:"type"`
	UpdatedAt time.Time                           `json:"updated_at" format:"date-time"`
	JSON      vaultMemorySearchResponseResultJSON `json:"-"`
}

func (*VaultMemorySearchResponseResult) UnmarshalJSON added in v0.25.0

func (r *VaultMemorySearchResponseResult) UnmarshalJSON(data []byte) (err error)

type VaultMemoryService added in v0.25.0

type VaultMemoryService struct {
	Options []option.RequestOption
}

Vault-scoped persistent memory and semantic retrieval

VaultMemoryService 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 NewVaultMemoryService method instead.

func NewVaultMemoryService added in v0.25.0

func NewVaultMemoryService(opts ...option.RequestOption) (r *VaultMemoryService)

NewVaultMemoryService 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 (*VaultMemoryService) Delete added in v0.25.0

func (r *VaultMemoryService) Delete(ctx context.Context, id string, entryID string, opts ...option.RequestOption) (err error)

Remove a file-backed memory entry from a vault.

func (*VaultMemoryService) List added in v0.25.0

Retrieve file-backed memory entries stored in a vault.

func (*VaultMemoryService) New added in v0.25.0

Append a new file-backed memory entry to a vault.

func (*VaultMemoryService) Search added in v0.25.0

Search file-backed vault memory using simple full-text matching over content and tags.

func (*VaultMemoryService) Update added in v0.25.0

func (r *VaultMemoryService) Update(ctx context.Context, id string, entryID string, body VaultMemoryUpdateParams, opts ...option.RequestOption) (err error)

Rewrite a file-backed vault memory entry with updated content, source, or tags.

type VaultMemoryUpdateParams added in v0.25.0

type VaultMemoryUpdateParams struct {
	Content param.Field[string]   `json:"content"`
	Source  param.Field[string]   `json:"source"`
	Tags    param.Field[[]string] `json:"tags"`
}

func (VaultMemoryUpdateParams) MarshalJSON added in v0.25.0

func (r VaultMemoryUpdateParams) MarshalJSON() (data []byte, err error)

type VaultMultipartAbortParams

type VaultMultipartAbortParams struct {
	// Vault object ID associated with the multipart upload
	ObjectID param.Field[string] `json:"objectId" api:"required"`
	// Multipart upload ID returned when the upload was initialized
	UploadID param.Field[string] `json:"uploadId" api:"required"`
}

func (VaultMultipartAbortParams) MarshalJSON

func (r VaultMultipartAbortParams) MarshalJSON() (data []byte, err error)

type VaultMultipartCompleteParams added in v0.57.0

type VaultMultipartCompleteParams struct {
	ObjectID param.Field[string]                             `json:"objectId" api:"required"`
	Parts    param.Field[[]VaultMultipartCompleteParamsPart] `json:"parts" api:"required"`
	// File size in bytes (default max 16GB). Configure via
	// VAULT_MULTIPART_MAX_FILE_SIZE_BYTES.
	SizeBytes param.Field[int64]  `json:"sizeBytes" api:"required"`
	UploadID  param.Field[string] `json:"uploadId" api:"required"`
}

func (VaultMultipartCompleteParams) MarshalJSON added in v0.57.0

func (r VaultMultipartCompleteParams) MarshalJSON() (data []byte, err error)

type VaultMultipartCompleteParamsPart added in v0.57.0

type VaultMultipartCompleteParamsPart struct {
	Etag       param.Field[string] `json:"etag" api:"required"`
	PartNumber param.Field[int64]  `json:"partNumber" api:"required"`
}

func (VaultMultipartCompleteParamsPart) MarshalJSON added in v0.57.0

func (r VaultMultipartCompleteParamsPart) MarshalJSON() (data []byte, err error)

type VaultMultipartGetPartURLsParams

type VaultMultipartGetPartURLsParams struct {
	// Vault object ID associated with the multipart upload
	ObjectID param.Field[string] `json:"objectId" api:"required"`
	// Multipart parts that need presigned upload URLs
	Parts param.Field[[]VaultMultipartGetPartURLsParamsPart] `json:"parts" api:"required"`
	// Multipart upload ID returned when the upload was initialized
	UploadID param.Field[string] `json:"uploadId" api:"required"`
}

func (VaultMultipartGetPartURLsParams) MarshalJSON

func (r VaultMultipartGetPartURLsParams) MarshalJSON() (data []byte, err error)

type VaultMultipartGetPartURLsParamsPart

type VaultMultipartGetPartURLsParamsPart struct {
	// 1-based multipart part number
	PartNumber param.Field[int64] `json:"partNumber" api:"required"`
	// Part size in bytes (min 5MB except final part, max 5GB).
	SizeBytes param.Field[int64] `json:"sizeBytes" api:"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 VaultMultipartInitParams added in v0.57.0

type VaultMultipartInitParams struct {
	// MIME type of the file
	ContentType param.Field[string] `json:"contentType" api:"required"`
	// Name of the file to upload
	Filename param.Field[string] `json:"filename" api:"required"`
	// File size in bytes (required, default max 16GB). Configure via
	// VAULT_MULTIPART_MAX_FILE_SIZE_BYTES.
	SizeBytes param.Field[int64] `json:"sizeBytes" api:"required"`
	// Whether to automatically process and index the file for search
	AutoIndex param.Field[bool] `json:"auto_index"`
	// Marks the file as AI-generated work product (e.g. uploaded by an agent) rather
	// than a user-provided source document. Persisted on the object and returned by
	// object listings so clients can distinguish provenance.
	IsAIGenerated param.Field[bool] `json:"is_ai_generated"`
	// Additional metadata to associate with the file
	Metadata param.Field[interface{}] `json:"metadata"`
	// Multipart part size in bytes (min 5MB, max 5GB). Defaults to 64MB.
	PartSizeBytes param.Field[int64] `json:"partSizeBytes"`
	// Optional folder path for hierarchy preservation
	Path param.Field[string] `json:"path"`
}

func (VaultMultipartInitParams) MarshalJSON added in v0.57.0

func (r VaultMultipartInitParams) MarshalJSON() (data []byte, err error)

type VaultMultipartInitResponse added in v0.57.0

type VaultMultipartInitResponse struct {
	NextStep      string                         `json:"next_step"`
	ObjectID      string                         `json:"objectId"`
	PartCount     int64                          `json:"partCount"`
	PartSizeBytes int64                          `json:"partSizeBytes"`
	S3Key         string                         `json:"s3Key"`
	UploadID      string                         `json:"uploadId"`
	JSON          vaultMultipartInitResponseJSON `json:"-"`
}

func (*VaultMultipartInitResponse) UnmarshalJSON added in v0.57.0

func (r *VaultMultipartInitResponse) UnmarshalJSON(data []byte) (err error)

type VaultMultipartService

type VaultMultipartService struct {
	Options []option.RequestOption
}

Secure document storage with semantic search and GraphRAG

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

Abort a multipart upload and discard uploaded parts (live).

func (*VaultMultipartService) Complete added in v0.57.0

Complete a multipart upload by providing the list of part numbers and ETags (live). Single PUT uploads are capped at 5GB; multipart default max is 16GB (configurable).

func (*VaultMultipartService) GetPartURLs

Generate presigned URLs for individual multipart upload parts (live).

func (*VaultMultipartService) Init added in v0.57.0

Initiate a multipart upload for large files (>5GB). Single PUT uploads are capped at 5GB; multipart default max is 16GB (configurable). Multipart uploads are supported in production. Returns an uploadId and object metadata. Use part URLs endpoint to upload parts and complete endpoint to finalize.

type VaultNewParams

type VaultNewParams struct {
	// Display name for the vault
	Name param.Field[string] `json:"name" api:"required"`
	// Optional description of the vault's purpose
	Description param.Field[string] `json:"description"`
	// Optional embedding model for this vault. Defaults to casemark/embed-v1.
	// Determines the S3 Vectors index dimension and which model is used at both ingest
	// and search time. The vault is locked to this model after creation — use a
	// re-embed flow to change later. Ignored when enableIndexing is false. Note:
	// `casemark/llama-nemotron-embed-vl-1b-v2` is a deprecated alias for
	// `casemark/embed-v1` (retained for SDK backward compatibility); new integrations
	// should use `casemark/embed-v1` directly.
	EmbeddingModel param.Field[VaultNewParamsEmbeddingModel] `json:"embeddingModel"`
	// 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 VaultNewParamsEmbeddingModel added in v0.38.0

type VaultNewParamsEmbeddingModel string

Optional embedding model for this vault. Defaults to casemark/embed-v1. Determines the S3 Vectors index dimension and which model is used at both ingest and search time. The vault is locked to this model after creation — use a re-embed flow to change later. Ignored when enableIndexing is false. Note: `casemark/llama-nemotron-embed-vl-1b-v2` is a deprecated alias for `casemark/embed-v1` (retained for SDK backward compatibility); new integrations should use `casemark/embed-v1` directly.

const (
	VaultNewParamsEmbeddingModelOpenAITextEmbedding3Small        VaultNewParamsEmbeddingModel = "openai/text-embedding-3-small"
	VaultNewParamsEmbeddingModelOpenAITextEmbedding3Large        VaultNewParamsEmbeddingModel = "openai/text-embedding-3-large"
	VaultNewParamsEmbeddingModelVoyageVoyage3_5                  VaultNewParamsEmbeddingModel = "voyage/voyage-3.5"
	VaultNewParamsEmbeddingModelVoyageVoyageLaw2                 VaultNewParamsEmbeddingModel = "voyage/voyage-law-2"
	VaultNewParamsEmbeddingModelCohereEmbedV4_0                  VaultNewParamsEmbeddingModel = "cohere/embed-v4.0"
	VaultNewParamsEmbeddingModelGoogleGeminiEmbedding2           VaultNewParamsEmbeddingModel = "google/gemini-embedding-2"
	VaultNewParamsEmbeddingModelCasemarkEmbedV1                  VaultNewParamsEmbeddingModel = "casemark/embed-v1"
	VaultNewParamsEmbeddingModelCasemarkLlamaNemotronEmbedVl1bV2 VaultNewParamsEmbeddingModel = "casemark/llama-nemotron-embed-vl-1b-v2"
)

func (VaultNewParamsEmbeddingModel) IsKnown added in v0.38.0

func (r VaultNewParamsEmbeddingModel) IsKnown() bool

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"`
	// The resolved embedding profile for this vault. Null for storage-only vaults.
	EmbeddingProfile VaultNewResponseEmbeddingProfile `json:"embeddingProfile" api:"nullable"`
	// 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" api:"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" api:"nullable"`
	JSON         vaultNewResponseJSON `json:"-"`
}

func (*VaultNewResponse) UnmarshalJSON

func (r *VaultNewResponse) UnmarshalJSON(data []byte) (err error)

type VaultNewResponseEmbeddingProfile added in v0.38.0

type VaultNewResponseEmbeddingProfile struct {
	// Vector dimension used by this vault
	Dimensions int64 `json:"dimensions"`
	// Embedding model catalog key
	Model string `json:"model"`
	// Embedding provider
	Provider string                               `json:"provider"`
	JSON     vaultNewResponseEmbeddingProfileJSON `json:"-"`
}

The resolved embedding profile for this vault. Null for storage-only vaults.

func (*VaultNewResponseEmbeddingProfile) UnmarshalJSON added in v0.38.0

func (r *VaultNewResponseEmbeddingProfile) UnmarshalJSON(data []byte) (err error)

type VaultObjectAppendParams added in v0.57.0

type VaultObjectAppendParams struct {
	// Vault object IDs whose pages will be appended onto the target object, in order.
	// Must not include the target object itself.
	AppendObjectIDs param.Field[[]string] `json:"appendObjectIds" api:"required"`
	// Adds back links on appended pages
	BackLinks param.Field[bool] `json:"backLinks"`
	// Label text for the back link. Used only when backLinks is true and rendered
	// centered at the bottom of each appended page.
	BackLinksText param.Field[string] `json:"backLinksText"`
	// Optional Bates stamping for appended source PDFs. Numbering is deterministic
	// across appendObjectIds order and does not stamp the target report pages.
	Bates param.Field[VaultObjectAppendParamsBates] `json:"bates"`
	// When true, rewrites links in the target object to internal PDF jumps when the
	// URL contains exactly one appended object ID as a standalone query parameter
	// value or decoded path segment.
	RewriteLinks param.Field[bool] `json:"rewriteLinks"`
}

func (VaultObjectAppendParams) MarshalJSON added in v0.57.0

func (r VaultObjectAppendParams) MarshalJSON() (data []byte, err error)

type VaultObjectAppendParamsBates added in v0.57.0

type VaultObjectAppendParamsBates struct {
	Enabled param.Field[bool]   `json:"enabled"`
	PadTo   param.Field[int64]  `json:"padTo"`
	Prefix  param.Field[string] `json:"prefix"`
	Start   param.Field[int64]  `json:"start"`
	Suffix  param.Field[string] `json:"suffix"`
}

Optional Bates stamping for appended source PDFs. Numbering is deterministic across appendObjectIds order and does not stamp the target report pages.

func (VaultObjectAppendParamsBates) MarshalJSON added in v0.57.0

func (r VaultObjectAppendParamsBates) MarshalJSON() (data []byte, err error)

type VaultObjectAppendResponse added in v0.57.0

type VaultObjectAppendResponse struct {
	ID              string                        `json:"id"`
	Bates           interface{}                   `json:"bates"`
	Checksum        string                        `json:"checksum"`
	ContentType     string                        `json:"contentType"`
	CreatedAt       time.Time                     `json:"createdAt" format:"date-time"`
	DownloadURL     string                        `json:"downloadUrl"`
	ExpiresIn       int64                         `json:"expiresIn"`
	Filename        string                        `json:"filename"`
	IngestionStatus string                        `json:"ingestionStatus"`
	Metadata        interface{}                   `json:"metadata"`
	ObjectID        string                        `json:"objectId"`
	PageCount       int64                         `json:"pageCount"`
	SizeBytes       int64                         `json:"sizeBytes"`
	VaultID         string                        `json:"vaultId"`
	JSON            vaultObjectAppendResponseJSON `json:"-"`
}

func (*VaultObjectAppendResponse) UnmarshalJSON added in v0.57.0

func (r *VaultObjectAppendResponse) 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 VaultObjectGetChunksParams added in v0.36.0

type VaultObjectGetChunksParams struct {
	// The last chunk index to return (inclusive). If omitted, only the `start` chunk
	// is returned. Ranges are limited to 10 chunks.
	End param.Field[int64] `query:"end"`
	// The first chunk index to return (0-based). Defaults to 0.
	Start param.Field[int64] `query:"start"`
}

func (VaultObjectGetChunksParams) URLQuery added in v0.36.0

func (r VaultObjectGetChunksParams) URLQuery() (v url.Values)

URLQuery serializes VaultObjectGetChunksParams's query parameters as `url.Values`.

type VaultObjectGetChunksResponse added in v0.36.0

type VaultObjectGetChunksResponse struct {
	// Full chunk objects for the requested range
	Chunks []VaultObjectGetChunksResponseChunk `json:"chunks" api:"required"`
	// The object ID
	ObjectID string `json:"object_id" api:"required"`
	// Total number of chunks stored for the object
	TotalChunks int64 `json:"total_chunks" api:"required"`
	// The vault ID
	VaultID string                           `json:"vault_id" api:"required"`
	JSON    vaultObjectGetChunksResponseJSON `json:"-"`
}

func (*VaultObjectGetChunksResponse) UnmarshalJSON added in v0.36.0

func (r *VaultObjectGetChunksResponse) UnmarshalJSON(data []byte) (err error)

type VaultObjectGetChunksResponseChunk added in v0.36.0

type VaultObjectGetChunksResponseChunk struct {
	// Chunk index within the document
	Index int64 `json:"index" api:"required"`
	// Last page covered by the chunk, if page mapping is available
	PageEnd int64 `json:"page_end" api:"required,nullable"`
	// First page covered by the chunk, if page mapping is available
	PageStart int64 `json:"page_start" api:"required,nullable"`
	// Full text for the chunk
	Text string `json:"text" api:"required"`
	// Last OCR word index covered by the chunk, if available
	WordEndIndex int64 `json:"word_end_index" api:"required,nullable"`
	// First OCR word index covered by the chunk, if available
	WordStartIndex int64 `json:"word_start_index" api:"required,nullable"`
	// Source media timestamp for the last word in the chunk. Present only for
	// media-backed transcripts with real word timing.
	EndMs int64 `json:"end_ms"`
	// Source media timestamp for the first word in the chunk. Present only for
	// media-backed transcripts with real word timing.
	StartMs int64                                 `json:"start_ms"`
	JSON    vaultObjectGetChunksResponseChunkJSON `json:"-"`
}

func (*VaultObjectGetChunksResponseChunk) UnmarshalJSON added in v0.36.0

func (r *VaultObjectGetChunksResponseChunk) 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" api:"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 VaultObjectGetPagesParams added in v0.49.0

type VaultObjectGetPagesParams struct {
	// Last page to return (inclusive, 1-indexed). If omitted, returns through the last
	// page with text.
	End param.Field[int64] `query:"end"`
	// First page to return (inclusive, 1-indexed). If omitted, starts at the first
	// page with text.
	Start param.Field[int64] `query:"start"`
}

func (VaultObjectGetPagesParams) URLQuery added in v0.49.0

func (r VaultObjectGetPagesParams) URLQuery() (v url.Values)

URLQuery serializes VaultObjectGetPagesParams's query parameters as `url.Values`.

type VaultObjectGetPagesResponse added in v0.49.0

type VaultObjectGetPagesResponse struct {
	Metadata VaultObjectGetPagesResponseMetadata `json:"metadata" api:"required"`
	// Per-page OCR text in ascending page order
	Pages []VaultObjectGetPagesResponsePage `json:"pages" api:"required"`
	JSON  vaultObjectGetPagesResponseJSON   `json:"-"`
}

func (*VaultObjectGetPagesResponse) UnmarshalJSON added in v0.49.0

func (r *VaultObjectGetPagesResponse) UnmarshalJSON(data []byte) (err error)

type VaultObjectGetPagesResponseMetadata added in v0.49.0

type VaultObjectGetPagesResponseMetadata struct {
	Filename string `json:"filename" api:"required"`
	ObjectID string `json:"object_id" api:"required"`
	// Total number of pages with extracted text in the document
	PageCount int64 `json:"page_count" api:"required"`
	// Number of pages returned after applying the range filter
	ReturnedPages int64 `json:"returned_pages" api:"required"`
	// Where the page text came from. `ocr` for PDFs (per-page OCR sidecar). `txt` for
	// plain-text files split on form-feed (\f) characters.
	Source  VaultObjectGetPagesResponseMetadataSource `json:"source" api:"required"`
	VaultID string                                    `json:"vault_id" api:"required"`
	// Echoes the end query param if provided
	End int64 `json:"end" api:"nullable"`
	// Echoes the start query param if provided
	Start int64                                   `json:"start" api:"nullable"`
	JSON  vaultObjectGetPagesResponseMetadataJSON `json:"-"`
}

func (*VaultObjectGetPagesResponseMetadata) UnmarshalJSON added in v0.49.0

func (r *VaultObjectGetPagesResponseMetadata) UnmarshalJSON(data []byte) (err error)

type VaultObjectGetPagesResponseMetadataSource added in v0.49.0

type VaultObjectGetPagesResponseMetadataSource string

Where the page text came from. `ocr` for PDFs (per-page OCR sidecar). `txt` for plain-text files split on form-feed (\f) characters.

const (
	VaultObjectGetPagesResponseMetadataSourceOcr VaultObjectGetPagesResponseMetadataSource = "ocr"
	VaultObjectGetPagesResponseMetadataSourceTxt VaultObjectGetPagesResponseMetadataSource = "txt"
)

func (VaultObjectGetPagesResponseMetadataSource) IsKnown added in v0.49.0

type VaultObjectGetPagesResponsePage added in v0.49.0

type VaultObjectGetPagesResponsePage struct {
	// Page number (1-indexed)
	Page int64 `json:"page" api:"required"`
	// OCR text for this page
	Text string                              `json:"text" api:"required"`
	JSON vaultObjectGetPagesResponsePageJSON `json:"-"`
}

func (*VaultObjectGetPagesResponsePage) UnmarshalJSON added in v0.49.0

func (r *VaultObjectGetPagesResponsePage) UnmarshalJSON(data []byte) (err error)

type VaultObjectGetResponse

type VaultObjectGetResponse struct {
	// Object ID
	ID string `json:"id" api:"required"`
	// MIME type
	ContentType string `json:"contentType" api:"required"`
	// Upload timestamp
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	// Presigned S3 download URL
	DownloadURL string `json:"downloadUrl" api:"required"`
	// URL expiration time in seconds
	ExpiresIn int64 `json:"expiresIn" api:"required"`
	// Original filename
	Filename string `json:"filename" api:"required"`
	// Processing status (pending, processing, completed, failed)
	IngestionStatus string `json:"ingestionStatus" api:"required"`
	// Vault ID
	VaultID string `json:"vaultId" api:"required"`
	// Number of text chunks created
	ChunkCount int64 `json:"chunkCount"`
	// Error details when ingestion fails
	IngestionError string `json:"ingestionError" api:"nullable"`
	// Whether the file was marked as AI-generated work product at upload time
	IsAIGenerated bool `json:"is_ai_generated"`
	// 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" api:"nullable"`
	// File size in bytes
	SizeBytes int64 `json:"sizeBytes"`
	// Length of extracted text
	TextLength int64 `json:"textLength"`
	// Object ID of the completed transcript (if available)
	TranscriptObjectID string `json:"transcript_object_id" api:"nullable"`
	// Number of embedding vectors generated
	VectorCount int64                      `json:"vectorCount"`
	JSON        vaultObjectGetResponseJSON `json:"-"`
}

func (*VaultObjectGetResponse) UnmarshalJSON

func (r *VaultObjectGetResponse) UnmarshalJSON(data []byte) (err error)

type VaultObjectGetTextResponse

type VaultObjectGetTextResponse struct {
	Metadata VaultObjectGetTextResponseMetadata `json:"metadata" api:"required"`
	// Full concatenated text content from all chunks
	Text string                         `json:"text" api:"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" api:"required"`
	// Original filename of the document
	Filename string `json:"filename" api:"required"`
	// Total character count of the extracted text
	Length int64 `json:"length" api:"required"`
	// The object ID
	ObjectID string `json:"object_id" api:"required"`
	// The vault ID
	VaultID string `json:"vault_id" api:"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 VaultObjectListParams added in v0.57.0

type VaultObjectListParams struct {
	// Include placeholders for uploads that were never completed (awaiting_upload) or
	// were cancelled (aborted). Excluded by default.
	IncludeUnconfirmed param.Field[bool] `query:"includeUnconfirmed"`
}

func (VaultObjectListParams) URLQuery added in v0.57.0

func (r VaultObjectListParams) URLQuery() (v url.Values)

URLQuery serializes VaultObjectListParams's query parameters as `url.Values`.

type VaultObjectListResponse

type VaultObjectListResponse struct {
	// Total number of objects in the vault
	Count   float64                         `json:"count" api:"required"`
	Objects []VaultObjectListResponseObject `json:"objects" api:"required"`
	// The ID of the vault
	VaultID string                      `json:"vaultId" api:"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" api:"required"`
	// MIME type of the document
	ContentType string `json:"contentType" api:"required"`
	// Document upload timestamp
	CreatedAt time.Time `json:"createdAt" api:"required" format:"date-time"`
	// Original filename of the uploaded document
	Filename string `json:"filename" api:"required"`
	// Processing status of the document
	IngestionStatus string `json:"ingestionStatus" api:"required"`
	// Number of text chunks created for vectorization
	ChunkCount float64 `json:"chunkCount"`
	// Processing completion timestamp
	IngestionCompletedAt time.Time `json:"ingestionCompletedAt" format:"date-time"`
	// Failure reason when ingestion status is a failed state
	IngestionError string `json:"ingestionError" api:"nullable"`
	// When ingestion processing began
	IngestionStartedAt time.Time `json:"ingestionStartedAt" api:"nullable" format:"date-time"`
	// Durable workflow run ID for the active or last ingestion attempt
	IngestionWorkflowID string `json:"ingestionWorkflowId" api:"nullable"`
	// Whether the file was marked as AI-generated work product at upload time
	IsAIGenerated bool `json:"is_ai_generated"`
	// 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" api:"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 VaultObjectMergeParams added in v0.57.0

type VaultObjectMergeParams struct {
	// Output PDF filename
	Filename param.Field[string] `json:"filename" api:"required"`
	// Source object IDs in output order
	SourceObjectIDs param.Field[[]string]                              `json:"sourceObjectIds" api:"required"`
	SourceRendition param.Field[VaultObjectMergeParamsSourceRendition] `json:"sourceRendition" api:"required"`
	IdempotencyKey  param.Field[string]                                `header:"Idempotency-Key" api:"required"`
	Bates           param.Field[VaultObjectMergeParamsBates]           `json:"bates"`
	ClientReference param.Field[string]                                `json:"clientReference"`
}

func (VaultObjectMergeParams) MarshalJSON added in v0.57.0

func (r VaultObjectMergeParams) MarshalJSON() (data []byte, err error)

type VaultObjectMergeParamsBates added in v0.57.0

type VaultObjectMergeParamsBates struct {
	PadTo  param.Field[int64]  `json:"padTo"`
	Prefix param.Field[string] `json:"prefix"`
	Start  param.Field[int64]  `json:"start"`
	Suffix param.Field[string] `json:"suffix"`
}

func (VaultObjectMergeParamsBates) MarshalJSON added in v0.57.0

func (r VaultObjectMergeParamsBates) MarshalJSON() (data []byte, err error)

type VaultObjectMergeParamsSourceRendition added in v0.57.0

type VaultObjectMergeParamsSourceRendition string
const (
	VaultObjectMergeParamsSourceRenditionOriginal      VaultObjectMergeParamsSourceRendition = "original"
	VaultObjectMergeParamsSourceRenditionSearchablePdf VaultObjectMergeParamsSourceRendition = "searchable_pdf"
)

func (VaultObjectMergeParamsSourceRendition) IsKnown added in v0.57.0

type VaultObjectMergeResponse added in v0.57.0

type VaultObjectMergeResponse struct {
	ClientReference string                         `json:"clientReference"`
	ObjectID        string                         `json:"objectId"`
	Status          VaultObjectMergeResponseStatus `json:"status"`
	WorkflowID      string                         `json:"workflowId"`
	JSON            vaultObjectMergeResponseJSON   `json:"-"`
}

func (*VaultObjectMergeResponse) UnmarshalJSON added in v0.57.0

func (r *VaultObjectMergeResponse) UnmarshalJSON(data []byte) (err error)

type VaultObjectMergeResponseStatus added in v0.57.0

type VaultObjectMergeResponseStatus string
const (
	VaultObjectMergeResponseStatusProcessing VaultObjectMergeResponseStatus = "processing"
)

func (VaultObjectMergeResponseStatus) IsKnown added in v0.57.0

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

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
}

Vault object management, content access, and document operations

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) Append added in v0.57.0

Merges one or more PDF vault objects onto the end of an existing PDF vault object, overwriting the target in place before returning. Optionally rewrites citation links in the original target into internal PDF jumps and adds back links on appended pages. The target object’s ingestion state is not affected; appended pages are not searchable.

func (*VaultObjectService) Delete

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 by redirecting to a short-lived presigned S3 URL. 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) GetChunks added in v0.36.0

Retrieves full extracted chunk text for a processed vault object. Use this after search when a truncated preview is not enough and you need the exact chunk text or adjacent chunks for surrounding context such as tables, exhibit lists, or multi-part passages.

func (*VaultObjectService) GetOcrWords

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) GetPages added in v0.49.0

Retrieves the raw text of a processed vault object split by page. The object must have completed ingestion before pages can be retrieved — for PDFs this requires the OCR pipeline to have finished writing the per-page sidecar, so freshly uploaded PDFs return 400 with the current `ingestionStatus` until processing completes. For PDFs this returns the per-page OCR text. For plain text files (txt, md, source code, court reporter transcripts) the text is split using right-aligned page-number markers when present (preserving the original document numbering, including continuations like Volume 2 starting at page 234), falling back to form-feed (\f) page-break characters, and finally a single page if neither signal is present. Use the optional `start` and `end` query parameters to fetch a specific inclusive page range. Pages with no text are omitted.

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, page-numbered (--- Page N --- markers) when the source document is paginated. Useful for document review, analysis, or export. The object must have completed processing before text can be retrieved.

func (*VaultObjectService) List

Retrieve all objects stored in a specific vault, including document metadata, ingestion status, and processing statistics.

func (*VaultObjectService) Merge added in v0.57.0

Starts an asynchronous merge that creates a new PDF vault object. Source objects are unchanged. Missing searchable PDF renditions are generated on demand before combining. Completion is reported through vault.object.merge webhooks.

func (*VaultObjectService) NewPresignedURL

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

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" api:"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" api:"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. Hybrid search supports 1 to 50; other
	// methods may support up to 100.
	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"`
	// Source media timestamp for the last word in the chunk. Present only for
	// media-backed transcripts with real word timing.
	EndMs int64 `json:"end_ms"`
	// 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" api:"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" api:"nullable"`
	// Relevance score (deprecated, use distance or hybridScore)
	Score float64 `json:"score"`
	// Source identifier (deprecated, use object_id)
	Source string `json:"source"`
	// Source media timestamp for the first word in the chunk. Present only for
	// media-backed transcripts with real word timing.
	StartMs int64 `json:"start_ms"`
	// 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" api:"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" api:"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
	// Secure document storage with semantic search and GraphRAG
	Groups *VaultGroupService
	// Secure document storage with semantic search and GraphRAG
	Multipart *VaultMultipartService
	// Vault object management, content access, and document operations
	Objects *VaultObjectService
	// Vault-scoped persistent memory and semantic retrieval
	Memory *VaultMemoryService
}

Secure document storage with semantic search and GraphRAG

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. Conditional fields: when success=true, sizeBytes is required; when success=false, errorCode and errorMessage are required. These rules are enforced server-side with specific 400 responses.

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, PPTX, XLSX, TXT, RTF, XML, HTML, Markdown, CSV/TSV, JSON/YAML/TOML, common source code files, ZIP, audio, video), processing happens asynchronously. ZIP archives are unpacked recursively up to 5 levels, and each extracted file is created as an independent vault object and ingested via the normal pipeline. For unsupported types (images, etc.), the file is marked as completed immediately without text extraction.

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, params 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" api:"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" api:"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" api:"required"`
	// Name of the file to upload
	Filename param.Field[string] `json:"filename" api:"required"`
	// Whether to automatically process and index the file for search
	AutoIndex param.Field[bool] `json:"auto_index"`
	// Marks the file as AI-generated work product (e.g. uploaded by an agent) rather
	// than a user-provided source document. Persisted on the object and returned by
	// object listings so clients can distinguish provenance.
	IsAIGenerated param.Field[bool] `json:"is_ai_generated"`
	// 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"`
	IdempotencyKey param.Field[string] `header:"Idempotency-Key"`
}

func (VaultUploadParams) MarshalJSON

func (r VaultUploadParams) MarshalJSON() (data []byte, err error)

type VaultUploadResponse

type VaultUploadResponse struct {
	// True when this idempotency key already identifies a confirmed upload
	AlreadyUploaded bool `json:"alreadyUploaded"`
	// 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" api:"nullable"`
	// Whether the file is marked as AI-generated work product
	IsAIGenerated bool `json:"is_ai_generated"`
	// Next API endpoint to call for processing
	NextStep string `json:"next_step" api:"nullable"`
	// Unique identifier for the uploaded object
	ObjectID string `json:"objectId"`
	// Folder path for hierarchy if provided
	Path string `json:"path" api:"nullable"`
	// S3 object key for the file
	S3Key string `json:"s3Key"`
	// Presigned URL for uploading the file
	UploadURL string                  `json:"uploadUrl" api:"nullable"`
	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 VoiceBoostListExtractParams added in v0.14.0

type VoiceBoostListExtractParams struct {
	// Optional filter for entity categories to extract
	Categories param.Field[[]VoiceBoostListExtractParamsCategory] `json:"categories"`
	// Object IDs of documents to extract entities from (PDFs, text files)
	ObjectIDs param.Field[[]string] `json:"object_ids"`
	// Raw text input for entity extraction (alternative to vault documents)
	Text param.Field[string] `json:"text"`
	// Vault ID containing the source documents (use with object_ids)
	VaultID param.Field[string] `json:"vault_id"`
}

func (VoiceBoostListExtractParams) MarshalJSON added in v0.14.0

func (r VoiceBoostListExtractParams) MarshalJSON() (data []byte, err error)

type VoiceBoostListExtractParamsCategory added in v0.14.0

type VoiceBoostListExtractParamsCategory string
const (
	VoiceBoostListExtractParamsCategoryPerson       VoiceBoostListExtractParamsCategory = "person"
	VoiceBoostListExtractParamsCategoryOrganization VoiceBoostListExtractParamsCategory = "organization"
	VoiceBoostListExtractParamsCategoryLegalTerm    VoiceBoostListExtractParamsCategory = "legal_term"
	VoiceBoostListExtractParamsCategoryMedical      VoiceBoostListExtractParamsCategory = "medical"
	VoiceBoostListExtractParamsCategoryCitation     VoiceBoostListExtractParamsCategory = "citation"
	VoiceBoostListExtractParamsCategoryEmail        VoiceBoostListExtractParamsCategory = "email"
)

func (VoiceBoostListExtractParamsCategory) IsKnown added in v0.14.0

type VoiceBoostListExtractResponse added in v0.14.0

type VoiceBoostListExtractResponse struct {
	Items     []VoiceBoostListExtractResponseItem `json:"items"`
	Source    VoiceBoostListExtractResponseSource `json:"source"`
	SourceIDs []string                            `json:"source_ids"`
	JSON      voiceBoostListExtractResponseJSON   `json:"-"`
}

func (*VoiceBoostListExtractResponse) UnmarshalJSON added in v0.14.0

func (r *VoiceBoostListExtractResponse) UnmarshalJSON(data []byte) (err error)

type VoiceBoostListExtractResponseItem added in v0.14.0

type VoiceBoostListExtractResponseItem struct {
	BoostParam VoiceBoostListExtractResponseItemsBoostParam `json:"boost_param"`
	Category   string                                       `json:"category"`
	Word       string                                       `json:"word"`
	JSON       voiceBoostListExtractResponseItemJSON        `json:"-"`
}

func (*VoiceBoostListExtractResponseItem) UnmarshalJSON added in v0.14.0

func (r *VoiceBoostListExtractResponseItem) UnmarshalJSON(data []byte) (err error)

type VoiceBoostListExtractResponseItemsBoostParam added in v0.14.0

type VoiceBoostListExtractResponseItemsBoostParam string
const (
	VoiceBoostListExtractResponseItemsBoostParamLow     VoiceBoostListExtractResponseItemsBoostParam = "low"
	VoiceBoostListExtractResponseItemsBoostParamDefault VoiceBoostListExtractResponseItemsBoostParam = "default"
	VoiceBoostListExtractResponseItemsBoostParamHigh    VoiceBoostListExtractResponseItemsBoostParam = "high"
)

func (VoiceBoostListExtractResponseItemsBoostParam) IsKnown added in v0.14.0

type VoiceBoostListExtractResponseSource added in v0.14.0

type VoiceBoostListExtractResponseSource string
const (
	VoiceBoostListExtractResponseSourceDocument VoiceBoostListExtractResponseSource = "document"
	VoiceBoostListExtractResponseSourceText     VoiceBoostListExtractResponseSource = "text"
)

func (VoiceBoostListExtractResponseSource) IsKnown added in v0.14.0

type VoiceBoostListGenerateParams added in v0.14.0

type VoiceBoostListGenerateParams struct {
	// Completed pass-1 transcription job ID (tr\_...)
	TranscriptionJobID param.Field[string] `json:"transcription_job_id" api:"required"`
	// Optional filter for entity categories to extract
	Categories param.Field[[]VoiceBoostListGenerateParamsCategory] `json:"categories"`
}

func (VoiceBoostListGenerateParams) MarshalJSON added in v0.14.0

func (r VoiceBoostListGenerateParams) MarshalJSON() (data []byte, err error)

type VoiceBoostListGenerateParamsCategory added in v0.14.0

type VoiceBoostListGenerateParamsCategory string
const (
	VoiceBoostListGenerateParamsCategoryPerson       VoiceBoostListGenerateParamsCategory = "person"
	VoiceBoostListGenerateParamsCategoryOrganization VoiceBoostListGenerateParamsCategory = "organization"
	VoiceBoostListGenerateParamsCategoryLegalTerm    VoiceBoostListGenerateParamsCategory = "legal_term"
	VoiceBoostListGenerateParamsCategoryMedical      VoiceBoostListGenerateParamsCategory = "medical"
	VoiceBoostListGenerateParamsCategoryCitation     VoiceBoostListGenerateParamsCategory = "citation"
	VoiceBoostListGenerateParamsCategoryEmail        VoiceBoostListGenerateParamsCategory = "email"
)

func (VoiceBoostListGenerateParamsCategory) IsKnown added in v0.14.0

type VoiceBoostListGenerateResponse added in v0.14.0

type VoiceBoostListGenerateResponse struct {
	Items     []VoiceBoostListGenerateResponseItem `json:"items"`
	Source    VoiceBoostListGenerateResponseSource `json:"source"`
	SourceIDs []string                             `json:"source_ids"`
	JSON      voiceBoostListGenerateResponseJSON   `json:"-"`
}

func (*VoiceBoostListGenerateResponse) UnmarshalJSON added in v0.14.0

func (r *VoiceBoostListGenerateResponse) UnmarshalJSON(data []byte) (err error)

type VoiceBoostListGenerateResponseItem added in v0.14.0

type VoiceBoostListGenerateResponseItem struct {
	BoostParam VoiceBoostListGenerateResponseItemsBoostParam `json:"boost_param"`
	Category   string                                        `json:"category"`
	Word       string                                        `json:"word"`
	JSON       voiceBoostListGenerateResponseItemJSON        `json:"-"`
}

func (*VoiceBoostListGenerateResponseItem) UnmarshalJSON added in v0.14.0

func (r *VoiceBoostListGenerateResponseItem) UnmarshalJSON(data []byte) (err error)

type VoiceBoostListGenerateResponseItemsBoostParam added in v0.14.0

type VoiceBoostListGenerateResponseItemsBoostParam string
const (
	VoiceBoostListGenerateResponseItemsBoostParamLow     VoiceBoostListGenerateResponseItemsBoostParam = "low"
	VoiceBoostListGenerateResponseItemsBoostParamDefault VoiceBoostListGenerateResponseItemsBoostParam = "default"
	VoiceBoostListGenerateResponseItemsBoostParamHigh    VoiceBoostListGenerateResponseItemsBoostParam = "high"
)

func (VoiceBoostListGenerateResponseItemsBoostParam) IsKnown added in v0.14.0

type VoiceBoostListGenerateResponseSource added in v0.14.0

type VoiceBoostListGenerateResponseSource string
const (
	VoiceBoostListGenerateResponseSourceTranscript VoiceBoostListGenerateResponseSource = "transcript"
)

func (VoiceBoostListGenerateResponseSource) IsKnown added in v0.14.0

type VoiceBoostListService added in v0.14.0

type VoiceBoostListService struct {
	Options []option.RequestOption
}

Audio transcription and text-to-speech

VoiceBoostListService 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 NewVoiceBoostListService method instead.

func NewVoiceBoostListService added in v0.14.0

func NewVoiceBoostListService(opts ...option.RequestOption) (r *VoiceBoostListService)

NewVoiceBoostListService 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 (*VoiceBoostListService) Extract added in v0.14.0

Extracts a categorized word boost list from vault documents or raw text using LLM entity extraction. The resulting list can be passed as `word_boost` to the transcription endpoint for improved accuracy.

func (*VoiceBoostListService) Generate added in v0.14.0

Generates a categorized word boost list from a completed transcription job. Extracts entities from the pass-1 transcript for use as `word_boost` in a second transcription pass.

type VoiceService

type VoiceService struct {
	Options []option.RequestOption
	// Audio transcription and text-to-speech
	Streaming *VoiceStreamingService
	// Audio transcription and text-to-speech
	BoostList *VoiceBoostListService
	// Audio transcription and text-to-speech
	Transcription *VoiceTranscriptionService
	// Audio transcription and text-to-speech
	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
}

Audio transcription and text-to-speech

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

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 VoiceTranscriptionGetParams added in v0.28.0

type VoiceTranscriptionGetParams struct {
	// Include full transcript text in response for vault-based jobs (default: false)
	IncludeText param.Field[VoiceTranscriptionGetParamsIncludeText] `query:"include_text"`
}

func (VoiceTranscriptionGetParams) URLQuery added in v0.28.0

func (r VoiceTranscriptionGetParams) URLQuery() (v url.Values)

URLQuery serializes VoiceTranscriptionGetParams's query parameters as `url.Values`.

type VoiceTranscriptionGetParamsIncludeText added in v0.28.0

type VoiceTranscriptionGetParamsIncludeText string

Include full transcript text in response for vault-based jobs (default: false)

const (
	VoiceTranscriptionGetParamsIncludeTextTrue  VoiceTranscriptionGetParamsIncludeText = "true"
	VoiceTranscriptionGetParamsIncludeTextFalse VoiceTranscriptionGetParamsIncludeText = "false"
)

func (VoiceTranscriptionGetParamsIncludeText) IsKnown added in v0.28.0

type VoiceTranscriptionGetResponse

type VoiceTranscriptionGetResponse struct {
	// Unique transcription job ID
	ID string `json:"id" api:"required"`
	// Current status of the transcription job
	Status VoiceTranscriptionGetResponseStatus `json:"status" api:"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"`
	// Media object submitted to the speech provider. May be an internal audio
	// derivative for large videos.
	InputObjectID string `json:"input_object_id"`
	// Result transcript object ID (vault-based jobs, when completed)
	ResultObjectID string `json:"result_object_id"`
	// Original source media object ID (vault-based jobs only)
	SourceObjectID string `json:"source_object_id"`
	// Full transcription text (only included when include_text=true for vault-based
	// jobs, or for legacy direct URL jobs)
	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"
	VoiceTranscriptionGetResponseStatusPreprocessing VoiceTranscriptionGetResponseStatus = "preprocessing"
	VoiceTranscriptionGetResponseStatusProcessing    VoiceTranscriptionGetResponseStatus = "processing"
	VoiceTranscriptionGetResponseStatusCompleted     VoiceTranscriptionGetResponseStatus = "completed"
	VoiceTranscriptionGetResponseStatusFailed        VoiceTranscriptionGetResponseStatus = "failed"
)

func (VoiceTranscriptionGetResponseStatus) IsKnown

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
	ContentSafety param.Field[bool] `json:"content_safety"`
	// 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

type VoiceTranscriptionNewParamsFormat

type VoiceTranscriptionNewParamsFormat string

Output format for the transcript when using vault mode

const (
	VoiceTranscriptionNewParamsFormatJson VoiceTranscriptionNewParamsFormat = "json"
	VoiceTranscriptionNewParamsFormatText VoiceTranscriptionNewParamsFormat = "text"
)

func (VoiceTranscriptionNewParamsFormat) IsKnown

type VoiceTranscriptionNewResponse

type VoiceTranscriptionNewResponse struct {
	// Unique transcription job ID
	ID string `json:"id"`
	// Object submitted to the speech provider. For large videos, this is an internal
	// audio derivative.
	InputObjectID string `json:"input_object_id"`
	// Original source media 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"
	VoiceTranscriptionNewResponseStatusPreprocessing VoiceTranscriptionNewResponseStatus = "preprocessing"
	VoiceTranscriptionNewResponseStatusProcessing    VoiceTranscriptionNewResponseStatus = "processing"
	VoiceTranscriptionNewResponseStatusCompleted     VoiceTranscriptionNewResponseStatus = "completed"
	VoiceTranscriptionNewResponseStatusError         VoiceTranscriptionNewResponseStatus = "error"
)

func (VoiceTranscriptionNewResponseStatus) IsKnown

type VoiceTranscriptionService

type VoiceTranscriptionService struct {
	Options []option.RequestOption
}

Audio transcription and text-to-speech

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

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

Creates an asynchronous transcription job for audio or video files. Supports two modes:

**Vault-based (recommended)**: Pass `vault_id` and `object_id` to transcribe media from your vault. Large videos are converted to an internal MP3 derivative before transcription while the original video remains the transcript source. The transcript is automatically 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

type VoiceV1ListVoicesParamsVoiceType

type VoiceV1ListVoicesParamsVoiceType string

Filter by voice type

const (
	VoiceV1ListVoicesParamsVoiceTypePremade      VoiceV1ListVoicesParamsVoiceType = "premade"
	VoiceV1ListVoicesParamsVoiceTypeCloned       VoiceV1ListVoicesParamsVoiceType = "cloned"
	VoiceV1ListVoicesParamsVoiceTypeProfessional VoiceV1ListVoicesParamsVoiceType = "professional"
)

func (VoiceV1ListVoicesParamsVoiceType) IsKnown

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
	// Audio transcription and text-to-speech
	Speak *VoiceV1SpeakService
}

Audio transcription and text-to-speech

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

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" api:"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

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
}

Audio transcription and text-to-speech

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

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.

type WebhookService added in v0.42.0

type WebhookService struct {
	Options []option.RequestOption
	V1      *WebhookV1Service
}

WebhookService 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 NewWebhookService method instead.

func NewWebhookService added in v0.42.0

func NewWebhookService(opts ...option.RequestOption) (r *WebhookService)

NewWebhookService 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 WebhookV1DeliveryListParams added in v0.42.0

type WebhookV1DeliveryListParams struct {
	EndpointID param.Field[string]                            `query:"endpoint_id"`
	Limit      param.Field[int64]                             `query:"limit"`
	Status     param.Field[WebhookV1DeliveryListParamsStatus] `query:"status"`
}

func (WebhookV1DeliveryListParams) URLQuery added in v0.42.0

func (r WebhookV1DeliveryListParams) URLQuery() (v url.Values)

URLQuery serializes WebhookV1DeliveryListParams's query parameters as `url.Values`.

type WebhookV1DeliveryListParamsStatus added in v0.42.0

type WebhookV1DeliveryListParamsStatus string
const (
	WebhookV1DeliveryListParamsStatusPending   WebhookV1DeliveryListParamsStatus = "pending"
	WebhookV1DeliveryListParamsStatusDelivered WebhookV1DeliveryListParamsStatus = "delivered"
	WebhookV1DeliveryListParamsStatusFailed    WebhookV1DeliveryListParamsStatus = "failed"
)

func (WebhookV1DeliveryListParamsStatus) IsKnown added in v0.42.0

type WebhookV1DeliveryReplayParams added in v0.42.0

type WebhookV1DeliveryReplayParams struct {
	// Override payload to deliver. Must only be supplied when the delivery record
	// lacks enough context to reconstruct the original event (rare). Defaults to an
	// empty data envelope.
	Payload param.Field[interface{}] `json:"payload"`
}

func (WebhookV1DeliveryReplayParams) MarshalJSON added in v0.42.0

func (r WebhookV1DeliveryReplayParams) MarshalJSON() (data []byte, err error)

type WebhookV1DeliveryService added in v0.42.0

type WebhookV1DeliveryService struct {
	Options []option.RequestOption
}

Webhook endpoint management

WebhookV1DeliveryService 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 NewWebhookV1DeliveryService method instead.

func NewWebhookV1DeliveryService added in v0.42.0

func NewWebhookV1DeliveryService(opts ...option.RequestOption) (r *WebhookV1DeliveryService)

NewWebhookV1DeliveryService 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 (*WebhookV1DeliveryService) Get added in v0.42.0

func (r *WebhookV1DeliveryService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Get webhook delivery

func (*WebhookV1DeliveryService) List added in v0.42.0

Returns delivery attempts for the organization, newest first. Filter by endpoint_id or status to narrow results.

func (*WebhookV1DeliveryService) Replay added in v0.42.0

Re-sends the original event to its endpoint. The payload is reconstructed from the delivery record (same eventId, eventType, and occurred_at). Replay deliveries include a Case.dev replay marker header so receivers can distinguish replays from first-time deliveries. Uses the endpoint's current signing secret — not the one in force at the original delivery time.

type WebhookV1EndpointListParams added in v0.42.0

type WebhookV1EndpointListParams struct {
	Limit param.Field[int64] `query:"limit"`
	// Filter by endpoint status
	Status param.Field[WebhookV1EndpointListParamsStatus] `query:"status"`
}

func (WebhookV1EndpointListParams) URLQuery added in v0.42.0

func (r WebhookV1EndpointListParams) URLQuery() (v url.Values)

URLQuery serializes WebhookV1EndpointListParams's query parameters as `url.Values`.

type WebhookV1EndpointListParamsStatus added in v0.42.0

type WebhookV1EndpointListParamsStatus string

Filter by endpoint status

const (
	WebhookV1EndpointListParamsStatusActive       WebhookV1EndpointListParamsStatus = "active"
	WebhookV1EndpointListParamsStatusDisabled     WebhookV1EndpointListParamsStatus = "disabled"
	WebhookV1EndpointListParamsStatusAutoDisabled WebhookV1EndpointListParamsStatus = "auto_disabled"
)

func (WebhookV1EndpointListParamsStatus) IsKnown added in v0.42.0

type WebhookV1EndpointNewParams added in v0.42.0

type WebhookV1EndpointNewParams struct {
	// Glob patterns of event types to deliver (e.g. "vault._", "ocr.job.completed",
	// "_")
	EventTypeFilters param.Field[[]string] `json:"eventTypeFilters" api:"required"`
	// HTTPS callback URL that will receive event deliveries
	URL param.Field[string] `json:"url" api:"required" format:"uri"`
	// Human-readable label for this endpoint
	Description param.Field[string] `json:"description"`
	// Optional per-resource allowlists. If vaultIds is set, only events for those
	// vaults are delivered. Same for matterIds.
	ResourceScopes param.Field[WebhookV1EndpointNewParamsResourceScopes] `json:"resourceScopes"`
}

func (WebhookV1EndpointNewParams) MarshalJSON added in v0.42.0

func (r WebhookV1EndpointNewParams) MarshalJSON() (data []byte, err error)

type WebhookV1EndpointNewParamsResourceScopes added in v0.42.0

type WebhookV1EndpointNewParamsResourceScopes struct {
	MatterIDs param.Field[[]string] `json:"matterIds"`
	VaultIDs  param.Field[[]string] `json:"vaultIds"`
}

Optional per-resource allowlists. If vaultIds is set, only events for those vaults are delivered. Same for matterIds.

func (WebhookV1EndpointNewParamsResourceScopes) MarshalJSON added in v0.42.0

func (r WebhookV1EndpointNewParamsResourceScopes) MarshalJSON() (data []byte, err error)

type WebhookV1EndpointRotateSecretParams added in v0.42.0

type WebhookV1EndpointRotateSecretParams struct {
	// How long (seconds) the old secret continues to be accepted. 0 invalidates
	// immediately. Default: 86400 (24h).
	PreviousSecretExpiresInSec param.Field[int64] `json:"previousSecretExpiresInSec"`
}

func (WebhookV1EndpointRotateSecretParams) MarshalJSON added in v0.42.0

func (r WebhookV1EndpointRotateSecretParams) MarshalJSON() (data []byte, err error)

type WebhookV1EndpointService added in v0.42.0

type WebhookV1EndpointService struct {
	Options []option.RequestOption
}

Webhook endpoint management

WebhookV1EndpointService 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 NewWebhookV1EndpointService method instead.

func NewWebhookV1EndpointService added in v0.42.0

func NewWebhookV1EndpointService(opts ...option.RequestOption) (r *WebhookV1EndpointService)

NewWebhookV1EndpointService 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 (*WebhookV1EndpointService) Delete added in v0.42.0

func (r *WebhookV1EndpointService) Delete(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Soft-deletes a webhook endpoint. Delivery stops immediately and the endpoint no longer appears in list results. Delivery history is preserved (and can be fetched via GET /deliveries with the endpoint_id filter) so audit trails and post-mortem debugging remain possible.

func (*WebhookV1EndpointService) Get added in v0.42.0

func (r *WebhookV1EndpointService) Get(ctx context.Context, id string, opts ...option.RequestOption) (err error)

Get webhook endpoint

func (*WebhookV1EndpointService) List added in v0.42.0

Returns the organization's webhook endpoints, newest first. Signing secrets are never included.

func (*WebhookV1EndpointService) New added in v0.42.0

Creates a webhook endpoint that receives platform events matching the supplied event-type filters. Returns the generated signing secret ONCE — the response is the only time it is shown in plaintext.

func (*WebhookV1EndpointService) RotateSecret added in v0.42.0

Generates a new signing secret for the endpoint. The previous secret remains valid until `previousSecretExpiresInSec` elapses (default 24h, max 30 days). During the grace window deliveries are signed with both secrets so receivers can migrate without downtime. Returns the new secret — this is the only time it is shown in plaintext.

func (*WebhookV1EndpointService) Test added in v0.42.0

Synchronously delivers a synthetic `webhook.test` event to the endpoint and returns the HTTP result. No retries. Useful for validating that a new endpoint is reachable and its signature verifier works. The delivery is not persisted in the delivery history.

func (*WebhookV1EndpointService) Update added in v0.42.0

Partially updates a webhook endpoint. Any omitted field is left unchanged. Signing secrets are rotated via the separate /rotate_secret endpoint.

type WebhookV1EndpointTestParams added in v0.42.0

type WebhookV1EndpointTestParams struct {
	// Event type to simulate. Defaults to "webhook.test".
	EventType param.Field[string] `json:"eventType"`
	// Custom `data` payload. Defaults to a small placeholder.
	Payload param.Field[interface{}] `json:"payload"`
}

func (WebhookV1EndpointTestParams) MarshalJSON added in v0.42.0

func (r WebhookV1EndpointTestParams) MarshalJSON() (data []byte, err error)

type WebhookV1EndpointUpdateParams added in v0.42.0

type WebhookV1EndpointUpdateParams struct {
	Description      param.Field[string]                                      `json:"description"`
	EventTypeFilters param.Field[[]string]                                    `json:"eventTypeFilters"`
	ResourceScopes   param.Field[WebhookV1EndpointUpdateParamsResourceScopes] `json:"resourceScopes"`
	Status           param.Field[WebhookV1EndpointUpdateParamsStatus]         `json:"status"`
	URL              param.Field[string]                                      `json:"url" format:"uri"`
}

func (WebhookV1EndpointUpdateParams) MarshalJSON added in v0.42.0

func (r WebhookV1EndpointUpdateParams) MarshalJSON() (data []byte, err error)

type WebhookV1EndpointUpdateParamsResourceScopes added in v0.42.0

type WebhookV1EndpointUpdateParamsResourceScopes struct {
	MatterIDs param.Field[[]string] `json:"matterIds"`
	VaultIDs  param.Field[[]string] `json:"vaultIds"`
}

func (WebhookV1EndpointUpdateParamsResourceScopes) MarshalJSON added in v0.42.0

func (r WebhookV1EndpointUpdateParamsResourceScopes) MarshalJSON() (data []byte, err error)

type WebhookV1EndpointUpdateParamsStatus added in v0.42.0

type WebhookV1EndpointUpdateParamsStatus string
const (
	WebhookV1EndpointUpdateParamsStatusActive   WebhookV1EndpointUpdateParamsStatus = "active"
	WebhookV1EndpointUpdateParamsStatusDisabled WebhookV1EndpointUpdateParamsStatus = "disabled"
)

func (WebhookV1EndpointUpdateParamsStatus) IsKnown added in v0.42.0

type WebhookV1EventTypeService added in v0.42.0

type WebhookV1EventTypeService struct {
	Options []option.RequestOption
}

Webhook endpoint management

WebhookV1EventTypeService 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 NewWebhookV1EventTypeService method instead.

func NewWebhookV1EventTypeService added in v0.42.0

func NewWebhookV1EventTypeService(opts ...option.RequestOption) (r *WebhookV1EventTypeService)

NewWebhookV1EventTypeService 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 (*WebhookV1EventTypeService) List added in v0.42.0

func (r *WebhookV1EventTypeService) List(ctx context.Context, opts ...option.RequestOption) (err error)

Returns the catalog of event types that can be subscribed to via webhook endpoints. Each entry lists the required service scope the API key must carry to subscribe, plus the stability level.

type WebhookV1Service added in v0.42.0

type WebhookV1Service struct {
	Options []option.RequestOption
	// Webhook endpoint management
	Endpoints *WebhookV1EndpointService
	// Webhook endpoint management
	Deliveries *WebhookV1DeliveryService
	// Webhook endpoint management
	EventTypes *WebhookV1EventTypeService
}

WebhookV1Service 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 NewWebhookV1Service method instead.

func NewWebhookV1Service added in v0.42.0

func NewWebhookV1Service(opts ...option.RequestOption) (r *WebhookV1Service)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL