modernrelaygo

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: Apache-2.0 Imports: 19 Imported by: 2

README

Modern Relay Go API Library

Go Reference

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

It is generated with Stainless.

MCP Server

Use the Modern Relay MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

Add to Cursor Install in VS Code

Note: You may need to set environment variables in your MCP client.

Installation

import (
	"github.com/modernrelay/modern-relay-go" // imported as modernrelaygo
)

Or to pin the version:

go get -u 'github.com/modernrelay/modern-relay-go@v0.1.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/modernrelay/modern-relay-go"
	"github.com/modernrelay/modern-relay-go/option"
)

func main() {
	client := modernrelaygo.NewClient(
		option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("MODERN_RELAY_API_KEY")
	)
	response, err := client.Search.Entities(context.TODO(), modernrelaygo.SearchEntitiesParams{
		BranchIDs: modernrelaygo.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
		Query:     modernrelaygo.F("example"),
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response.Data)
}

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: modernrelaygo.F("hello"),

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

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

		// In cases where the API specifies a given type,
		// but you want to send something else, use `Raw`:
		Z: modernrelaygo.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 := modernrelaygo.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Search.Entities(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:

iter := client.Repositories.ListAutoPaging(
	context.TODO(),
	"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
	modernrelaygo.RepositoryListParams{},
)
// Automatically fetches more pages as needed.
for iter.Next() {
	repositoryListResponse := iter.Current()
	fmt.Printf("%+v\n", repositoryListResponse)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

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

page, err := client.Repositories.List(
	context.TODO(),
	"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
	modernrelaygo.RepositoryListParams{},
)
for page != nil {
	for _, repository := range page.Data {
		fmt.Printf("%+v\n", repository)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *modernrelaygo.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.Search.Entities(context.TODO(), modernrelaygo.SearchEntitiesParams{
	BranchIDs: modernrelaygo.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
	Query:     modernrelaygo.F("example"),
})
if err != nil {
	var apierr *modernrelaygo.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 "/v1/search": 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.Search.Entities(
	ctx,
	modernrelaygo.SearchEntitiesParams{
		BranchIDs: modernrelaygo.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
		Query:     modernrelaygo.F("example"),
	},
	// 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 modernrelaygo.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 := modernrelaygo.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Search.Entities(
	context.TODO(),
	modernrelaygo.SearchEntitiesParams{
		BranchIDs: modernrelaygo.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
		Query:     modernrelaygo.F("example"),
	},
	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
response, err := client.Search.Entities(
	context.TODO(),
	modernrelaygo.SearchEntitiesParams{
		BranchIDs: modernrelaygo.F([]string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"}),
		Query:     modernrelaygo.F("example"),
	},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", response)

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:   modernrelaygo.F("id_xxxx"),
    Data: modernrelaygo.F(FooNewParamsData{
        FirstName: modernrelaygo.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 := modernrelaygo.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 (MODERN_RELAY_API_KEY, MODERN_RELAY_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 Branch

type Branch struct {
	ID           string     `json:"id" api:"required" format:"uuid"`
	BaseBranchID string     `json:"base_branch_id" api:"required,nullable" format:"uuid"`
	CreatedAt    string     `json:"created_at" api:"required"`
	CreatedBy    string     `json:"created_by" api:"required,nullable" format:"uuid"`
	IsMain       bool       `json:"is_main" api:"required"`
	Name         string     `json:"name" api:"required"`
	RepositoryID string     `json:"repository_id" api:"required" format:"uuid"`
	UpdatedAt    string     `json:"updated_at" api:"required"`
	UpdatedBy    string     `json:"updated_by" api:"required,nullable" format:"uuid"`
	JSON         branchJSON `json:"-"`
}

func (*Branch) UnmarshalJSON

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

type BranchClassNewBatchParams

type BranchClassNewBatchParams struct {
	// Array of class definitions to create
	Classes param.Field[[]BranchClassNewBatchParamsClass] `json:"classes" api:"required"`
}

func (BranchClassNewBatchParams) MarshalJSON

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

type BranchClassNewBatchParamsClass

type BranchClassNewBatchParamsClass struct {
	APIName      param.Field[string] `json:"apiName" api:"required"`
	PluralName   param.Field[string] `json:"pluralName" api:"required"`
	SingularName param.Field[string] `json:"singularName" api:"required"`
	Description  param.Field[string] `json:"description"`
	// Per-class FTS flag. null/undefined = use storage backend default
	FtsEnabled param.Field[bool] `json:"ftsEnabled"`
	// Marks system-managed classes that cannot be deleted by users
	IsSystem param.Field[bool] `json:"isSystem"`
	// Per-class vector search flag. null/undefined = use storage backend default
	VectorSearchEnabled param.Field[bool] `json:"vectorSearchEnabled"`
}

func (BranchClassNewBatchParamsClass) MarshalJSON

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

type BranchClassNewParams

type BranchClassNewParams struct {
	ClassInfo param.Field[BranchClassNewParamsClassInfo] `json:"classInfo" api:"required"`
}

func (BranchClassNewParams) MarshalJSON

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

type BranchClassNewParamsClassInfo

type BranchClassNewParamsClassInfo struct {
	APIName      param.Field[string] `json:"apiName" api:"required"`
	PluralName   param.Field[string] `json:"pluralName" api:"required"`
	SingularName param.Field[string] `json:"singularName" api:"required"`
	Description  param.Field[string] `json:"description"`
	// Per-class FTS flag. null/undefined = use storage backend default
	FtsEnabled param.Field[bool] `json:"ftsEnabled"`
	// Marks system-managed classes that cannot be deleted by users
	IsSystem param.Field[bool] `json:"isSystem"`
	// Per-class vector search flag. null/undefined = use storage backend default
	VectorSearchEnabled param.Field[bool] `json:"vectorSearchEnabled"`
}

func (BranchClassNewParamsClassInfo) MarshalJSON

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

type BranchClassService

type BranchClassService struct {
	Options []option.RequestOption
}

Define classes and properties for your data model

BranchClassService contains methods and other services that help with interacting with the modern-relay 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 NewBranchClassService method instead.

func NewBranchClassService

func NewBranchClassService(opts ...option.RequestOption) (r *BranchClassService)

NewBranchClassService 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 (*BranchClassService) Delete

func (r *BranchClassService) Delete(ctx context.Context, branchID string, classID string, opts ...option.RequestOption) (res *float64, err error)

Permanently deletes a class and all its associated properties from the schema.

func (*BranchClassService) New

func (r *BranchClassService) New(ctx context.Context, branchID string, body BranchClassNewParams, opts ...option.RequestOption) (res *string, err error)

Creates a new class in the schema.

func (*BranchClassService) NewBatch

func (r *BranchClassService) NewBatch(ctx context.Context, branchID string, body BranchClassNewBatchParams, opts ...option.RequestOption) (res *[]string, err error)

Creates multiple classes in a single request. Returns an array of created class IDs.

func (*BranchClassService) Update

func (r *BranchClassService) Update(ctx context.Context, branchID string, classID string, body BranchClassUpdateParams, opts ...option.RequestOption) (err error)

Updates the specified class by setting the values of the parameters passed.

type BranchClassUpdateParams

type BranchClassUpdateParams struct {
	Updates param.Field[BranchClassUpdateParamsUpdates] `json:"updates" api:"required"`
}

func (BranchClassUpdateParams) MarshalJSON

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

type BranchClassUpdateParamsUpdates

type BranchClassUpdateParamsUpdates struct {
	APIName      param.Field[string] `json:"apiName"`
	Description  param.Field[string] `json:"description"`
	PluralName   param.Field[string] `json:"pluralName"`
	SingularName param.Field[string] `json:"singularName"`
}

func (BranchClassUpdateParamsUpdates) MarshalJSON

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

type BranchDiffParams

type BranchDiffParams struct {
	ClassID param.Field[string] `query:"classId"`
}

func (BranchDiffParams) URLQuery

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

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

type BranchDiffResponse

type BranchDiffResponse map[string]BranchDiffResponseItem

type BranchDiffResponseItem

type BranchDiffResponseItem struct {
	Added   map[string][]BranchDiffResponseItemAddedUnion   `json:"added" api:"required" format:"date-time"`
	Removed map[string][]BranchDiffResponseItemRemovedUnion `json:"removed" api:"required" format:"date-time"`
	JSON    branchDiffResponseItemJSON                      `json:"-"`
}

func (*BranchDiffResponseItem) UnmarshalJSON

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

type BranchDiffResponseItemAddedArray

type BranchDiffResponseItemAddedArray []BranchDiffResponseItemAddedArrayUnion

func (BranchDiffResponseItemAddedArray) ImplementsBranchDiffResponseItemAddedUnion

func (r BranchDiffResponseItemAddedArray) ImplementsBranchDiffResponseItemAddedUnion()

type BranchDiffResponseItemAddedArrayUnion

type BranchDiffResponseItemAddedArrayUnion interface {
	ImplementsBranchDiffResponseItemAddedArrayUnion()
}

Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool or shared.UnionTime.

type BranchDiffResponseItemAddedMap

type BranchDiffResponseItemAddedMap map[string]interface{}

func (BranchDiffResponseItemAddedMap) ImplementsBranchDiffResponseItemAddedUnion

func (r BranchDiffResponseItemAddedMap) ImplementsBranchDiffResponseItemAddedUnion()

type BranchDiffResponseItemAddedUnion

type BranchDiffResponseItemAddedUnion interface {
	ImplementsBranchDiffResponseItemAddedUnion()
}

Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime, BranchDiffResponseItemAddedArray or BranchDiffResponseItemAddedMap.

type BranchDiffResponseItemRemovedArray

type BranchDiffResponseItemRemovedArray []BranchDiffResponseItemRemovedArrayUnion

func (BranchDiffResponseItemRemovedArray) ImplementsBranchDiffResponseItemRemovedUnion

func (r BranchDiffResponseItemRemovedArray) ImplementsBranchDiffResponseItemRemovedUnion()

type BranchDiffResponseItemRemovedArrayUnion

type BranchDiffResponseItemRemovedArrayUnion interface {
	ImplementsBranchDiffResponseItemRemovedArrayUnion()
}

Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool or shared.UnionTime.

type BranchDiffResponseItemRemovedMap

type BranchDiffResponseItemRemovedMap map[string]interface{}

func (BranchDiffResponseItemRemovedMap) ImplementsBranchDiffResponseItemRemovedUnion

func (r BranchDiffResponseItemRemovedMap) ImplementsBranchDiffResponseItemRemovedUnion()

type BranchDiffResponseItemRemovedUnion

type BranchDiffResponseItemRemovedUnion interface {
	ImplementsBranchDiffResponseItemRemovedUnion()
}

Union satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime, BranchDiffResponseItemRemovedArray or BranchDiffResponseItemRemovedMap.

type BranchEntityDeleteParams

type BranchEntityDeleteParams struct {
	EntityIDs param.Field[[]string] `json:"entityIds" api:"required" format:"uuid"`
}

func (BranchEntityDeleteParams) MarshalJSON

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

type BranchEntityGetParams

type BranchEntityGetParams struct {
	EntityIDs param.Field[[]string] `json:"entityIds" api:"required"`
}

func (BranchEntityGetParams) MarshalJSON

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

type BranchEntityGetResponse

type BranchEntityGetResponse struct {
	ClassID    string                      `json:"class_id" api:"required" format:"uuid"`
	EntityID   string                      `json:"entity_id" api:"required" format:"uuid"`
	Properties map[string]interface{}      `json:"properties" api:"required"`
	JSON       branchEntityGetResponseJSON `json:"-"`
}

func (*BranchEntityGetResponse) UnmarshalJSON

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

type BranchEntityListBackreferencesParams

type BranchEntityListBackreferencesParams struct {
	ClassID               param.Field[string] `query:"classId"`
	Limit                 param.Field[int64]  `query:"limit"`
	MaxDomainsPerProperty param.Field[int64]  `query:"maxDomainsPerProperty"`
	MaxEntitiesPerDomain  param.Field[int64]  `query:"maxEntitiesPerDomain"`
	Offset                param.Field[int64]  `query:"offset"`
}

func (BranchEntityListBackreferencesParams) URLQuery

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

type BranchEntityListBackreferencesResponse

type BranchEntityListBackreferencesResponse struct {
	ClassID       string                                     `json:"classId" api:"required"`
	EntityID      string                                     `json:"entityId" api:"required"`
	Properties    map[string]interface{}                     `json:"properties" api:"required"`
	ViaPropertyID string                                     `json:"viaPropertyId" api:"required"`
	DisplayName   string                                     `json:"displayName"`
	JSON          branchEntityListBackreferencesResponseJSON `json:"-"`
}

func (*BranchEntityListBackreferencesResponse) UnmarshalJSON

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

type BranchEntityListParams

type BranchEntityListParams struct {
	// Class UUID. Required to scope the listing.
	ClassID param.Field[string] `query:"classId" api:"required" format:"uuid"`
	// Maximum number of results (default 100, max 1200).
	Limit param.Field[int64] `query:"limit"`
	// Pagination offset (default 0).
	Offset param.Field[int64] `query:"offset"`
}

func (BranchEntityListParams) URLQuery

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

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

type BranchEntityListResponse

type BranchEntityListResponse struct {
	ClassID      string                       `json:"classId" api:"required"`
	CreatedAt    time.Time                    `json:"createdAt" api:"required" format:"date-time"`
	EntityID     string                       `json:"entityId" api:"required"`
	Properties   map[string]interface{}       `json:"properties" api:"required"`
	UpdatedAt    time.Time                    `json:"updatedAt" api:"required" format:"date-time"`
	CommentCount float64                      `json:"commentCount" api:"nullable"`
	HasVoted     bool                         `json:"hasVoted" api:"nullable"`
	Rank         float64                      `json:"rank"`
	VoteCount    float64                      `json:"voteCount" api:"nullable"`
	JSON         branchEntityListResponseJSON `json:"-"`
}

func (*BranchEntityListResponse) UnmarshalJSON

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

type BranchEntityNewParams

type BranchEntityNewParams struct {
	// The class ID for the entities
	ClassID param.Field[string] `json:"classId" api:"required"`
	// Array of entities to create. Each entity is a record mapping property IDs to
	// values.
	Entities param.Field[[]map[string]BranchEntityNewParamsEntitiesUnion] `json:"entities" api:"required" format:"date-time"`
}

func (BranchEntityNewParams) MarshalJSON

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

type BranchEntityNewParamsEntitiesArray

type BranchEntityNewParamsEntitiesArray []BranchEntityNewParamsEntitiesArrayItemUnion

func (BranchEntityNewParamsEntitiesArray) ImplementsBranchEntityNewParamsEntitiesUnion

func (r BranchEntityNewParamsEntitiesArray) ImplementsBranchEntityNewParamsEntitiesUnion()

type BranchEntityNewParamsEntitiesArrayItemUnion

type BranchEntityNewParamsEntitiesArrayItemUnion interface {
	ImplementsBranchEntityNewParamsEntitiesArrayItemUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime.

type BranchEntityNewParamsEntitiesMap

type BranchEntityNewParamsEntitiesMap map[string]interface{}

func (BranchEntityNewParamsEntitiesMap) ImplementsBranchEntityNewParamsEntitiesUnion

func (r BranchEntityNewParamsEntitiesMap) ImplementsBranchEntityNewParamsEntitiesUnion()

type BranchEntityNewParamsEntitiesUnion

type BranchEntityNewParamsEntitiesUnion interface {
	ImplementsBranchEntityNewParamsEntitiesUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime, BranchEntityNewParamsEntitiesArray, BranchEntityNewParamsEntitiesMap.

type BranchEntityQueryParams

type BranchEntityQueryParams struct {
	// Class UUID. Required for vector search (Turbopuffer backend).
	ClassID param.Field[string] `json:"classId" format:"uuid"`
	// Property UUIDs to exclude from response (blacklist).
	ExcludeProperties param.Field[[]string] `json:"excludeProperties" format:"uuid"`
	// Relationship expansion configuration keyed by reference property UUID.
	Expand param.Field[map[string]BranchEntityQueryParamsExpand] `json:"expand"`
	// Filter AST. Use { kind: 'cond', field, op, value } for conditions, { kind:
	// 'and'|'or', terms } for logic, { kind: 'rel', op, refPropId, subFilter } for
	// relational joins.
	Filters param.Field[BranchEntityQueryParamsFilters] `json:"filters"`
	// Pagination offset (default 0).
	Offset param.Field[int64] `json:"offset"`
	// Ranking/sorting AST. Supports vector search, full-text search, field ordering,
	// and composite ranking.
	RankBy param.Field[BranchEntityQueryParamsRankByUnion] `json:"rankBy"`
	// Property UUIDs to include in response (whitelist). If omitted, all properties
	// are returned.
	Select param.Field[[]string] `json:"select" format:"uuid"`
	// Maximum number of results to return (default 100, max 1200).
	TopK param.Field[int64] `json:"topK"`
}

func (BranchEntityQueryParams) MarshalJSON

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

type BranchEntityQueryParamsExpand

type BranchEntityQueryParamsExpand struct {
	// Filter applied to the related entity/entities.
	Filters param.Field[BranchEntityQueryParamsExpandFilters] `json:"filters"`
	// Limit of expanded related entities (for multi-valued refs).
	Limit param.Field[int64] `json:"limit"`
	// Reference class IDs (needed for Turbopuffer namespace lookup).
	ReferenceClasses param.Field[[]string] `json:"referenceClasses" format:"uuid"`
	// Project only these properties on the expanded entity.
	Select param.Field[[]string] `json:"select" format:"uuid"`
	// Target branch ID for cross-repository references (Postgres expansion extension).
	TargetBranchID param.Field[string] `json:"targetBranchId" format:"uuid"`
}

func (BranchEntityQueryParamsExpand) MarshalJSON

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

type BranchEntityQueryParamsExpandFilters

type BranchEntityQueryParamsExpandFilters struct {
	// Field reference (property UUID or system field).
	Field param.Field[BranchEntityQueryParamsExpandFiltersFieldUnion] `json:"field" api:"required"`
	Kind  param.Field[BranchEntityQueryParamsExpandFiltersKind]       `json:"kind" api:"required"`
	// Filter operator (backend support varies).
	Op param.Field[BranchEntityQueryParamsExpandFiltersOp] `json:"op" api:"required"`
	// Options for token filters.
	Options param.Field[BranchEntityQueryParamsExpandFiltersOptions]    `json:"options"`
	Value   param.Field[BranchEntityQueryParamsExpandFiltersValueUnion] `json:"value"`
}

Atomic condition filter: field + operator (+ value/options).

func (BranchEntityQueryParamsExpandFilters) MarshalJSON

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

type BranchEntityQueryParamsExpandFiltersField

type BranchEntityQueryParamsExpandFiltersField struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsExpandFiltersFieldKind] `json:"kind" api:"required"`
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsExpandFiltersFieldField] `json:"field"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" format:"uuid"`
}

Field reference (property UUID or system field).

func (BranchEntityQueryParamsExpandFiltersField) MarshalJSON

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

type BranchEntityQueryParamsExpandFiltersFieldField

type BranchEntityQueryParamsExpandFiltersFieldField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsExpandFiltersFieldFieldID        BranchEntityQueryParamsExpandFiltersFieldField = "$id"
	BranchEntityQueryParamsExpandFiltersFieldFieldClassID   BranchEntityQueryParamsExpandFiltersFieldField = "$class_id"
	BranchEntityQueryParamsExpandFiltersFieldFieldCreatedAt BranchEntityQueryParamsExpandFiltersFieldField = "$created_at"
	BranchEntityQueryParamsExpandFiltersFieldFieldUpdatedAt BranchEntityQueryParamsExpandFiltersFieldField = "$updated_at"
	BranchEntityQueryParamsExpandFiltersFieldFieldVotes     BranchEntityQueryParamsExpandFiltersFieldField = "$votes"
	BranchEntityQueryParamsExpandFiltersFieldFieldComments  BranchEntityQueryParamsExpandFiltersFieldField = "$comments"
	BranchEntityQueryParamsExpandFiltersFieldFieldFts       BranchEntityQueryParamsExpandFiltersFieldField = "$fts"
)

func (BranchEntityQueryParamsExpandFiltersFieldField) IsKnown

type BranchEntityQueryParamsExpandFiltersFieldFieldRefProperty

type BranchEntityQueryParamsExpandFiltersFieldFieldRefProperty struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsExpandFiltersFieldFieldRefPropertyKind] `json:"kind" api:"required"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" api:"required" format:"uuid"`
}

func (BranchEntityQueryParamsExpandFiltersFieldFieldRefProperty) MarshalJSON

type BranchEntityQueryParamsExpandFiltersFieldFieldRefPropertyKind

type BranchEntityQueryParamsExpandFiltersFieldFieldRefPropertyKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsExpandFiltersFieldFieldRefPropertyKindProperty BranchEntityQueryParamsExpandFiltersFieldFieldRefPropertyKind = "property"
)

func (BranchEntityQueryParamsExpandFiltersFieldFieldRefPropertyKind) IsKnown

type BranchEntityQueryParamsExpandFiltersFieldFieldRefSystem

type BranchEntityQueryParamsExpandFiltersFieldFieldRefSystem struct {
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField] `json:"field" api:"required"`
	// Reference to a system field.
	Kind param.Field[BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemKind] `json:"kind" api:"required"`
}

func (BranchEntityQueryParamsExpandFiltersFieldFieldRefSystem) MarshalJSON

type BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField

type BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldID        BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$id"
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldClassID   BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$class_id"
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldCreatedAt BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$created_at"
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldUpdatedAt BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$updated_at"
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldVotes     BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$votes"
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldComments  BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$comments"
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemFieldFts       BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField = "$fts"
)

func (BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemField) IsKnown

type BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemKind

type BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemKind string

Reference to a system field.

const (
	BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemKindSystem BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemKind = "system"
)

func (BranchEntityQueryParamsExpandFiltersFieldFieldRefSystemKind) IsKnown

type BranchEntityQueryParamsExpandFiltersFieldKind

type BranchEntityQueryParamsExpandFiltersFieldKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsExpandFiltersFieldKindProperty BranchEntityQueryParamsExpandFiltersFieldKind = "property"
	BranchEntityQueryParamsExpandFiltersFieldKindSystem   BranchEntityQueryParamsExpandFiltersFieldKind = "system"
)

func (BranchEntityQueryParamsExpandFiltersFieldKind) IsKnown

type BranchEntityQueryParamsExpandFiltersFieldUnion

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

Field reference (property UUID or system field).

Satisfied by BranchEntityQueryParamsExpandFiltersFieldFieldRefProperty, BranchEntityQueryParamsExpandFiltersFieldFieldRefSystem, BranchEntityQueryParamsExpandFiltersField.

type BranchEntityQueryParamsExpandFiltersKind

type BranchEntityQueryParamsExpandFiltersKind string
const (
	BranchEntityQueryParamsExpandFiltersKindCond BranchEntityQueryParamsExpandFiltersKind = "cond"
)

func (BranchEntityQueryParamsExpandFiltersKind) IsKnown

type BranchEntityQueryParamsExpandFiltersOp

type BranchEntityQueryParamsExpandFiltersOp string

Filter operator (backend support varies).

const (
	BranchEntityQueryParamsExpandFiltersOpEq                    BranchEntityQueryParamsExpandFiltersOp = "Eq"
	BranchEntityQueryParamsExpandFiltersOpNotEq                 BranchEntityQueryParamsExpandFiltersOp = "NotEq"
	BranchEntityQueryParamsExpandFiltersOpIn                    BranchEntityQueryParamsExpandFiltersOp = "In"
	BranchEntityQueryParamsExpandFiltersOpNotIn                 BranchEntityQueryParamsExpandFiltersOp = "NotIn"
	BranchEntityQueryParamsExpandFiltersOpLt                    BranchEntityQueryParamsExpandFiltersOp = "Lt"
	BranchEntityQueryParamsExpandFiltersOpLte                   BranchEntityQueryParamsExpandFiltersOp = "Lte"
	BranchEntityQueryParamsExpandFiltersOpGt                    BranchEntityQueryParamsExpandFiltersOp = "Gt"
	BranchEntityQueryParamsExpandFiltersOpGte                   BranchEntityQueryParamsExpandFiltersOp = "Gte"
	BranchEntityQueryParamsExpandFiltersOpAnyLt                 BranchEntityQueryParamsExpandFiltersOp = "AnyLt"
	BranchEntityQueryParamsExpandFiltersOpAnyLte                BranchEntityQueryParamsExpandFiltersOp = "AnyLte"
	BranchEntityQueryParamsExpandFiltersOpAnyGt                 BranchEntityQueryParamsExpandFiltersOp = "AnyGt"
	BranchEntityQueryParamsExpandFiltersOpAnyGte                BranchEntityQueryParamsExpandFiltersOp = "AnyGte"
	BranchEntityQueryParamsExpandFiltersOpContains              BranchEntityQueryParamsExpandFiltersOp = "Contains"
	BranchEntityQueryParamsExpandFiltersOpNotContains           BranchEntityQueryParamsExpandFiltersOp = "NotContains"
	BranchEntityQueryParamsExpandFiltersOpContainsAny           BranchEntityQueryParamsExpandFiltersOp = "ContainsAny"
	BranchEntityQueryParamsExpandFiltersOpNotContainsAny        BranchEntityQueryParamsExpandFiltersOp = "NotContainsAny"
	BranchEntityQueryParamsExpandFiltersOpGlob                  BranchEntityQueryParamsExpandFiltersOp = "Glob"
	BranchEntityQueryParamsExpandFiltersOpNotGlob               BranchEntityQueryParamsExpandFiltersOp = "NotGlob"
	BranchEntityQueryParamsExpandFiltersOpIGlob                 BranchEntityQueryParamsExpandFiltersOp = "IGlob"
	BranchEntityQueryParamsExpandFiltersOpNotIGlob              BranchEntityQueryParamsExpandFiltersOp = "NotIGlob"
	BranchEntityQueryParamsExpandFiltersOpRegex                 BranchEntityQueryParamsExpandFiltersOp = "Regex"
	BranchEntityQueryParamsExpandFiltersOpContainsAllTokens     BranchEntityQueryParamsExpandFiltersOp = "ContainsAllTokens"
	BranchEntityQueryParamsExpandFiltersOpContainsTokenSequence BranchEntityQueryParamsExpandFiltersOp = "ContainsTokenSequence"
	BranchEntityQueryParamsExpandFiltersOpContainsAll           BranchEntityQueryParamsExpandFiltersOp = "ContainsAll"
	BranchEntityQueryParamsExpandFiltersOpStartsWith            BranchEntityQueryParamsExpandFiltersOp = "StartsWith"
	BranchEntityQueryParamsExpandFiltersOpEndsWith              BranchEntityQueryParamsExpandFiltersOp = "EndsWith"
	BranchEntityQueryParamsExpandFiltersOpIsNull                BranchEntityQueryParamsExpandFiltersOp = "IsNull"
	BranchEntityQueryParamsExpandFiltersOpNotNull               BranchEntityQueryParamsExpandFiltersOp = "NotNull"
)

func (BranchEntityQueryParamsExpandFiltersOp) IsKnown

type BranchEntityQueryParamsExpandFiltersOptions

type BranchEntityQueryParamsExpandFiltersOptions struct {
	// Treat the last token as a prefix (Turbopuffer token filters).
	LastAsPrefix param.Field[bool] `json:"last_as_prefix"`
}

Options for token filters.

func (BranchEntityQueryParamsExpandFiltersOptions) MarshalJSON

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

type BranchEntityQueryParamsExpandFiltersValueArray

type BranchEntityQueryParamsExpandFiltersValueArray []BranchEntityQueryParamsExpandFiltersValueArrayItemUnion

func (BranchEntityQueryParamsExpandFiltersValueArray) ImplementsBranchEntityQueryParamsExpandFiltersValueUnion

func (r BranchEntityQueryParamsExpandFiltersValueArray) ImplementsBranchEntityQueryParamsExpandFiltersValueUnion()

type BranchEntityQueryParamsExpandFiltersValueArrayItemUnion

type BranchEntityQueryParamsExpandFiltersValueArrayItemUnion interface {
	ImplementsBranchEntityQueryParamsExpandFiltersValueArrayItemUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool.

type BranchEntityQueryParamsExpandFiltersValueUnion

type BranchEntityQueryParamsExpandFiltersValueUnion interface {
	ImplementsBranchEntityQueryParamsExpandFiltersValueUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, BranchEntityQueryParamsExpandFiltersValueArray.

type BranchEntityQueryParamsFilters

type BranchEntityQueryParamsFilters struct {
	// Field reference (property UUID or system field).
	Field param.Field[BranchEntityQueryParamsFiltersFieldUnion] `json:"field" api:"required"`
	Kind  param.Field[BranchEntityQueryParamsFiltersKind]       `json:"kind" api:"required"`
	// Filter operator (backend support varies).
	Op param.Field[BranchEntityQueryParamsFiltersOp] `json:"op" api:"required"`
	// Options for token filters.
	Options param.Field[BranchEntityQueryParamsFiltersOptions]    `json:"options"`
	Value   param.Field[BranchEntityQueryParamsFiltersValueUnion] `json:"value"`
}

Atomic condition filter: field + operator (+ value/options).

func (BranchEntityQueryParamsFilters) MarshalJSON

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

type BranchEntityQueryParamsFiltersField

type BranchEntityQueryParamsFiltersField struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsFiltersFieldKind] `json:"kind" api:"required"`
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsFiltersFieldField] `json:"field"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" format:"uuid"`
}

Field reference (property UUID or system field).

func (BranchEntityQueryParamsFiltersField) MarshalJSON

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

type BranchEntityQueryParamsFiltersFieldField

type BranchEntityQueryParamsFiltersFieldField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsFiltersFieldFieldID        BranchEntityQueryParamsFiltersFieldField = "$id"
	BranchEntityQueryParamsFiltersFieldFieldClassID   BranchEntityQueryParamsFiltersFieldField = "$class_id"
	BranchEntityQueryParamsFiltersFieldFieldCreatedAt BranchEntityQueryParamsFiltersFieldField = "$created_at"
	BranchEntityQueryParamsFiltersFieldFieldUpdatedAt BranchEntityQueryParamsFiltersFieldField = "$updated_at"
	BranchEntityQueryParamsFiltersFieldFieldVotes     BranchEntityQueryParamsFiltersFieldField = "$votes"
	BranchEntityQueryParamsFiltersFieldFieldComments  BranchEntityQueryParamsFiltersFieldField = "$comments"
	BranchEntityQueryParamsFiltersFieldFieldFts       BranchEntityQueryParamsFiltersFieldField = "$fts"
)

func (BranchEntityQueryParamsFiltersFieldField) IsKnown

type BranchEntityQueryParamsFiltersFieldFieldRefProperty

type BranchEntityQueryParamsFiltersFieldFieldRefProperty struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsFiltersFieldFieldRefPropertyKind] `json:"kind" api:"required"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" api:"required" format:"uuid"`
}

func (BranchEntityQueryParamsFiltersFieldFieldRefProperty) MarshalJSON

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

type BranchEntityQueryParamsFiltersFieldFieldRefPropertyKind

type BranchEntityQueryParamsFiltersFieldFieldRefPropertyKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsFiltersFieldFieldRefPropertyKindProperty BranchEntityQueryParamsFiltersFieldFieldRefPropertyKind = "property"
)

func (BranchEntityQueryParamsFiltersFieldFieldRefPropertyKind) IsKnown

type BranchEntityQueryParamsFiltersFieldFieldRefSystem

type BranchEntityQueryParamsFiltersFieldFieldRefSystem struct {
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsFiltersFieldFieldRefSystemField] `json:"field" api:"required"`
	// Reference to a system field.
	Kind param.Field[BranchEntityQueryParamsFiltersFieldFieldRefSystemKind] `json:"kind" api:"required"`
}

func (BranchEntityQueryParamsFiltersFieldFieldRefSystem) MarshalJSON

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

type BranchEntityQueryParamsFiltersFieldFieldRefSystemField

type BranchEntityQueryParamsFiltersFieldFieldRefSystemField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldID        BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$id"
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldClassID   BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$class_id"
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldCreatedAt BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$created_at"
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldUpdatedAt BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$updated_at"
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldVotes     BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$votes"
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldComments  BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$comments"
	BranchEntityQueryParamsFiltersFieldFieldRefSystemFieldFts       BranchEntityQueryParamsFiltersFieldFieldRefSystemField = "$fts"
)

func (BranchEntityQueryParamsFiltersFieldFieldRefSystemField) IsKnown

type BranchEntityQueryParamsFiltersFieldFieldRefSystemKind

type BranchEntityQueryParamsFiltersFieldFieldRefSystemKind string

Reference to a system field.

const (
	BranchEntityQueryParamsFiltersFieldFieldRefSystemKindSystem BranchEntityQueryParamsFiltersFieldFieldRefSystemKind = "system"
)

func (BranchEntityQueryParamsFiltersFieldFieldRefSystemKind) IsKnown

type BranchEntityQueryParamsFiltersFieldKind

type BranchEntityQueryParamsFiltersFieldKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsFiltersFieldKindProperty BranchEntityQueryParamsFiltersFieldKind = "property"
	BranchEntityQueryParamsFiltersFieldKindSystem   BranchEntityQueryParamsFiltersFieldKind = "system"
)

func (BranchEntityQueryParamsFiltersFieldKind) IsKnown

type BranchEntityQueryParamsFiltersFieldUnion

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

Field reference (property UUID or system field).

Satisfied by BranchEntityQueryParamsFiltersFieldFieldRefProperty, BranchEntityQueryParamsFiltersFieldFieldRefSystem, BranchEntityQueryParamsFiltersField.

type BranchEntityQueryParamsFiltersKind

type BranchEntityQueryParamsFiltersKind string
const (
	BranchEntityQueryParamsFiltersKindCond BranchEntityQueryParamsFiltersKind = "cond"
)

func (BranchEntityQueryParamsFiltersKind) IsKnown

type BranchEntityQueryParamsFiltersOp

type BranchEntityQueryParamsFiltersOp string

Filter operator (backend support varies).

const (
	BranchEntityQueryParamsFiltersOpEq                    BranchEntityQueryParamsFiltersOp = "Eq"
	BranchEntityQueryParamsFiltersOpNotEq                 BranchEntityQueryParamsFiltersOp = "NotEq"
	BranchEntityQueryParamsFiltersOpIn                    BranchEntityQueryParamsFiltersOp = "In"
	BranchEntityQueryParamsFiltersOpNotIn                 BranchEntityQueryParamsFiltersOp = "NotIn"
	BranchEntityQueryParamsFiltersOpLt                    BranchEntityQueryParamsFiltersOp = "Lt"
	BranchEntityQueryParamsFiltersOpLte                   BranchEntityQueryParamsFiltersOp = "Lte"
	BranchEntityQueryParamsFiltersOpGt                    BranchEntityQueryParamsFiltersOp = "Gt"
	BranchEntityQueryParamsFiltersOpGte                   BranchEntityQueryParamsFiltersOp = "Gte"
	BranchEntityQueryParamsFiltersOpAnyLt                 BranchEntityQueryParamsFiltersOp = "AnyLt"
	BranchEntityQueryParamsFiltersOpAnyLte                BranchEntityQueryParamsFiltersOp = "AnyLte"
	BranchEntityQueryParamsFiltersOpAnyGt                 BranchEntityQueryParamsFiltersOp = "AnyGt"
	BranchEntityQueryParamsFiltersOpAnyGte                BranchEntityQueryParamsFiltersOp = "AnyGte"
	BranchEntityQueryParamsFiltersOpContains              BranchEntityQueryParamsFiltersOp = "Contains"
	BranchEntityQueryParamsFiltersOpNotContains           BranchEntityQueryParamsFiltersOp = "NotContains"
	BranchEntityQueryParamsFiltersOpContainsAny           BranchEntityQueryParamsFiltersOp = "ContainsAny"
	BranchEntityQueryParamsFiltersOpNotContainsAny        BranchEntityQueryParamsFiltersOp = "NotContainsAny"
	BranchEntityQueryParamsFiltersOpGlob                  BranchEntityQueryParamsFiltersOp = "Glob"
	BranchEntityQueryParamsFiltersOpNotGlob               BranchEntityQueryParamsFiltersOp = "NotGlob"
	BranchEntityQueryParamsFiltersOpIGlob                 BranchEntityQueryParamsFiltersOp = "IGlob"
	BranchEntityQueryParamsFiltersOpNotIGlob              BranchEntityQueryParamsFiltersOp = "NotIGlob"
	BranchEntityQueryParamsFiltersOpRegex                 BranchEntityQueryParamsFiltersOp = "Regex"
	BranchEntityQueryParamsFiltersOpContainsAllTokens     BranchEntityQueryParamsFiltersOp = "ContainsAllTokens"
	BranchEntityQueryParamsFiltersOpContainsTokenSequence BranchEntityQueryParamsFiltersOp = "ContainsTokenSequence"
	BranchEntityQueryParamsFiltersOpContainsAll           BranchEntityQueryParamsFiltersOp = "ContainsAll"
	BranchEntityQueryParamsFiltersOpStartsWith            BranchEntityQueryParamsFiltersOp = "StartsWith"
	BranchEntityQueryParamsFiltersOpEndsWith              BranchEntityQueryParamsFiltersOp = "EndsWith"
	BranchEntityQueryParamsFiltersOpIsNull                BranchEntityQueryParamsFiltersOp = "IsNull"
	BranchEntityQueryParamsFiltersOpNotNull               BranchEntityQueryParamsFiltersOp = "NotNull"
)

func (BranchEntityQueryParamsFiltersOp) IsKnown

type BranchEntityQueryParamsFiltersOptions

type BranchEntityQueryParamsFiltersOptions struct {
	// Treat the last token as a prefix (Turbopuffer token filters).
	LastAsPrefix param.Field[bool] `json:"last_as_prefix"`
}

Options for token filters.

func (BranchEntityQueryParamsFiltersOptions) MarshalJSON

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

type BranchEntityQueryParamsFiltersValueArray

type BranchEntityQueryParamsFiltersValueArray []BranchEntityQueryParamsFiltersValueArrayItemUnion

func (BranchEntityQueryParamsFiltersValueArray) ImplementsBranchEntityQueryParamsFiltersValueUnion

func (r BranchEntityQueryParamsFiltersValueArray) ImplementsBranchEntityQueryParamsFiltersValueUnion()

type BranchEntityQueryParamsFiltersValueArrayItemUnion

type BranchEntityQueryParamsFiltersValueArrayItemUnion interface {
	ImplementsBranchEntityQueryParamsFiltersValueArrayItemUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool.

type BranchEntityQueryParamsFiltersValueUnion

type BranchEntityQueryParamsFiltersValueUnion interface {
	ImplementsBranchEntityQueryParamsFiltersValueUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, BranchEntityQueryParamsFiltersValueArray.

type BranchEntityQueryParamsRankBy

type BranchEntityQueryParamsRankBy struct {
	Kind param.Field[BranchEntityQueryParamsRankByKind] `json:"kind" api:"required"`
	// Sort direction.
	Direction param.Field[BranchEntityQueryParamsRankByDirection] `json:"direction"`
	Field     param.Field[interface{}]                            `json:"field"`
	Filter    param.Field[interface{}]                            `json:"filter"`
	// Vector ranking mode (kNN requires filters in Turbopuffer).
	Mode param.Field[BranchEntityQueryParamsRankByMode] `json:"mode"`
	// Embedding model (default: text-embedding-3-small).
	Model   param.Field[string]      `json:"model"`
	Options param.Field[interface{}] `json:"options"`
	// FTS parser (default: plain). Options: plain (all words), fts (websearch with
	// OR/-/quotes), phrase (exact sequence), tsquery (raw).
	Parser param.Field[BranchEntityQueryParamsRankByParser] `json:"parser"`
	// Text to embed (provide this OR vector).
	Query  param.Field[string]      `json:"query"`
	Target param.Field[interface{}] `json:"target"`
	Vector param.Field[interface{}] `json:"vector"`
}

Ranking/sorting AST. Supports vector search, full-text search, field ordering, and composite ranking.

func (BranchEntityQueryParamsRankBy) MarshalJSON

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

type BranchEntityQueryParamsRankByDirection

type BranchEntityQueryParamsRankByDirection string

Sort direction.

const (
	BranchEntityQueryParamsRankByDirectionAsc  BranchEntityQueryParamsRankByDirection = "asc"
	BranchEntityQueryParamsRankByDirectionDesc BranchEntityQueryParamsRankByDirection = "desc"
)

func (BranchEntityQueryParamsRankByDirection) IsKnown

type BranchEntityQueryParamsRankByKind

type BranchEntityQueryParamsRankByKind string
const (
	BranchEntityQueryParamsRankByKindOrder       BranchEntityQueryParamsRankByKind = "order"
	BranchEntityQueryParamsRankByKindVector      BranchEntityQueryParamsRankByKind = "vector"
	BranchEntityQueryParamsRankByKindBm25        BranchEntityQueryParamsRankByKind = "bm25"
	BranchEntityQueryParamsRankByKindFts         BranchEntityQueryParamsRankByKind = "fts"
	BranchEntityQueryParamsRankByKindFilterBoost BranchEntityQueryParamsRankByKind = "filterBoost"
)

func (BranchEntityQueryParamsRankByKind) IsKnown

type BranchEntityQueryParamsRankByMode

type BranchEntityQueryParamsRankByMode string

Vector ranking mode (kNN requires filters in Turbopuffer).

const (
	BranchEntityQueryParamsRankByModeAnn BranchEntityQueryParamsRankByMode = "ANN"
	BranchEntityQueryParamsRankByModeKNn BranchEntityQueryParamsRankByMode = "kNN"
)

func (BranchEntityQueryParamsRankByMode) IsKnown

type BranchEntityQueryParamsRankByParser

type BranchEntityQueryParamsRankByParser string

FTS parser (default: plain). Options: plain (all words), fts (websearch with OR/-/quotes), phrase (exact sequence), tsquery (raw).

const (
	BranchEntityQueryParamsRankByParserFts     BranchEntityQueryParamsRankByParser = "fts"
	BranchEntityQueryParamsRankByParserTsquery BranchEntityQueryParamsRankByParser = "tsquery"
	BranchEntityQueryParamsRankByParserPhrase  BranchEntityQueryParamsRankByParser = "phrase"
	BranchEntityQueryParamsRankByParserPlain   BranchEntityQueryParamsRankByParser = "plain"
)

func (BranchEntityQueryParamsRankByParser) IsKnown

type BranchEntityQueryParamsRankByRankAstBm25

type BranchEntityQueryParamsRankByRankAstBm25 struct {
	// Property field (Turbopuffer: limited to indexed fields like title. Prefer vector
	// search).
	Field param.Field[BranchEntityQueryParamsRankByRankAstBm25Field] `json:"field" api:"required"`
	Kind  param.Field[BranchEntityQueryParamsRankByRankAstBm25Kind]  `json:"kind" api:"required"`
	Query param.Field[string]                                        `json:"query" api:"required"`
	// BM25 options (Turbopuffer).
	Options param.Field[BranchEntityQueryParamsRankByRankAstBm25Options] `json:"options"`
}

BM25 property-level ranking. Turbopuffer: only on indexed fields, prefer vector.

func (BranchEntityQueryParamsRankByRankAstBm25) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstBm25Field

type BranchEntityQueryParamsRankByRankAstBm25Field struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstBm25FieldKind] `json:"kind" api:"required"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" api:"required" format:"uuid"`
}

Property field (Turbopuffer: limited to indexed fields like title. Prefer vector search).

func (BranchEntityQueryParamsRankByRankAstBm25Field) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstBm25FieldKind

type BranchEntityQueryParamsRankByRankAstBm25FieldKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstBm25FieldKindProperty BranchEntityQueryParamsRankByRankAstBm25FieldKind = "property"
)

func (BranchEntityQueryParamsRankByRankAstBm25FieldKind) IsKnown

type BranchEntityQueryParamsRankByRankAstBm25Kind

type BranchEntityQueryParamsRankByRankAstBm25Kind string
const (
	BranchEntityQueryParamsRankByRankAstBm25KindBm25 BranchEntityQueryParamsRankByRankAstBm25Kind = "bm25"
)

func (BranchEntityQueryParamsRankByRankAstBm25Kind) IsKnown

type BranchEntityQueryParamsRankByRankAstBm25Options

type BranchEntityQueryParamsRankByRankAstBm25Options struct {
	LastAsPrefix param.Field[bool] `json:"last_as_prefix"`
}

BM25 options (Turbopuffer).

func (BranchEntityQueryParamsRankByRankAstBm25Options) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstFilterBoost

type BranchEntityQueryParamsRankByRankAstFilterBoost struct {
	// Atomic condition filter: field + operator (+ value/options).
	Filter param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilter] `json:"filter" api:"required"`
	Kind   param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostKind]   `json:"kind" api:"required"`
}

Rank-by-filter boost (Turbopuffer): documents matching the filter get score 1.0, others 0.0.

func (BranchEntityQueryParamsRankByRankAstFilterBoost) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstFilterBoostFilter

type BranchEntityQueryParamsRankByRankAstFilterBoostFilter struct {
	// Field reference (property UUID or system field).
	Field param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldUnion] `json:"field" api:"required"`
	Kind  param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterKind]       `json:"kind" api:"required"`
	// Filter operator (backend support varies).
	Op param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp] `json:"op" api:"required"`
	// Options for token filters.
	Options param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterOptions]    `json:"options"`
	Value   param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueUnion] `json:"value"`
}

Atomic condition filter: field + operator (+ value/options).

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilter) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterField

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterField struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKind] `json:"kind" api:"required"`
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField] `json:"field"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" format:"uuid"`
}

Field reference (property UUID or system field).

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterField) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldID        BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$id"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldClassID   BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$class_id"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldCreatedAt BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$created_at"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldUpdatedAt BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$updated_at"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldVotes     BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$votes"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldComments  BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$comments"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldFts       BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField = "$fts"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldField) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefProperty

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefProperty struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefPropertyKind] `json:"kind" api:"required"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" api:"required" format:"uuid"`
}

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefProperty) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefPropertyKind

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefPropertyKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefPropertyKindProperty BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefPropertyKind = "property"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefPropertyKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystem

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystem struct {
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField] `json:"field" api:"required"`
	// Reference to a system field.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemKind] `json:"kind" api:"required"`
}

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystem) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldID        BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$id"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldClassID   BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$class_id"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldCreatedAt BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$created_at"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldUpdatedAt BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$updated_at"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldVotes     BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$votes"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldComments  BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$comments"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemFieldFts       BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField = "$fts"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemField) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemKind

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemKind string

Reference to a system field.

const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemKindSystem BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemKind = "system"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystemKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKind

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKindProperty BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKind = "property"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKindSystem   BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKind = "system"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldUnion

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

Field reference (property UUID or system field).

Satisfied by BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefProperty, BranchEntityQueryParamsRankByRankAstFilterBoostFilterFieldFieldRefSystem, BranchEntityQueryParamsRankByRankAstFilterBoostFilterField.

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterKind

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterKind string
const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterKindCond BranchEntityQueryParamsRankByRankAstFilterBoostFilterKind = "cond"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp string

Filter operator (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpEq                    BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Eq"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotEq                 BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotEq"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpIn                    BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "In"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotIn                 BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotIn"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpLt                    BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Lt"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpLte                   BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Lte"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpGt                    BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Gt"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpGte                   BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Gte"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpAnyLt                 BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "AnyLt"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpAnyLte                BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "AnyLte"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpAnyGt                 BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "AnyGt"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpAnyGte                BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "AnyGte"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpContains              BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Contains"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotContains           BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotContains"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpContainsAny           BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "ContainsAny"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotContainsAny        BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotContainsAny"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpGlob                  BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Glob"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotGlob               BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotGlob"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpIGlob                 BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "IGlob"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotIGlob              BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotIGlob"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpRegex                 BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "Regex"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpContainsAllTokens     BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "ContainsAllTokens"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpContainsTokenSequence BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "ContainsTokenSequence"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpContainsAll           BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "ContainsAll"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpStartsWith            BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "StartsWith"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpEndsWith              BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "EndsWith"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpIsNull                BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "IsNull"
	BranchEntityQueryParamsRankByRankAstFilterBoostFilterOpNotNull               BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp = "NotNull"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterOp) IsKnown

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterOptions

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterOptions struct {
	// Treat the last token as a prefix (Turbopuffer token filters).
	LastAsPrefix param.Field[bool] `json:"last_as_prefix"`
}

Options for token filters.

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterOptions) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArray

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArray []BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArrayItemUnion

func (BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArray) ImplementsBranchEntityQueryParamsRankByRankAstFilterBoostFilterValueUnion

func (r BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArray) ImplementsBranchEntityQueryParamsRankByRankAstFilterBoostFilterValueUnion()

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArrayItemUnion

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArrayItemUnion interface {
	ImplementsBranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArrayItemUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool.

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueUnion

type BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueUnion interface {
	ImplementsBranchEntityQueryParamsRankByRankAstFilterBoostFilterValueUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, BranchEntityQueryParamsRankByRankAstFilterBoostFilterValueArray.

type BranchEntityQueryParamsRankByRankAstFilterBoostKind

type BranchEntityQueryParamsRankByRankAstFilterBoostKind string
const (
	BranchEntityQueryParamsRankByRankAstFilterBoostKindFilterBoost BranchEntityQueryParamsRankByRankAstFilterBoostKind = "filterBoost"
)

func (BranchEntityQueryParamsRankByRankAstFilterBoostKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFts

type BranchEntityQueryParamsRankByRankAstFts struct {
	Kind  param.Field[BranchEntityQueryParamsRankByRankAstFtsKind] `json:"kind" api:"required"`
	Query param.Field[string]                                      `json:"query" api:"required"`
	// FTS target field (property or $fts).
	Target param.Field[BranchEntityQueryParamsRankByRankAstFtsTargetUnion] `json:"target" api:"required"`
	// Optional prefix options (Postgres only; Turbopuffer should use vector search).
	Options param.Field[BranchEntityQueryParamsRankByRankAstFtsOptions] `json:"options"`
	// FTS parser (default: plain). Options: plain (all words), fts (websearch with
	// OR/-/quotes), phrase (exact sequence), tsquery (raw).
	Parser param.Field[BranchEntityQueryParamsRankByRankAstFtsParser] `json:"parser"`
}

FTS ranking (Postgres ts_rank). Turbopuffer: prefer vector search over BM25.

func (BranchEntityQueryParamsRankByRankAstFts) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstFtsKind

type BranchEntityQueryParamsRankByRankAstFtsKind string
const (
	BranchEntityQueryParamsRankByRankAstFtsKindFts BranchEntityQueryParamsRankByRankAstFtsKind = "fts"
)

func (BranchEntityQueryParamsRankByRankAstFtsKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsOptions

type BranchEntityQueryParamsRankByRankAstFtsOptions struct {
	LastAsPrefix param.Field[bool] `json:"last_as_prefix"`
}

Optional prefix options (Postgres only; Turbopuffer should use vector search).

func (BranchEntityQueryParamsRankByRankAstFtsOptions) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstFtsParser

type BranchEntityQueryParamsRankByRankAstFtsParser string

FTS parser (default: plain). Options: plain (all words), fts (websearch with OR/-/quotes), phrase (exact sequence), tsquery (raw).

const (
	BranchEntityQueryParamsRankByRankAstFtsParserFts     BranchEntityQueryParamsRankByRankAstFtsParser = "fts"
	BranchEntityQueryParamsRankByRankAstFtsParserTsquery BranchEntityQueryParamsRankByRankAstFtsParser = "tsquery"
	BranchEntityQueryParamsRankByRankAstFtsParserPhrase  BranchEntityQueryParamsRankByRankAstFtsParser = "phrase"
	BranchEntityQueryParamsRankByRankAstFtsParserPlain   BranchEntityQueryParamsRankByRankAstFtsParser = "plain"
)

func (BranchEntityQueryParamsRankByRankAstFtsParser) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsTarget

type BranchEntityQueryParamsRankByRankAstFtsTarget struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstFtsTargetKind] `json:"kind" api:"required"`
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsRankByRankAstFtsTargetField] `json:"field"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" format:"uuid"`
}

FTS target field (property or $fts).

func (BranchEntityQueryParamsRankByRankAstFtsTarget) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstFtsTargetField

type BranchEntityQueryParamsRankByRankAstFtsTargetField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldID        BranchEntityQueryParamsRankByRankAstFtsTargetField = "$id"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldClassID   BranchEntityQueryParamsRankByRankAstFtsTargetField = "$class_id"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldCreatedAt BranchEntityQueryParamsRankByRankAstFtsTargetField = "$created_at"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldUpdatedAt BranchEntityQueryParamsRankByRankAstFtsTargetField = "$updated_at"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldVotes     BranchEntityQueryParamsRankByRankAstFtsTargetField = "$votes"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldComments  BranchEntityQueryParamsRankByRankAstFtsTargetField = "$comments"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldFts       BranchEntityQueryParamsRankByRankAstFtsTargetField = "$fts"
)

func (BranchEntityQueryParamsRankByRankAstFtsTargetField) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefProperty

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefProperty struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefPropertyKind] `json:"kind" api:"required"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" api:"required" format:"uuid"`
}

func (BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefProperty) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefPropertyKind

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefPropertyKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefPropertyKindProperty BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefPropertyKind = "property"
)

func (BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefPropertyKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystem

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystem struct {
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField] `json:"field" api:"required"`
	// Reference to a system field.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemKind] `json:"kind" api:"required"`
}

func (BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystem) MarshalJSON

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldID        BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$id"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldClassID   BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$class_id"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldCreatedAt BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$created_at"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldUpdatedAt BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$updated_at"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldVotes     BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$votes"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldComments  BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$comments"
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemFieldFts       BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField = "$fts"
)

func (BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemField) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemKind

type BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemKind string

Reference to a system field.

const (
	BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemKindSystem BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemKind = "system"
)

func (BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystemKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsTargetKind

type BranchEntityQueryParamsRankByRankAstFtsTargetKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstFtsTargetKindProperty BranchEntityQueryParamsRankByRankAstFtsTargetKind = "property"
	BranchEntityQueryParamsRankByRankAstFtsTargetKindSystem   BranchEntityQueryParamsRankByRankAstFtsTargetKind = "system"
)

func (BranchEntityQueryParamsRankByRankAstFtsTargetKind) IsKnown

type BranchEntityQueryParamsRankByRankAstFtsTargetUnion

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

FTS target field (property or $fts).

Satisfied by BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefProperty, BranchEntityQueryParamsRankByRankAstFtsTargetFieldRefSystem, BranchEntityQueryParamsRankByRankAstFtsTarget.

type BranchEntityQueryParamsRankByRankAstOrder

type BranchEntityQueryParamsRankByRankAstOrder struct {
	// Sort direction.
	Direction param.Field[BranchEntityQueryParamsRankByRankAstOrderDirection] `json:"direction" api:"required"`
	// Field reference (property UUID or system field).
	Field param.Field[BranchEntityQueryParamsRankByRankAstOrderFieldUnion] `json:"field" api:"required"`
	Kind  param.Field[BranchEntityQueryParamsRankByRankAstOrderKind]       `json:"kind" api:"required"`
}

Order results by a field (attribute ordering).

func (BranchEntityQueryParamsRankByRankAstOrder) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstOrderDirection

type BranchEntityQueryParamsRankByRankAstOrderDirection string

Sort direction.

const (
	BranchEntityQueryParamsRankByRankAstOrderDirectionAsc  BranchEntityQueryParamsRankByRankAstOrderDirection = "asc"
	BranchEntityQueryParamsRankByRankAstOrderDirectionDesc BranchEntityQueryParamsRankByRankAstOrderDirection = "desc"
)

func (BranchEntityQueryParamsRankByRankAstOrderDirection) IsKnown

type BranchEntityQueryParamsRankByRankAstOrderField

type BranchEntityQueryParamsRankByRankAstOrderField struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstOrderFieldKind] `json:"kind" api:"required"`
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsRankByRankAstOrderFieldField] `json:"field"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" format:"uuid"`
}

Field reference (property UUID or system field).

func (BranchEntityQueryParamsRankByRankAstOrderField) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstOrderFieldField

type BranchEntityQueryParamsRankByRankAstOrderFieldField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldID        BranchEntityQueryParamsRankByRankAstOrderFieldField = "$id"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldClassID   BranchEntityQueryParamsRankByRankAstOrderFieldField = "$class_id"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldCreatedAt BranchEntityQueryParamsRankByRankAstOrderFieldField = "$created_at"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldUpdatedAt BranchEntityQueryParamsRankByRankAstOrderFieldField = "$updated_at"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldVotes     BranchEntityQueryParamsRankByRankAstOrderFieldField = "$votes"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldComments  BranchEntityQueryParamsRankByRankAstOrderFieldField = "$comments"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldFts       BranchEntityQueryParamsRankByRankAstOrderFieldField = "$fts"
)

func (BranchEntityQueryParamsRankByRankAstOrderFieldField) IsKnown

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefProperty

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefProperty struct {
	// Reference to a property UUID.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefPropertyKind] `json:"kind" api:"required"`
	// Property UUID (matches repository schema property IDs).
	PropertyID param.Field[string] `json:"propertyId" api:"required" format:"uuid"`
}

func (BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefProperty) MarshalJSON

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefPropertyKind

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefPropertyKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefPropertyKindProperty BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefPropertyKind = "property"
)

func (BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefPropertyKind) IsKnown

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystem

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystem struct {
	// System field reference (backend support varies).
	Field param.Field[BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField] `json:"field" api:"required"`
	// Reference to a system field.
	Kind param.Field[BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemKind] `json:"kind" api:"required"`
}

func (BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystem) MarshalJSON

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField string

System field reference (backend support varies).

const (
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldID        BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$id"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldClassID   BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$class_id"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldCreatedAt BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$created_at"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldUpdatedAt BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$updated_at"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldVotes     BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$votes"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldComments  BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$comments"
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemFieldFts       BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField = "$fts"
)

func (BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemField) IsKnown

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemKind

type BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemKind string

Reference to a system field.

const (
	BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemKindSystem BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemKind = "system"
)

func (BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystemKind) IsKnown

type BranchEntityQueryParamsRankByRankAstOrderFieldKind

type BranchEntityQueryParamsRankByRankAstOrderFieldKind string

Reference to a property UUID.

const (
	BranchEntityQueryParamsRankByRankAstOrderFieldKindProperty BranchEntityQueryParamsRankByRankAstOrderFieldKind = "property"
	BranchEntityQueryParamsRankByRankAstOrderFieldKindSystem   BranchEntityQueryParamsRankByRankAstOrderFieldKind = "system"
)

func (BranchEntityQueryParamsRankByRankAstOrderFieldKind) IsKnown

type BranchEntityQueryParamsRankByRankAstOrderFieldUnion

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

Field reference (property UUID or system field).

Satisfied by BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefProperty, BranchEntityQueryParamsRankByRankAstOrderFieldFieldRefSystem, BranchEntityQueryParamsRankByRankAstOrderField.

type BranchEntityQueryParamsRankByRankAstOrderKind

type BranchEntityQueryParamsRankByRankAstOrderKind string
const (
	BranchEntityQueryParamsRankByRankAstOrderKindOrder BranchEntityQueryParamsRankByRankAstOrderKind = "order"
)

func (BranchEntityQueryParamsRankByRankAstOrderKind) IsKnown

type BranchEntityQueryParamsRankByRankAstVector

type BranchEntityQueryParamsRankByRankAstVector struct {
	Kind param.Field[BranchEntityQueryParamsRankByRankAstVectorKind] `json:"kind" api:"required"`
	// Vector ranking mode (kNN requires filters in Turbopuffer).
	Mode param.Field[BranchEntityQueryParamsRankByRankAstVectorMode] `json:"mode" api:"required"`
	// Embedding model (default: text-embedding-3-small).
	Model param.Field[string] `json:"model"`
	// Text to embed (provide this OR vector).
	Query param.Field[string] `json:"query"`
	// Raw embedding vector (provide this OR query).
	Vector param.Field[[]float64] `json:"vector"`
}

Vector ranking (ANN or kNN). Provide either raw vector or query string to embed.

func (BranchEntityQueryParamsRankByRankAstVector) MarshalJSON

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

type BranchEntityQueryParamsRankByRankAstVectorKind

type BranchEntityQueryParamsRankByRankAstVectorKind string
const (
	BranchEntityQueryParamsRankByRankAstVectorKindVector BranchEntityQueryParamsRankByRankAstVectorKind = "vector"
)

func (BranchEntityQueryParamsRankByRankAstVectorKind) IsKnown

type BranchEntityQueryParamsRankByRankAstVectorMode

type BranchEntityQueryParamsRankByRankAstVectorMode string

Vector ranking mode (kNN requires filters in Turbopuffer).

const (
	BranchEntityQueryParamsRankByRankAstVectorModeAnn BranchEntityQueryParamsRankByRankAstVectorMode = "ANN"
	BranchEntityQueryParamsRankByRankAstVectorModeKNn BranchEntityQueryParamsRankByRankAstVectorMode = "kNN"
)

func (BranchEntityQueryParamsRankByRankAstVectorMode) IsKnown

type BranchEntityQueryParamsRankByUnion

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

Ranking/sorting AST. Supports vector search, full-text search, field ordering, and composite ranking.

Satisfied by BranchEntityQueryParamsRankByRankAstOrder, BranchEntityQueryParamsRankByRankAstVector, BranchEntityQueryParamsRankByRankAstBm25, BranchEntityQueryParamsRankByRankAstFts, BranchEntityQueryParamsRankByRankAstFilterBoost, BranchEntityQueryParamsRankBy.

Use [Raw()] to specify an arbitrary value for this param

type BranchEntityQueryResponse

type BranchEntityQueryResponse struct {
	Backend BranchEntityQueryResponseBackend `json:"backend" api:"required"`
	Data    []BranchEntityQueryResponseData  `json:"data" api:"required"`
	HasMore bool                             `json:"has_more" api:"required"`
	JSON    branchEntityQueryResponseJSON    `json:"-"`
}

func (*BranchEntityQueryResponse) UnmarshalJSON

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

type BranchEntityQueryResponseBackend

type BranchEntityQueryResponseBackend string
const (
	BranchEntityQueryResponseBackendPostgres    BranchEntityQueryResponseBackend = "postgres"
	BranchEntityQueryResponseBackendTurbopuffer BranchEntityQueryResponseBackend = "turbopuffer"
)

func (BranchEntityQueryResponseBackend) IsKnown

type BranchEntityQueryResponseData

type BranchEntityQueryResponseData struct {
	ClassID      string                            `json:"classId" api:"required"`
	CreatedAt    time.Time                         `json:"createdAt" api:"required" format:"date-time"`
	EntityID     string                            `json:"entityId" api:"required"`
	Properties   map[string]interface{}            `json:"properties" api:"required"`
	UpdatedAt    time.Time                         `json:"updatedAt" api:"required" format:"date-time"`
	CommentCount float64                           `json:"commentCount" api:"nullable"`
	HasVoted     bool                              `json:"hasVoted" api:"nullable"`
	Rank         float64                           `json:"rank"`
	VoteCount    float64                           `json:"voteCount" api:"nullable"`
	JSON         branchEntityQueryResponseDataJSON `json:"-"`
}

func (*BranchEntityQueryResponseData) UnmarshalJSON

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

type BranchEntityService

type BranchEntityService struct {
	Options []option.RequestOption
}

Create, query, and search your data

BranchEntityService contains methods and other services that help with interacting with the modern-relay 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 NewBranchEntityService method instead.

func NewBranchEntityService

func NewBranchEntityService(opts ...option.RequestOption) (r *BranchEntityService)

NewBranchEntityService 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 (*BranchEntityService) Delete

func (r *BranchEntityService) Delete(ctx context.Context, branchID string, body BranchEntityDeleteParams, opts ...option.RequestOption) (res *float64, err error)

Deletes one or more entities by their IDs.

func (*BranchEntityService) Get

Returns one or more entities by their IDs, including all property values.

func (*BranchEntityService) List

Returns a paginated list of entities for a given class, ordered by creation date. For filtering, search, and ranking, use POST /entities/query.

func (*BranchEntityService) ListAutoPaging

Returns a paginated list of entities for a given class, ordered by creation date. For filtering, search, and ranking, use POST /entities/query.

func (*BranchEntityService) ListBackreferences

Returns entities that reference the specified entity via reference properties.

func (*BranchEntityService) ListBackreferencesAutoPaging

Returns entities that reference the specified entity via reference properties.

func (*BranchEntityService) New

func (r *BranchEntityService) New(ctx context.Context, branchID string, body BranchEntityNewParams, opts ...option.RequestOption) (res *[]string, err error)

Creates one or more entity instances of a specified class.

func (*BranchEntityService) Query

Query entities with filters, full-text search, vector search, ranking, and relationship expansion. Supports the full query DSL. Call GET /schema first to discover class and property UUIDs.

func (*BranchEntityService) Update

func (r *BranchEntityService) Update(ctx context.Context, branchID string, entityID string, body BranchEntityUpdateParams, opts ...option.RequestOption) (res *BranchEntityUpdateResponse, err error)

Updates an entity by setting the values of the properties passed.

func (*BranchEntityService) UpdateBatch

func (r *BranchEntityService) UpdateBatch(ctx context.Context, branchID string, body BranchEntityUpdateBatchParams, opts ...option.RequestOption) (res *bool, err error)

Applies the same property values to multiple entities at once.

type BranchEntityUpdateBatchParams

type BranchEntityUpdateBatchParams struct {
	EntityIDs  param.Field[[]string]                                                `json:"entityIds" api:"required" format:"uuid"`
	Properties param.Field[map[string]BranchEntityUpdateBatchParamsPropertiesUnion] `json:"properties" api:"required" format:"date-time"`
}

func (BranchEntityUpdateBatchParams) MarshalJSON

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

type BranchEntityUpdateBatchParamsPropertiesArray

type BranchEntityUpdateBatchParamsPropertiesArray []BranchEntityUpdateBatchParamsPropertiesArrayItemUnion

func (BranchEntityUpdateBatchParamsPropertiesArray) ImplementsBranchEntityUpdateBatchParamsPropertiesUnion

func (r BranchEntityUpdateBatchParamsPropertiesArray) ImplementsBranchEntityUpdateBatchParamsPropertiesUnion()

type BranchEntityUpdateBatchParamsPropertiesArrayItemUnion

type BranchEntityUpdateBatchParamsPropertiesArrayItemUnion interface {
	ImplementsBranchEntityUpdateBatchParamsPropertiesArrayItemUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime.

type BranchEntityUpdateBatchParamsPropertiesMap

type BranchEntityUpdateBatchParamsPropertiesMap map[string]interface{}

func (BranchEntityUpdateBatchParamsPropertiesMap) ImplementsBranchEntityUpdateBatchParamsPropertiesUnion

func (r BranchEntityUpdateBatchParamsPropertiesMap) ImplementsBranchEntityUpdateBatchParamsPropertiesUnion()

type BranchEntityUpdateBatchParamsPropertiesUnion

type BranchEntityUpdateBatchParamsPropertiesUnion interface {
	ImplementsBranchEntityUpdateBatchParamsPropertiesUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime, BranchEntityUpdateBatchParamsPropertiesArray, BranchEntityUpdateBatchParamsPropertiesMap.

type BranchEntityUpdateParams

type BranchEntityUpdateParams struct {
	Data param.Field[map[string]BranchEntityUpdateParamsDataUnion] `json:"data" api:"required" format:"date-time"`
	// Clear existing values for properties. Should be true if properties are being
	// updated with new values rather than appended to existing values.
	ClearExistingValues param.Field[bool] `json:"clearExistingValues"`
}

func (BranchEntityUpdateParams) MarshalJSON

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

type BranchEntityUpdateParamsDataArray

type BranchEntityUpdateParamsDataArray []BranchEntityUpdateParamsDataArrayItemUnion

func (BranchEntityUpdateParamsDataArray) ImplementsBranchEntityUpdateParamsDataUnion

func (r BranchEntityUpdateParamsDataArray) ImplementsBranchEntityUpdateParamsDataUnion()

type BranchEntityUpdateParamsDataArrayItemUnion

type BranchEntityUpdateParamsDataArrayItemUnion interface {
	ImplementsBranchEntityUpdateParamsDataArrayItemUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime.

type BranchEntityUpdateParamsDataMap

type BranchEntityUpdateParamsDataMap map[string]interface{}

func (BranchEntityUpdateParamsDataMap) ImplementsBranchEntityUpdateParamsDataUnion

func (r BranchEntityUpdateParamsDataMap) ImplementsBranchEntityUpdateParamsDataUnion()

type BranchEntityUpdateParamsDataUnion

type BranchEntityUpdateParamsDataUnion interface {
	ImplementsBranchEntityUpdateParamsDataUnion()
}

Satisfied by shared.UnionString, shared.UnionFloat, shared.UnionBool, shared.UnionTime, BranchEntityUpdateParamsDataArray, BranchEntityUpdateParamsDataMap.

type BranchEntityUpdateResponse

type BranchEntityUpdateResponse struct {
	Success bool                           `json:"success" api:"required"`
	JSON    branchEntityUpdateResponseJSON `json:"-"`
}

func (*BranchEntityUpdateResponse) UnmarshalJSON

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

type BranchListChildrenParams

type BranchListChildrenParams struct {
	Limit  param.Field[int64] `query:"limit"`
	Offset param.Field[int64] `query:"offset"`
}

func (BranchListChildrenParams) URLQuery

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

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

type BranchListParams

type BranchListParams struct {
	Limit  param.Field[int64] `query:"limit"`
	Offset param.Field[int64] `query:"offset"`
}

func (BranchListParams) URLQuery

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

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

type BranchMergeParams

type BranchMergeParams struct {
	TargetBranchID param.Field[string] `json:"targetBranchId" api:"required" format:"uuid"`
}

func (BranchMergeParams) MarshalJSON

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

type BranchNewParams

type BranchNewParams struct {
	Name    param.Field[string] `json:"name" api:"required"`
	IsGuest param.Field[bool]   `json:"isGuest"`
}

func (BranchNewParams) MarshalJSON

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

type BranchPropertyNewBatchParams

type BranchPropertyNewBatchParams struct {
	// Array of property definitions to create
	Properties param.Field[[]BranchPropertyNewBatchParamsProperty] `json:"properties" api:"required"`
}

func (BranchPropertyNewBatchParams) MarshalJSON

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

type BranchPropertyNewBatchParamsPropertiesRange

type BranchPropertyNewBatchParamsPropertiesRange string
const (
	BranchPropertyNewBatchParamsPropertiesRangeString    BranchPropertyNewBatchParamsPropertiesRange = "string"
	BranchPropertyNewBatchParamsPropertiesRangeNumber    BranchPropertyNewBatchParamsPropertiesRange = "number"
	BranchPropertyNewBatchParamsPropertiesRangeBoolean   BranchPropertyNewBatchParamsPropertiesRange = "boolean"
	BranchPropertyNewBatchParamsPropertiesRangeDatetime  BranchPropertyNewBatchParamsPropertiesRange = "datetime"
	BranchPropertyNewBatchParamsPropertiesRangeReference BranchPropertyNewBatchParamsPropertiesRange = "reference"
)

func (BranchPropertyNewBatchParamsPropertiesRange) IsKnown

type BranchPropertyNewBatchParamsProperty

type BranchPropertyNewBatchParamsProperty struct {
	APIName param.Field[string] `json:"apiName" api:"required"`
	// Which classes this property belongs to
	Domain param.Field[[]string] `json:"domain" api:"required" format:"uuid"`
	// The human readable display name of the property (Capitalize the first letter)
	// (e.g. 'Last Name', 'Email', 'Age', etc.)
	Name    param.Field[string]                                      `json:"name" api:"required"`
	Range   param.Field[BranchPropertyNewBatchParamsPropertiesRange] `json:"range" api:"required"`
	Default param.Field[interface{}]                                 `json:"default"`
	// Provide a description for the property if it's not obvious from the name.
	Description param.Field[string] `json:"description"`
	DisplayName param.Field[bool]   `json:"displayName"`
	MultiValued param.Field[bool]   `json:"multiValued"`
	// Which classes this property references
	ReferenceClasses param.Field[[]string] `json:"referenceClasses" format:"uuid"`
	Required         param.Field[bool]     `json:"required"`
	TargetBranchID   param.Field[string]   `json:"targetBranchId" format:"uuid"`
	Unique           param.Field[bool]     `json:"unique"`
}

func (BranchPropertyNewBatchParamsProperty) MarshalJSON

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

type BranchPropertyNewParams

type BranchPropertyNewParams struct {
	Property param.Field[BranchPropertyNewParamsProperty] `json:"property" api:"required"`
}

func (BranchPropertyNewParams) MarshalJSON

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

type BranchPropertyNewParamsProperty

type BranchPropertyNewParamsProperty struct {
	APIName param.Field[string] `json:"apiName" api:"required"`
	// Which classes this property belongs to
	Domain param.Field[[]string] `json:"domain" api:"required" format:"uuid"`
	// The human readable display name of the property (Capitalize the first letter)
	// (e.g. 'Last Name', 'Email', 'Age', etc.)
	Name    param.Field[string]                               `json:"name" api:"required"`
	Range   param.Field[BranchPropertyNewParamsPropertyRange] `json:"range" api:"required"`
	Default param.Field[interface{}]                          `json:"default"`
	// Provide a description for the property if it's not obvious from the name.
	Description param.Field[string] `json:"description"`
	DisplayName param.Field[bool]   `json:"displayName"`
	MultiValued param.Field[bool]   `json:"multiValued"`
	// Which classes this property references
	ReferenceClasses param.Field[[]string] `json:"referenceClasses" format:"uuid"`
	Required         param.Field[bool]     `json:"required"`
	TargetBranchID   param.Field[string]   `json:"targetBranchId" format:"uuid"`
	Unique           param.Field[bool]     `json:"unique"`
}

func (BranchPropertyNewParamsProperty) MarshalJSON

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

type BranchPropertyNewParamsPropertyRange

type BranchPropertyNewParamsPropertyRange string
const (
	BranchPropertyNewParamsPropertyRangeString    BranchPropertyNewParamsPropertyRange = "string"
	BranchPropertyNewParamsPropertyRangeNumber    BranchPropertyNewParamsPropertyRange = "number"
	BranchPropertyNewParamsPropertyRangeBoolean   BranchPropertyNewParamsPropertyRange = "boolean"
	BranchPropertyNewParamsPropertyRangeDatetime  BranchPropertyNewParamsPropertyRange = "datetime"
	BranchPropertyNewParamsPropertyRangeReference BranchPropertyNewParamsPropertyRange = "reference"
)

func (BranchPropertyNewParamsPropertyRange) IsKnown

type BranchPropertyService

type BranchPropertyService struct {
	Options []option.RequestOption
}

Define classes and properties for your data model

BranchPropertyService contains methods and other services that help with interacting with the modern-relay 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 NewBranchPropertyService method instead.

func NewBranchPropertyService

func NewBranchPropertyService(opts ...option.RequestOption) (r *BranchPropertyService)

NewBranchPropertyService 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 (*BranchPropertyService) Delete

func (r *BranchPropertyService) Delete(ctx context.Context, branchID string, propertyID string, opts ...option.RequestOption) (res *bool, err error)

Permanently deletes a property definition from the schema.

func (*BranchPropertyService) New

func (r *BranchPropertyService) New(ctx context.Context, branchID string, body BranchPropertyNewParams, opts ...option.RequestOption) (res *string, err error)

Creates a new property definition for one or more classes.

func (*BranchPropertyService) NewBatch

func (r *BranchPropertyService) NewBatch(ctx context.Context, branchID string, body BranchPropertyNewBatchParams, opts ...option.RequestOption) (res *[]string, err error)

Creates multiple property definitions in a single request. Returns an array of created property IDs.

func (*BranchPropertyService) Update

func (r *BranchPropertyService) Update(ctx context.Context, branchID string, propertyID string, body BranchPropertyUpdateParams, opts ...option.RequestOption) (err error)

Updates the specified property by setting the values of the parameters passed.

type BranchPropertyUpdateParams

type BranchPropertyUpdateParams struct {
	Updates param.Field[BranchPropertyUpdateParamsUpdates] `json:"updates" api:"required"`
}

func (BranchPropertyUpdateParams) MarshalJSON

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

type BranchPropertyUpdateParamsUpdates

type BranchPropertyUpdateParamsUpdates struct {
	APIName     param.Field[string] `json:"apiName"`
	Description param.Field[string] `json:"description"`
	DisplayName param.Field[bool]   `json:"displayName"`
	Name        param.Field[string] `json:"name"`
}

func (BranchPropertyUpdateParamsUpdates) MarshalJSON

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

type BranchSchemaGetResponse

type BranchSchemaGetResponse struct {
	// Map of class apiName → class UUID. Use to resolve names to IDs for queries.
	ClassIDs map[string]string `json:"classIds" api:"required"`
	// Map of class UUID → apiName. Reverse lookup.
	ClassIDToAPIName map[string]string `json:"classIdToApiName" api:"required"`
	// Map of class UUID → plural display name
	ClassIDToPluralName map[string]string `json:"classIdToPluralName" api:"required"`
	// Map of class UUID → singular display name
	ClassIDToSingularName map[string]string `json:"classIdToSingularName" api:"required"`
	// Map of "ClassName.propertyApiName" → property UUID. Use to resolve property
	// names to IDs.
	PropertyIDs map[string]string `json:"propertyIds" api:"required"`
	// Map of property UUID → apiName. Reverse lookup.
	PropertyIDToAPIName map[string]string `json:"propertyIdToApiName" api:"required"`
	// Complete schema with class and property definitions keyed by UUID
	Schema   BranchSchemaGetResponseSchema   `json:"schema" api:"required"`
	QueryDsl BranchSchemaGetResponseQueryDsl `json:"queryDsl"`
	JSON     branchSchemaGetResponseJSON     `json:"-"`
}

func (*BranchSchemaGetResponse) UnmarshalJSON

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

type BranchSchemaGetResponseQueryDsl

type BranchSchemaGetResponseQueryDsl struct {
	FilterOperators     []string                            `json:"filterOperators" api:"required"`
	LogicalOperators    []string                            `json:"logicalOperators" api:"required"`
	RankCombinators     []string                            `json:"rankCombinators" api:"required"`
	RankTypes           []string                            `json:"rankTypes" api:"required"`
	RelationalOperators []string                            `json:"relationalOperators" api:"required"`
	SortDirections      []string                            `json:"sortDirections" api:"required"`
	JSON                branchSchemaGetResponseQueryDslJSON `json:"-"`
}

func (*BranchSchemaGetResponseQueryDsl) UnmarshalJSON

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

type BranchSchemaGetResponseSchema

type BranchSchemaGetResponseSchema struct {
	Classes    map[string]BranchSchemaGetResponseSchemaClass    `json:"classes" api:"required"`
	Properties map[string]BranchSchemaGetResponseSchemaProperty `json:"properties" api:"required"`
	JSON       branchSchemaGetResponseSchemaJSON                `json:"-"`
}

Complete schema with class and property definitions keyed by UUID

func (*BranchSchemaGetResponseSchema) UnmarshalJSON

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

type BranchSchemaGetResponseSchemaClass

type BranchSchemaGetResponseSchemaClass struct {
	APIName      string `json:"apiName" api:"required"`
	PluralName   string `json:"pluralName" api:"required"`
	SingularName string `json:"singularName" api:"required"`
	Description  string `json:"description"`
	// Per-class FTS flag. null/undefined = use storage backend default
	FtsEnabled bool `json:"ftsEnabled" api:"nullable"`
	// Marks system-managed classes that cannot be deleted by users
	IsSystem bool `json:"isSystem"`
	// Per-class vector search flag. null/undefined = use storage backend default
	VectorSearchEnabled bool                                   `json:"vectorSearchEnabled" api:"nullable"`
	JSON                branchSchemaGetResponseSchemaClassJSON `json:"-"`
}

func (*BranchSchemaGetResponseSchemaClass) UnmarshalJSON

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

type BranchSchemaGetResponseSchemaPropertiesRange

type BranchSchemaGetResponseSchemaPropertiesRange string
const (
	BranchSchemaGetResponseSchemaPropertiesRangeString    BranchSchemaGetResponseSchemaPropertiesRange = "string"
	BranchSchemaGetResponseSchemaPropertiesRangeNumber    BranchSchemaGetResponseSchemaPropertiesRange = "number"
	BranchSchemaGetResponseSchemaPropertiesRangeBoolean   BranchSchemaGetResponseSchemaPropertiesRange = "boolean"
	BranchSchemaGetResponseSchemaPropertiesRangeDatetime  BranchSchemaGetResponseSchemaPropertiesRange = "datetime"
	BranchSchemaGetResponseSchemaPropertiesRangeReference BranchSchemaGetResponseSchemaPropertiesRange = "reference"
)

func (BranchSchemaGetResponseSchemaPropertiesRange) IsKnown

type BranchSchemaGetResponseSchemaProperty

type BranchSchemaGetResponseSchemaProperty struct {
	APIName string `json:"apiName" api:"required"`
	// Which classes this property belongs to
	Domain []string `json:"domain" api:"required" format:"uuid"`
	// The human readable display name of the property (Capitalize the first letter)
	// (e.g. 'Last Name', 'Email', 'Age', etc.)
	Name    string                                       `json:"name" api:"required"`
	Range   BranchSchemaGetResponseSchemaPropertiesRange `json:"range" api:"required"`
	Default interface{}                                  `json:"default"`
	// Provide a description for the property if it's not obvious from the name.
	Description string `json:"description" api:"nullable"`
	DisplayName bool   `json:"displayName"`
	MultiValued bool   `json:"multiValued"`
	// Which classes this property references
	ReferenceClasses []string                                  `json:"referenceClasses" format:"uuid"`
	Required         bool                                      `json:"required"`
	TargetBranchID   string                                    `json:"targetBranchId" format:"uuid"`
	Unique           bool                                      `json:"unique"`
	JSON             branchSchemaGetResponseSchemaPropertyJSON `json:"-"`
}

func (*BranchSchemaGetResponseSchemaProperty) UnmarshalJSON

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

type BranchSchemaService

type BranchSchemaService struct {
	Options []option.RequestOption
}

Define classes and properties for your data model

BranchSchemaService contains methods and other services that help with interacting with the modern-relay 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 NewBranchSchemaService method instead.

func NewBranchSchemaService

func NewBranchSchemaService(opts ...option.RequestOption) (r *BranchSchemaService)

NewBranchSchemaService 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 (*BranchSchemaService) Get

func (r *BranchSchemaService) Get(ctx context.Context, branchID string, opts ...option.RequestOption) (res *BranchSchemaGetResponse, err error)

Call this first to discover the data model before any data operations. Returns class definitions, property definitions, and bidirectional UUID lookup maps. Use `classIds` (apiName → UUID) and `propertyIds` ('ClassName.propApiName' → UUID) to resolve human-readable names to UUIDs for queries.

type BranchService

type BranchService struct {
	Options []option.RequestOption
	// Define classes and properties for your data model
	Schema *BranchSchemaService
	// Define classes and properties for your data model
	Classes *BranchClassService
	// Define classes and properties for your data model
	Properties *BranchPropertyService
	// Create, query, and search your data
	Entities *BranchEntityService
}

Propose, review, and merge changes to data

BranchService contains methods and other services that help with interacting with the modern-relay 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 NewBranchService method instead.

func NewBranchService

func NewBranchService(opts ...option.RequestOption) (r *BranchService)

NewBranchService 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 (*BranchService) Delete

func (r *BranchService) Delete(ctx context.Context, branchID string, opts ...option.RequestOption) (res *bool, err error)

Permanently deletes a branch and all its associated facts. Cannot delete branches with children or the main branch.

func (*BranchService) Diff

func (r *BranchService) Diff(ctx context.Context, branchID string, query BranchDiffParams, opts ...option.RequestOption) (res *BranchDiffResponse, err error)

Returns the set of entity changes on this branch compared to its parent. Shows added and removed property values per entity.

func (*BranchService) Get

func (r *BranchService) Get(ctx context.Context, branchID string, opts ...option.RequestOption) (res *Branch, err error)

Retrieves the details of an existing branch.

func (*BranchService) List

func (r *BranchService) List(ctx context.Context, repositoryID string, query BranchListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Branch], err error)

Returns a paginated list of all branches for the specified repository.

func (*BranchService) ListAutoPaging

func (r *BranchService) ListAutoPaging(ctx context.Context, repositoryID string, query BranchListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Branch]

Returns a paginated list of all branches for the specified repository.

func (*BranchService) ListChildren

func (r *BranchService) ListChildren(ctx context.Context, branchID string, query BranchListChildrenParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Branch], err error)

Returns a list of branches that are direct children of the specified branch.

func (*BranchService) ListChildrenAutoPaging

func (r *BranchService) ListChildrenAutoPaging(ctx context.Context, branchID string, query BranchListChildrenParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[Branch]

Returns a list of branches that are direct children of the specified branch.

func (*BranchService) Merge

func (r *BranchService) Merge(ctx context.Context, sourceBranchID string, body BranchMergeParams, opts ...option.RequestOption) (err error)

Merges all changes from the source branch into the target branch. The source branch ID comes from the URL path; the target branch ID must be provided in the request body.

func (*BranchService) New

func (r *BranchService) New(ctx context.Context, repositoryID string, body BranchNewParams, opts ...option.RequestOption) (res *Branch, err error)

Creates a new branch from the repository's main data.

type Client

type Client struct {
	Options []option.RequestOption
	// Create and manage data repositories
	Repositories *RepositoryService
	// Propose, review, and merge changes to data
	Branches *BranchService
	// Review workflows for collaborative data contributions. Proposals isolate changes
	// on branches for human review before merging.
	Proposals *ProposalService
	// Search entities across repositories
	Search *SearchService
}

Client creates a struct with services and top level methods that help with interacting with the modern-relay 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 (MODERN_RELAY_API_KEY, MODERN_RELAY_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 Error

type Error = apierror.Error

type Proposal

type Proposal struct {
	ID          string           `json:"id" api:"required" format:"uuid"`
	AccountID   string           `json:"account_id" api:"required" format:"uuid"`
	Branches    []ProposalBranch `json:"branches" api:"required"`
	CreatedAt   string           `json:"created_at" api:"required"`
	CreatedBy   string           `json:"created_by" api:"required,nullable" format:"uuid"`
	Description string           `json:"description" api:"required,nullable"`
	Status      ProposalStatus   `json:"status" api:"required"`
	Title       string           `json:"title" api:"required,nullable"`
	UpdatedAt   string           `json:"updated_at" api:"required"`
	JSON        proposalJSON     `json:"-"`
}

func (*Proposal) UnmarshalJSON

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

type ProposalAcceptParams

type ProposalAcceptParams struct {
	BranchID param.Field[string] `json:"branchId" api:"required" format:"uuid"`
}

func (ProposalAcceptParams) MarshalJSON

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

type ProposalAcceptResponse

type ProposalAcceptResponse struct {
	MergeEventID string                     `json:"mergeEventId" api:"required" format:"uuid"`
	Success      bool                       `json:"success" api:"required"`
	JSON         proposalAcceptResponseJSON `json:"-"`
}

func (*ProposalAcceptResponse) UnmarshalJSON

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

type ProposalBranch

type ProposalBranch struct {
	BranchID          string             `json:"branch_id" api:"required" format:"uuid"`
	ProposalID        string             `json:"proposal_id" api:"required" format:"uuid"`
	BranchName        string             `json:"branch_name"`
	HasPendingChanges bool               `json:"has_pending_changes"`
	LastMergeEventID  string             `json:"last_merge_event_id" api:"nullable" format:"uuid"`
	RepositoryID      string             `json:"repository_id" format:"uuid"`
	RepositoryName    string             `json:"repository_name"`
	RepositorySlug    string             `json:"repository_slug"`
	JSON              proposalBranchJSON `json:"-"`
}

func (*ProposalBranch) UnmarshalJSON

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

type ProposalBranchLinkParams

type ProposalBranchLinkParams struct {
	BranchID param.Field[string] `json:"branchId" api:"required" format:"uuid"`
}

func (ProposalBranchLinkParams) MarshalJSON

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

type ProposalBranchService

type ProposalBranchService struct {
	Options []option.RequestOption
}

Review workflows for collaborative data contributions. Proposals isolate changes on branches for human review before merging.

ProposalBranchService contains methods and other services that help with interacting with the modern-relay 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 NewProposalBranchService method instead.

func NewProposalBranchService

func NewProposalBranchService(opts ...option.RequestOption) (r *ProposalBranchService)

NewProposalBranchService 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 (r *ProposalBranchService) Link(ctx context.Context, proposalID string, body ProposalBranchLinkParams, opts ...option.RequestOption) (err error)

Links an existing branch to a proposal. One branch per repository per proposal.

func (r *ProposalBranchService) Unlink(ctx context.Context, proposalID string, branchID string, opts ...option.RequestOption) (err error)

Removes a branch from a proposal without deleting the branch. Cannot remove the last branch.

type ProposalListParams

type ProposalListParams struct {
	Limit  param.Field[int64]                      `query:"limit"`
	Offset param.Field[int64]                      `query:"offset"`
	Status param.Field[[]ProposalListParamsStatus] `query:"status"`
}

func (ProposalListParams) URLQuery

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

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

type ProposalListParamsStatus

type ProposalListParamsStatus string
const (
	ProposalListParamsStatusDraft       ProposalListParamsStatus = "draft"
	ProposalListParamsStatusOpen        ProposalListParamsStatus = "open"
	ProposalListParamsStatusNeedsReview ProposalListParamsStatus = "needs_review"
	ProposalListParamsStatusClosed      ProposalListParamsStatus = "closed"
)

func (ProposalListParamsStatus) IsKnown

func (r ProposalListParamsStatus) IsKnown() bool

type ProposalListResponse

type ProposalListResponse struct {
	ID                string                     `json:"id" api:"required" format:"uuid"`
	BranchID          string                     `json:"branchId" api:"required" format:"uuid"`
	BranchName        string                     `json:"branchName" api:"required"`
	CanAccept         bool                       `json:"canAccept" api:"required"`
	CanEdit           bool                       `json:"canEdit" api:"required"`
	CreatedAt         string                     `json:"createdAt" api:"required"`
	CreatedBy         string                     `json:"createdBy" api:"required,nullable" format:"uuid"`
	Description       string                     `json:"description" api:"required,nullable"`
	HasPendingChanges bool                       `json:"hasPendingChanges" api:"required"`
	IsMerged          bool                       `json:"isMerged" api:"required"`
	IsMine            bool                       `json:"isMine" api:"required"`
	Status            ProposalListResponseStatus `json:"status" api:"required"`
	Title             string                     `json:"title" api:"required,nullable"`
	TotalBranchCount  int64                      `json:"totalBranchCount" api:"required"`
	UpdatedAt         string                     `json:"updatedAt" api:"required"`
	JSON              proposalListResponseJSON   `json:"-"`
}

func (*ProposalListResponse) UnmarshalJSON

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

type ProposalListResponseStatus

type ProposalListResponseStatus string
const (
	ProposalListResponseStatusDraft       ProposalListResponseStatus = "draft"
	ProposalListResponseStatusOpen        ProposalListResponseStatus = "open"
	ProposalListResponseStatusNeedsReview ProposalListResponseStatus = "needs_review"
	ProposalListResponseStatusClosed      ProposalListResponseStatus = "closed"
)

func (ProposalListResponseStatus) IsKnown

func (r ProposalListResponseStatus) IsKnown() bool

type ProposalMergeEventListParams

type ProposalMergeEventListParams struct {
	BranchID param.Field[string] `query:"branchId" format:"uuid"`
	Limit    param.Field[int64]  `query:"limit"`
	Offset   param.Field[int64]  `query:"offset"`
}

func (ProposalMergeEventListParams) URLQuery

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

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

type ProposalMergeEventListResponse

type ProposalMergeEventListResponse struct {
	ID           string                             `json:"id" api:"required" format:"uuid"`
	BranchID     string                             `json:"branch_id" api:"required" format:"uuid"`
	CreatedAt    string                             `json:"created_at" api:"required"`
	CreatedBy    string                             `json:"created_by" api:"required,nullable" format:"uuid"`
	ProposalID   string                             `json:"proposal_id" api:"required" format:"uuid"`
	RepositoryID string                             `json:"repository_id" api:"required" format:"uuid"`
	JSON         proposalMergeEventListResponseJSON `json:"-"`
}

func (*ProposalMergeEventListResponse) UnmarshalJSON

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

type ProposalMergeEventService

type ProposalMergeEventService struct {
	Options []option.RequestOption
}

Review workflows for collaborative data contributions. Proposals isolate changes on branches for human review before merging.

ProposalMergeEventService contains methods and other services that help with interacting with the modern-relay 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 NewProposalMergeEventService method instead.

func NewProposalMergeEventService

func NewProposalMergeEventService(opts ...option.RequestOption) (r *ProposalMergeEventService)

NewProposalMergeEventService 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 (*ProposalMergeEventService) List

Returns a paginated list of merge events for the specified proposal, showing the audit trail of accepted changes.

func (*ProposalMergeEventService) ListAutoPaging

Returns a paginated list of merge events for the specified proposal, showing the audit trail of accepted changes.

type ProposalNewParams

type ProposalNewParams struct {
	BranchIDs param.Field[[]string] `json:"branchIds" api:"required" format:"uuid"`
}

func (ProposalNewParams) MarshalJSON

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

type ProposalNewResponse

type ProposalNewResponse struct {
	ProposalID string                  `json:"proposalId" api:"required" format:"uuid"`
	JSON       proposalNewResponseJSON `json:"-"`
}

func (*ProposalNewResponse) UnmarshalJSON

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

type ProposalService

type ProposalService struct {
	Options []option.RequestOption
	// Review workflows for collaborative data contributions. Proposals isolate changes
	// on branches for human review before merging.
	Branches *ProposalBranchService
	// Review workflows for collaborative data contributions. Proposals isolate changes
	// on branches for human review before merging.
	MergeEvents *ProposalMergeEventService
}

Review workflows for collaborative data contributions. Proposals isolate changes on branches for human review before merging.

ProposalService contains methods and other services that help with interacting with the modern-relay 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 NewProposalService method instead.

func NewProposalService

func NewProposalService(opts ...option.RequestOption) (r *ProposalService)

NewProposalService 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 (*ProposalService) Accept

func (r *ProposalService) Accept(ctx context.Context, proposalID string, body ProposalAcceptParams, opts ...option.RequestOption) (res *ProposalAcceptResponse, err error)

Merges the proposal's branch changes into the parent branch. Creates a merge event for audit. The proposal remains open for further contributions.

func (*ProposalService) Delete

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

Permanently deletes a draft proposal. Only proposals in draft status can be deleted.

func (*ProposalService) Get

func (r *ProposalService) Get(ctx context.Context, proposalID string, opts ...option.RequestOption) (res *Proposal, err error)

Retrieves the details of a proposal, including its associated branches and review status.

func (*ProposalService) List

Returns a paginated list of proposals for the specified repository. Filter by status to find proposals needing review.

func (*ProposalService) ListAutoPaging

Returns a paginated list of proposals for the specified repository. Filter by status to find proposals needing review.

func (*ProposalService) New

Creates a new proposal from existing branches. Accepts an array of branch IDs (one per repository). Returns the proposal ID.

func (*ProposalService) Update

func (r *ProposalService) Update(ctx context.Context, proposalID string, body ProposalUpdateParams, opts ...option.RequestOption) (res *ProposalUpdateResponse, err error)

Updates the proposal title, description, or status. Use status transitions to move through the review workflow: draft → open → needs_review → closed.

type ProposalStatus

type ProposalStatus string
const (
	ProposalStatusDraft       ProposalStatus = "draft"
	ProposalStatusOpen        ProposalStatus = "open"
	ProposalStatusNeedsReview ProposalStatus = "needs_review"
	ProposalStatusClosed      ProposalStatus = "closed"
)

func (ProposalStatus) IsKnown

func (r ProposalStatus) IsKnown() bool

type ProposalUpdateParams

type ProposalUpdateParams struct {
	RepositoryID param.Field[string]                     `json:"repositoryId" api:"required" format:"uuid"`
	BranchID     param.Field[string]                     `json:"branchId" format:"uuid"`
	Description  param.Field[string]                     `json:"description"`
	Status       param.Field[ProposalUpdateParamsStatus] `json:"status"`
	Title        param.Field[string]                     `json:"title"`
}

func (ProposalUpdateParams) MarshalJSON

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

type ProposalUpdateParamsStatus

type ProposalUpdateParamsStatus string
const (
	ProposalUpdateParamsStatusDraft       ProposalUpdateParamsStatus = "draft"
	ProposalUpdateParamsStatusOpen        ProposalUpdateParamsStatus = "open"
	ProposalUpdateParamsStatusNeedsReview ProposalUpdateParamsStatus = "needs_review"
	ProposalUpdateParamsStatusClosed      ProposalUpdateParamsStatus = "closed"
)

func (ProposalUpdateParamsStatus) IsKnown

func (r ProposalUpdateParamsStatus) IsKnown() bool

type ProposalUpdateResponse

type ProposalUpdateResponse struct {
	ID          string                       `json:"id" api:"required" format:"uuid"`
	AccountID   string                       `json:"account_id" api:"required" format:"uuid"`
	CreatedAt   string                       `json:"created_at" api:"required"`
	CreatedBy   string                       `json:"created_by" api:"required,nullable" format:"uuid"`
	Description string                       `json:"description" api:"required,nullable"`
	Status      ProposalUpdateResponseStatus `json:"status" api:"required"`
	Title       string                       `json:"title" api:"required,nullable"`
	UpdatedAt   string                       `json:"updated_at" api:"required"`
	JSON        proposalUpdateResponseJSON   `json:"-"`
}

func (*ProposalUpdateResponse) UnmarshalJSON

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

type ProposalUpdateResponseStatus

type ProposalUpdateResponseStatus string
const (
	ProposalUpdateResponseStatusDraft       ProposalUpdateResponseStatus = "draft"
	ProposalUpdateResponseStatusOpen        ProposalUpdateResponseStatus = "open"
	ProposalUpdateResponseStatusNeedsReview ProposalUpdateResponseStatus = "needs_review"
	ProposalUpdateResponseStatusClosed      ProposalUpdateResponseStatus = "closed"
)

func (ProposalUpdateResponseStatus) IsKnown

func (r ProposalUpdateResponseStatus) IsKnown() bool

type Repository

type Repository struct {
	ID            string            `json:"id" api:"required" format:"uuid"`
	AccountID     string            `json:"account_id" api:"required" format:"uuid"`
	CreatedAt     string            `json:"created_at" api:"required"`
	CreatedBy     string            `json:"created_by" api:"required,nullable"`
	Description   string            `json:"description" api:"required,nullable"`
	FilesEnabled  bool              `json:"files_enabled" api:"required"`
	MainBranchID  string            `json:"mainBranchId" api:"required,nullable"`
	Name          string            `json:"name" api:"required"`
	Skill         string            `json:"skill" api:"required,nullable"`
	Slug          string            `json:"slug" api:"required"`
	Storage       RepositoryStorage `json:"storage" api:"required"`
	SupportsFiles bool              `json:"supportsFiles" api:"required"`
	UpdatedAt     string            `json:"updated_at" api:"required"`
	UpdatedBy     string            `json:"updated_by" api:"required,nullable"`
	JSON          repositoryJSON    `json:"-"`
}

func (*Repository) UnmarshalJSON

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

type RepositoryListParams

type RepositoryListParams struct {
	Limit  param.Field[int64]                      `query:"limit"`
	Offset param.Field[int64]                      `query:"offset"`
	Source param.Field[RepositoryListParamsSource] `query:"source"`
	UserID param.Field[string]                     `query:"userId" format:"uuid"`
}

func (RepositoryListParams) URLQuery

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

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

type RepositoryListParamsSource

type RepositoryListParamsSource string
const (
	RepositoryListParamsSourceAll    RepositoryListParamsSource = "all"
	RepositoryListParamsSourceMy     RepositoryListParamsSource = "my"
	RepositoryListParamsSourceShared RepositoryListParamsSource = "shared"
	RepositoryListParamsSourceSaved  RepositoryListParamsSource = "saved"
)

func (RepositoryListParamsSource) IsKnown

func (r RepositoryListParamsSource) IsKnown() bool

type RepositoryListResponse

type RepositoryListResponse struct {
	ID               string                            `json:"id" api:"required" format:"uuid"`
	BranchCount      float64                           `json:"branchCount" api:"required"`
	CreatedAt        string                            `json:"createdAt" api:"required"`
	Description      string                            `json:"description" api:"required,nullable"`
	FilesEnabled     bool                              `json:"filesEnabled" api:"required"`
	IsPinned         bool                              `json:"isPinned" api:"required,nullable"`
	IsSaved          bool                              `json:"isSaved" api:"required,nullable"`
	MainBranchID     string                            `json:"mainBranchId" api:"required,nullable" format:"uuid"`
	Name             string                            `json:"name" api:"required"`
	OwnerAccountID   string                            `json:"ownerAccountId" api:"required" format:"uuid"`
	OwnerAccountName string                            `json:"ownerAccountName" api:"required,nullable"`
	OwnerAccountSlug string                            `json:"ownerAccountSlug" api:"required,nullable"`
	Permissions      RepositoryListResponsePermissions `json:"permissions" api:"required,nullable"`
	SaveCount        float64                           `json:"saveCount" api:"required"`
	Slug             string                            `json:"slug" api:"required,nullable"`
	Storage          RepositoryListResponseStorage     `json:"storage" api:"required"`
	SupportsFiles    bool                              `json:"supportsFiles" api:"required"`
	UpdatedAt        string                            `json:"updatedAt" api:"required,nullable"`
	VoteCount        float64                           `json:"voteCount" api:"required"`
	JSON             repositoryListResponseJSON        `json:"-"`
}

func (*RepositoryListResponse) UnmarshalJSON

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

type RepositoryListResponsePermissions

type RepositoryListResponsePermissions struct {
	Actions []RepositoryListResponsePermissionsAction `json:"actions" api:"required"`
	CanEdit bool                                      `json:"canEdit" api:"required"`
	CanView bool                                      `json:"canView" api:"required"`
	JSON    repositoryListResponsePermissionsJSON     `json:"-"`
}

func (*RepositoryListResponsePermissions) UnmarshalJSON

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

type RepositoryListResponsePermissionsAction

type RepositoryListResponsePermissionsAction string
const (
	RepositoryListResponsePermissionsActionViewRepository    RepositoryListResponsePermissionsAction = "view_repository"
	RepositoryListResponsePermissionsActionEditRepository    RepositoryListResponsePermissionsAction = "edit_repository"
	RepositoryListResponsePermissionsActionDeleteRepository  RepositoryListResponsePermissionsAction = "delete_repository"
	RepositoryListResponsePermissionsActionManageBranches    RepositoryListResponsePermissionsAction = "manage_branches"
	RepositoryListResponsePermissionsActionManagePermissions RepositoryListResponsePermissionsAction = "manage_permissions"
)

func (RepositoryListResponsePermissionsAction) IsKnown

type RepositoryListResponseStorage

type RepositoryListResponseStorage string
const (
	RepositoryListResponseStoragePostgres    RepositoryListResponseStorage = "postgres"
	RepositoryListResponseStorageTurbopuffer RepositoryListResponseStorage = "turbopuffer"
)

func (RepositoryListResponseStorage) IsKnown

func (r RepositoryListResponseStorage) IsKnown() bool

type RepositoryNewParams

type RepositoryNewParams struct {
	AccountID   param.Field[string] `json:"accountId" api:"required" format:"uuid"`
	Name        param.Field[string] `json:"name" api:"required"`
	Slug        param.Field[string] `json:"slug" api:"required"`
	Description param.Field[string] `json:"description"`
	Skill       param.Field[string] `json:"skill"`
}

func (RepositoryNewParams) MarshalJSON

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

type RepositoryNewResponse

type RepositoryNewResponse struct {
	Success      bool                      `json:"success" api:"required"`
	BranchID     string                    `json:"branchId" format:"uuid"`
	RepositoryID string                    `json:"repositoryId" format:"uuid"`
	JSON         repositoryNewResponseJSON `json:"-"`
}

func (*RepositoryNewResponse) UnmarshalJSON

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

type RepositoryService

type RepositoryService struct {
	Options []option.RequestOption
}

Create and manage data repositories

RepositoryService contains methods and other services that help with interacting with the modern-relay 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 NewRepositoryService method instead.

func NewRepositoryService

func NewRepositoryService(opts ...option.RequestOption) (r *RepositoryService)

NewRepositoryService 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 (*RepositoryService) Delete

func (r *RepositoryService) Delete(ctx context.Context, repositoryID string, opts ...option.RequestOption) (res *bool, err error)

Permanently deletes a repository. This action cannot be undone.

func (*RepositoryService) Get

func (r *RepositoryService) Get(ctx context.Context, repositoryID string, opts ...option.RequestOption) (res *Repository, err error)

Retrieves the details of an existing repository.

func (*RepositoryService) List

Returns a list of repositories for the specified account.

func (*RepositoryService) ListAutoPaging

Returns a list of repositories for the specified account.

func (*RepositoryService) New

Creates a new repository. Returns the created repository object.

func (*RepositoryService) Update

func (r *RepositoryService) Update(ctx context.Context, repositoryID string, body RepositoryUpdateParams, opts ...option.RequestOption) (res *RepositoryUpdateResponse, err error)

Updates the specified repository by setting the values of the parameters passed.

type RepositoryStorage

type RepositoryStorage string
const (
	RepositoryStoragePostgres    RepositoryStorage = "postgres"
	RepositoryStorageTurbopuffer RepositoryStorage = "turbopuffer"
)

func (RepositoryStorage) IsKnown

func (r RepositoryStorage) IsKnown() bool

type RepositoryUpdateParams

type RepositoryUpdateParams struct {
	Description  param.Field[string] `json:"description"`
	FilesEnabled param.Field[bool]   `json:"filesEnabled"`
	Name         param.Field[string] `json:"name"`
	Skill        param.Field[string] `json:"skill"`
	Slug         param.Field[string] `json:"slug"`
}

func (RepositoryUpdateParams) MarshalJSON

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

type RepositoryUpdateResponse

type RepositoryUpdateResponse struct {
	ID           string                          `json:"id" api:"required" format:"uuid"`
	AccountID    string                          `json:"account_id" api:"required" format:"uuid"`
	CreatedAt    string                          `json:"created_at" api:"required"`
	CreatedBy    string                          `json:"created_by" api:"required,nullable"`
	Description  string                          `json:"description" api:"required,nullable"`
	FilesEnabled bool                            `json:"files_enabled" api:"required"`
	Name         string                          `json:"name" api:"required"`
	Skill        string                          `json:"skill" api:"required,nullable"`
	Slug         string                          `json:"slug" api:"required"`
	Storage      RepositoryUpdateResponseStorage `json:"storage" api:"required"`
	UpdatedAt    string                          `json:"updated_at" api:"required"`
	UpdatedBy    string                          `json:"updated_by" api:"required,nullable"`
	JSON         repositoryUpdateResponseJSON    `json:"-"`
}

func (*RepositoryUpdateResponse) UnmarshalJSON

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

type RepositoryUpdateResponseStorage

type RepositoryUpdateResponseStorage string
const (
	RepositoryUpdateResponseStoragePostgres    RepositoryUpdateResponseStorage = "postgres"
	RepositoryUpdateResponseStorageTurbopuffer RepositoryUpdateResponseStorage = "turbopuffer"
)

func (RepositoryUpdateResponseStorage) IsKnown

type SearchEntitiesParams

type SearchEntitiesParams struct {
	BranchIDs param.Field[[]string]                 `query:"branchIds" api:"required" format:"uuid"`
	Query     param.Field[string]                   `query:"query" api:"required"`
	Limit     param.Field[int64]                    `query:"limit"`
	Mode      param.Field[SearchEntitiesParamsMode] `query:"mode"`
}

func (SearchEntitiesParams) URLQuery

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

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

type SearchEntitiesParamsMode

type SearchEntitiesParamsMode string
const (
	SearchEntitiesParamsModeFts   SearchEntitiesParamsMode = "fts"
	SearchEntitiesParamsModeFuzzy SearchEntitiesParamsMode = "fuzzy"
	SearchEntitiesParamsModeAuto  SearchEntitiesParamsMode = "auto"
)

func (SearchEntitiesParamsMode) IsKnown

func (r SearchEntitiesParamsMode) IsKnown() bool

type SearchEntitiesResponse

type SearchEntitiesResponse struct {
	Data    []SearchEntitiesResponseData `json:"data" api:"required"`
	HasMore bool                         `json:"has_more" api:"required"`
	JSON    searchEntitiesResponseJSON   `json:"-"`
}

func (*SearchEntitiesResponse) UnmarshalJSON

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

type SearchEntitiesResponseData

type SearchEntitiesResponseData struct {
	BranchID     string                         `json:"branchId" api:"required" format:"uuid"`
	ClassID      string                         `json:"classId" api:"required" format:"uuid"`
	ClassName    string                         `json:"className" api:"required"`
	DisplayName  string                         `json:"displayName" api:"required"`
	EntityID     string                         `json:"entityId" api:"required" format:"uuid"`
	RepositoryID string                         `json:"repositoryId" api:"required" format:"uuid"`
	JSON         searchEntitiesResponseDataJSON `json:"-"`
}

func (*SearchEntitiesResponseData) UnmarshalJSON

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

type SearchRepositoriesParams

type SearchRepositoriesParams struct {
	ContextAccountID param.Field[string] `query:"contextAccountId" format:"uuid"`
	Limit            param.Field[int64]  `query:"limit"`
	Offset           param.Field[int64]  `query:"offset"`
	OwnerAccountID   param.Field[string] `query:"ownerAccountId" format:"uuid"`
	OwnerAccountSlug param.Field[string] `query:"ownerAccountSlug"`
	Query            param.Field[string] `query:"query"`
	RepositoryID     param.Field[string] `query:"repositoryId" format:"uuid"`
	RepositorySlug   param.Field[string] `query:"repositorySlug"`
}

func (SearchRepositoriesParams) URLQuery

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

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

type SearchRepositoriesResponse

type SearchRepositoriesResponse struct {
	ID               string                                `json:"id" api:"required" format:"uuid"`
	BranchCount      float64                               `json:"branchCount" api:"required"`
	CreatedAt        string                                `json:"createdAt" api:"required"`
	Description      string                                `json:"description" api:"required,nullable"`
	FilesEnabled     bool                                  `json:"filesEnabled" api:"required"`
	IsPinned         bool                                  `json:"isPinned" api:"required,nullable"`
	IsSaved          bool                                  `json:"isSaved" api:"required,nullable"`
	MainBranchID     string                                `json:"mainBranchId" api:"required,nullable" format:"uuid"`
	Name             string                                `json:"name" api:"required"`
	OwnerAccountID   string                                `json:"ownerAccountId" api:"required" format:"uuid"`
	OwnerAccountName string                                `json:"ownerAccountName" api:"required,nullable"`
	OwnerAccountSlug string                                `json:"ownerAccountSlug" api:"required,nullable"`
	Permissions      SearchRepositoriesResponsePermissions `json:"permissions" api:"required,nullable"`
	SaveCount        float64                               `json:"saveCount" api:"required"`
	Slug             string                                `json:"slug" api:"required,nullable"`
	Storage          SearchRepositoriesResponseStorage     `json:"storage" api:"required"`
	SupportsFiles    bool                                  `json:"supportsFiles" api:"required"`
	UpdatedAt        string                                `json:"updatedAt" api:"required,nullable"`
	VoteCount        float64                               `json:"voteCount" api:"required"`
	JSON             searchRepositoriesResponseJSON        `json:"-"`
}

func (*SearchRepositoriesResponse) UnmarshalJSON

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

type SearchRepositoriesResponsePermissions

type SearchRepositoriesResponsePermissions struct {
	Actions []SearchRepositoriesResponsePermissionsAction `json:"actions" api:"required"`
	CanEdit bool                                          `json:"canEdit" api:"required"`
	CanView bool                                          `json:"canView" api:"required"`
	JSON    searchRepositoriesResponsePermissionsJSON     `json:"-"`
}

func (*SearchRepositoriesResponsePermissions) UnmarshalJSON

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

type SearchRepositoriesResponsePermissionsAction

type SearchRepositoriesResponsePermissionsAction string
const (
	SearchRepositoriesResponsePermissionsActionViewRepository    SearchRepositoriesResponsePermissionsAction = "view_repository"
	SearchRepositoriesResponsePermissionsActionEditRepository    SearchRepositoriesResponsePermissionsAction = "edit_repository"
	SearchRepositoriesResponsePermissionsActionDeleteRepository  SearchRepositoriesResponsePermissionsAction = "delete_repository"
	SearchRepositoriesResponsePermissionsActionManageBranches    SearchRepositoriesResponsePermissionsAction = "manage_branches"
	SearchRepositoriesResponsePermissionsActionManagePermissions SearchRepositoriesResponsePermissionsAction = "manage_permissions"
)

func (SearchRepositoriesResponsePermissionsAction) IsKnown

type SearchRepositoriesResponseStorage

type SearchRepositoriesResponseStorage string
const (
	SearchRepositoriesResponseStoragePostgres    SearchRepositoriesResponseStorage = "postgres"
	SearchRepositoriesResponseStorageTurbopuffer SearchRepositoriesResponseStorage = "turbopuffer"
)

func (SearchRepositoriesResponseStorage) IsKnown

type SearchService

type SearchService struct {
	Options []option.RequestOption
}

Search entities across repositories

SearchService contains methods and other services that help with interacting with the modern-relay 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.

func (*SearchService) Entities

Search for entities across all repositories matching the specified query.

func (*SearchService) Repositories

Search for repositories across the account matching the specified query.

func (*SearchService) RepositoriesAutoPaging

Search for repositories across the account matching the specified query.

Directories

Path Synopsis
packages

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL