Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 Changes in this version + const DefaultListSize + func ListAll[T any](ctx context.Context, c *Client, op ListOp[T], size int, opts ...AllOption) iter.Seq2[T, error] + func RawID(raw json.RawMessage) (string, error) + type ListOp struct + Do func(ctx context.Context, raw api.ClientInterface, after string, size int) (*http.Response, error) + ID func(T) (string, error) + Items string + Name string + func FacilityConnections(facilityID, target string) ListOp[json.RawMessage] + type ListPage struct + Items []T + Total int + func List[T any](ctx context.Context, c *Client, op ListOp[T], after string, size int) (ListPage[T], error) v0.1.0 Jul 13, 2026 Changes in this version + const DefaultMaxItems + const DefaultSize + const KeyFacilityRef + const KeyTenantFacilityID + const MaxSize + const MinSize + const PageSize + func Check(status int, body []byte) error + func FacilityRef(id string) string + func FacilitySelector(id string) (key, value string) + func Fetch[T any](ctx context.Context, c *Client, op string, do Doer) (T, error) + func RequestError(op string, err error) error + func SearchAll[Q, S, T any](ctx context.Context, c *Client, op Op[T], payload SearchPayload[Q, S], ...) iter.Seq2[T, error] + func UpdateVersioned[T any](ctx context.Context, get GetFn[T], put PutFn[T], mutate func(*T) error, ...) (T, error) + type APIError struct + Body string + Errors []api.ErrorInner + Status int + func (e *APIError) Conflict() (sent, current int64, ok bool) + func (e *APIError) Error() string + func (e *APIError) ExitCode() int + func (e *APIError) Hint() string + type AllOption func(*allOptions) + func MaxItems(n int) AllOption + type Client struct + func New(baseURL string, opts ...Option) (*Client, error) + func (c *Client) API() *api.ClientWithResponses + func (c *Client) Do(ctx context.Context, op string, do Doer) (*Result, error) + func (c *Client) DoRaw(ctx context.Context, op string, req RawRequest) (*Result, error) + type Doer func(ctx context.Context) (*http.Response, error) + type FacilitySearchPayload = SearchPayload[api.FacilitySearchQuery, api.FacilitySort] + type GetFn func(ctx context.Context) (entity T, version int, err error) + type ListingSearchPayload = SearchPayload[api.ListingSearchQuery, api.ListingSort] + type Op struct + Do func(ctx context.Context, raw api.ClientInterface, body []byte) (*http.Response, error) + Items string + Name string + func FacilitySearch[T any]() Op[T] + func ListingSearch[T any]() Op[T] + func StockSearch[T any]() Op[T] + type Option func(*options) + func WithDebug(w io.Writer) Option + func WithHTTPClient(hc *http.Client) Option + func WithRetry(r Retry) Option + func WithTokenSource(src auth.TokenSource) Option + type Page struct + Items []T + PageInfo api.PageInfo + Total *int + func Search[Q, S, T any](ctx context.Context, c *Client, op Op[T], payload SearchPayload[Q, S]) (Page[T], error) + type PutFn func(ctx context.Context, entity T, version int) (T, error) + type QueryParam struct + Explode bool + Name string + Values []string + type RawRequest struct + Body []byte + Header map[string]string + Method string + Path string + PathParams map[string]string + Query []QueryParam + func (r RawRequest) URL(base string) (string, error) + type Result struct + Body []byte + Header http.Header + Status int + type Retry struct + Base time.Duration + Max time.Duration + MaxAttempts int + MaxWait time.Duration + Sleep func(ctx context.Context, d time.Duration) error + type SearchPayload struct + After *string + Options *api.SearchOptions + Query Q + Size *int + Sort []S + func (p SearchPayload[Q, S]) WithTotal() SearchPayload[Q, S] + type StockSearchPayload = SearchPayload[api.StockSearchQuery, api.StockSort] + type TruncatedError struct + MaxItems int + Op string + func (e *TruncatedError) Error() string + func (e *TruncatedError) Hint() string v0.1.0-rc1 Jul 13, 2026