Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FacetValues added in v0.1.5

func FacetValues(params GetUsageFacetsParams) url.Values

func UsageValues added in v0.1.5

func UsageValues(params GetUsageParams) url.Values

Types

type BrowserSessionRequest added in v0.1.5

type BrowserSessionRequest struct {
	Token string `json:"token"`
}

BrowserSessionRequest defines model for BrowserSessionRequest.

type Bucket

type Bucket string

Bucket defines model for Bucket.

const (
	BucketDay   Bucket = "day"
	BucketMonth Bucket = "month"
	BucketWeek  Bucket = "week"
	BucketYear  Bucket = "year"
)

Defines values for Bucket.

func (Bucket) Valid

func (e Bucket) Valid() bool

Valid indicates whether the value is a known member of the Bucket enum.

type BucketFilter

type BucketFilter = Bucket

BucketFilter defines model for BucketFilter.

type CollectorAttempt added in v0.1.5

type CollectorAttempt struct {
	AcknowledgedBatches Count                      `json:"acknowledgedBatches"`
	AcknowledgedEntries Count                      `json:"acknowledgedEntries"`
	AttemptId           string                     `json:"attemptId"`
	ErrorCode           *CollectorAttemptErrorCode `json:"errorCode,omitempty"`

	// ExpiresAtMs Unix milliseconds through 9999-12-30T23:59:59.999Z. One day of headroom preserves calendar query support after timezone conversion. Source units are never guessed or rescaled.
	ExpiresAtMs TimestampMs `json:"expiresAtMs"`

	// FinishedAtMs Unix milliseconds through 9999-12-30T23:59:59.999Z. One day of headroom preserves calendar query support after timezone conversion. Source units are never guessed or rescaled.
	FinishedAtMs *TimestampMs                         `json:"finishedAtMs,omitempty"`
	Harnesses    map[string]CollectorAttemptHarnesses `json:"harnesses"`
	Pending      Count                                `json:"pending"`
	PendingKnown bool                                 `json:"pendingKnown"`
	Stage        CollectorAttemptStage                `json:"stage"`

	// StartedAtMs Unix milliseconds through 9999-12-30T23:59:59.999Z. One day of headroom preserves calendar query support after timezone conversion. Source units are never guessed or rescaled.
	StartedAtMs TimestampMs `json:"startedAtMs"`

	// UpdatedAtMs Unix milliseconds through 9999-12-30T23:59:59.999Z. One day of headroom preserves calendar query support after timezone conversion. Source units are never guessed or rescaled.
	UpdatedAtMs TimestampMs `json:"updatedAtMs"`
}

CollectorAttempt defines model for CollectorAttempt.

type CollectorAttemptErrorCode added in v0.1.5

type CollectorAttemptErrorCode string

CollectorAttemptErrorCode defines model for CollectorAttempt.ErrorCode.

const (
	Cancelled        CollectorAttemptErrorCode = "cancelled"
	CollectionFailed CollectorAttemptErrorCode = "collection_failed"
	PublisherLost    CollectorAttemptErrorCode = "publisher_lost"
	SubmissionFailed CollectorAttemptErrorCode = "submission_failed"
)

Defines values for CollectorAttemptErrorCode.

func (CollectorAttemptErrorCode) Valid added in v0.1.5

func (e CollectorAttemptErrorCode) Valid() bool

Valid indicates whether the value is a known member of the CollectorAttemptErrorCode enum.

type CollectorAttemptHarnesses added in v0.1.5

type CollectorAttemptHarnesses string

CollectorAttemptHarnesses defines model for CollectorAttempt.Harnesses.

const (
	CollectorAttemptHarnessesComplete CollectorAttemptHarnesses = "complete"
	CollectorAttemptHarnessesFailed   CollectorAttemptHarnesses = "failed"
	CollectorAttemptHarnessesRunning  CollectorAttemptHarnesses = "running"
	CollectorAttemptHarnessesSkipped  CollectorAttemptHarnesses = "skipped"
	CollectorAttemptHarnessesWaiting  CollectorAttemptHarnesses = "waiting"
)

Defines values for CollectorAttemptHarnesses.

func (CollectorAttemptHarnesses) Valid added in v0.1.5

func (e CollectorAttemptHarnesses) Valid() bool

Valid indicates whether the value is a known member of the CollectorAttemptHarnesses enum.

type CollectorAttemptStage added in v0.1.5

type CollectorAttemptStage string

CollectorAttemptStage defines model for CollectorAttempt.Stage.

const (
	CollectorAttemptStageAccepted    CollectorAttemptStage = "accepted"
	CollectorAttemptStageCapturing   CollectorAttemptStage = "capturing"
	CollectorAttemptStageFailed      CollectorAttemptStage = "failed"
	CollectorAttemptStageInterrupted CollectorAttemptStage = "interrupted"
	CollectorAttemptStageSubmitting  CollectorAttemptStage = "submitting"
	CollectorAttemptStageWaiting     CollectorAttemptStage = "waiting"
)

Defines values for CollectorAttemptStage.

func (CollectorAttemptStage) Valid added in v0.1.5

func (e CollectorAttemptStage) Valid() bool

Valid indicates whether the value is a known member of the CollectorAttemptStage enum.

type CollectorProgressResponse added in v0.1.5

type CollectorProgressResponse struct {
	Attempts   []CollectorAttempt `json:"attempts"`
	InstanceId string             `json:"instanceId"`
}

CollectorProgressResponse defines model for CollectorProgressResponse.

type Count

type Count = int64

Count defines model for Count.

type CreateBrowserSessionJSONRequestBody added in v0.1.5

type CreateBrowserSessionJSONRequestBody = BrowserSessionRequest

CreateBrowserSessionJSONRequestBody defines body for CreateBrowserSession for application/json ContentType.

type DirectoryFilter added in v0.1.4

type DirectoryFilter = []string

DirectoryFilter defines model for DirectoryFilter.

type Error

type Error = ErrorResponse

Error defines model for Error.

type ErrorCode

type ErrorCode string

ErrorCode defines model for ErrorCode.

const (
	ErrorCodeInternalError    ErrorCode = "internal_error"
	ErrorCodeInvalidRequest   ErrorCode = "invalid_request"
	ErrorCodeMethodNotAllowed ErrorCode = "method_not_allowed"
	ErrorCodeNotFound         ErrorCode = "not_found"
	ErrorCodeUnavailable      ErrorCode = "unavailable"
)

Defines values for ErrorCode.

func (ErrorCode) Valid

func (e ErrorCode) Valid() bool

Valid indicates whether the value is a known member of the ErrorCode enum.

type ErrorResponse

type ErrorResponse struct {
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type EvidenceOutcome added in v0.1.5

type EvidenceOutcome struct {
	Code          *string                    `json:"code,omitempty"`
	Disposition   EvidenceOutcomeDisposition `json:"disposition"`
	EvidenceId    string                     `json:"evidenceId"`
	FactId        *string                    `json:"factId,omitempty"`
	Generation    Count                      `json:"generation"`
	InputRevision Count                      `json:"inputRevision"`
}

EvidenceOutcome defines model for EvidenceOutcome.

type EvidenceOutcomeDisposition added in v0.1.5

type EvidenceOutcomeDisposition string

EvidenceOutcomeDisposition defines model for EvidenceOutcome.Disposition.

const (
	EvidenceOutcomeDispositionAmbiguous  EvidenceOutcomeDisposition = "ambiguous"
	EvidenceOutcomeDispositionContext    EvidenceOutcomeDisposition = "context"
	EvidenceOutcomeDispositionDuplicate  EvidenceOutcomeDisposition = "duplicate"
	EvidenceOutcomeDispositionPending    EvidenceOutcomeDisposition = "pending"
	EvidenceOutcomeDispositionProcessed  EvidenceOutcomeDisposition = "processed"
	EvidenceOutcomeDispositionSuperseded EvidenceOutcomeDisposition = "superseded"
)

Defines values for EvidenceOutcomeDisposition.

func (EvidenceOutcomeDisposition) Valid added in v0.1.5

func (e EvidenceOutcomeDisposition) Valid() bool

Valid indicates whether the value is a known member of the EvidenceOutcomeDisposition enum.

type ExtractionDiagnostic added in v0.1.5

type ExtractionDiagnostic string

ExtractionDiagnostic defines model for ExtractionDiagnostic.

const (
	FieldLimit            ExtractionDiagnostic = "field_limit"
	InvalidFieldType      ExtractionDiagnostic = "invalid_field_type"
	NativeSubagentPresent ExtractionDiagnostic = "native_subagent_present"
	UnsafeMetadata        ExtractionDiagnostic = "unsafe_metadata"
)

Defines values for ExtractionDiagnostic.

func (ExtractionDiagnostic) Valid added in v0.1.5

func (e ExtractionDiagnostic) Valid() bool

Valid indicates whether the value is a known member of the ExtractionDiagnostic enum.

type FromFilter

type FromFilter = string

FromFilter defines model for FromFilter.

type GetUsageFacetsParams

type GetUsageFacetsParams struct {
	Period *PeriodFilter `form:"period,omitempty" json:"period,omitempty"`
	Bucket *BucketFilter `form:"bucket,omitempty" json:"bucket,omitempty"`

	// From Inclusive lower local-date bound; replaces period when supplied.
	From *FromFilter `form:"from,omitempty" json:"from,omitempty"`

	// To Inclusive upper local-date bound; replaces period when supplied.
	To *ToFilter `form:"to,omitempty" json:"to,omitempty"`

	// Provider Provider filter. Repeat the parameter to select multiple values.
	Provider *ProviderFilter `form:"provider,omitempty" json:"provider,omitempty"`

	// Model Model filter. Repeat the parameter to select multiple values.
	Model *ModelFilter `form:"model,omitempty" json:"model,omitempty"`

	// Harness Harness filter. Repeat the parameter to select multiple values.
	Harness *HarnessFilter `form:"harness,omitempty" json:"harness,omitempty"`

	// Session Session-ID filter. Repeat the parameter to select multiple values.
	Session *SessionFilter `form:"session,omitempty" json:"session,omitempty"`

	// Repository Repo-tab stable repository key; repeat for multiple values. The key unknown selects missing values.
	Repository *RepositoryFilter `form:"repository,omitempty" json:"repository,omitempty"`

	// Directory Repo-tab stable directory key; repeat for multiple values. The key unknown selects missing values.
	Directory *DirectoryFilter `form:"directory,omitempty" json:"directory,omitempty"`

	// Search Literal substring used to filter session IDs.
	Search *string `form:"search,omitempty" json:"search,omitempty"`

	// Tab Active aggregation. Repository/directory filters require the repo tab.
	Tab     *UsageTab      `form:"tab,omitempty" json:"tab,omitempty"`
	Quality *QualityFilter `form:"quality,omitempty" json:"quality,omitempty"`
}

GetUsageFacetsParams defines parameters for GetUsageFacets.

type GetUsageParams

type GetUsageParams struct {
	Period *PeriodFilter `form:"period,omitempty" json:"period,omitempty"`
	Bucket *BucketFilter `form:"bucket,omitempty" json:"bucket,omitempty"`

	// From Inclusive lower local-date bound; replaces period when supplied.
	From *FromFilter `form:"from,omitempty" json:"from,omitempty"`

	// To Inclusive upper local-date bound; replaces period when supplied.
	To *ToFilter `form:"to,omitempty" json:"to,omitempty"`

	// Provider Provider filter. Repeat the parameter to select multiple values.
	Provider *ProviderFilter `form:"provider,omitempty" json:"provider,omitempty"`

	// Model Model filter. Repeat the parameter to select multiple values.
	Model *ModelFilter `form:"model,omitempty" json:"model,omitempty"`

	// Harness Harness filter. Repeat the parameter to select multiple values.
	Harness *HarnessFilter `form:"harness,omitempty" json:"harness,omitempty"`

	// Session Session-ID filter. Repeat the parameter to select multiple values.
	Session *SessionFilter `form:"session,omitempty" json:"session,omitempty"`

	// Repository Repo-tab stable repository key; repeat for multiple values. The key unknown selects missing values.
	Repository *RepositoryFilter `form:"repository,omitempty" json:"repository,omitempty"`

	// Directory Repo-tab stable directory key; repeat for multiple values. The key unknown selects missing values.
	Directory *DirectoryFilter `form:"directory,omitempty" json:"directory,omitempty"`

	// Tab Aggregation shown in table and chart rows.
	Tab *UsageTab `form:"tab,omitempty" json:"tab,omitempty"`

	// LocationGroup Repo-tab grouping by repository or directory.
	LocationGroup *LocationGroup `form:"locationGroup,omitempty" json:"locationGroup,omitempty"`

	// Sort Sort field. Context-only fields are valid only for the context tab.
	Sort      *SortField     `form:"sort,omitempty" json:"sort,omitempty"`
	Direction *SortDirection `form:"direction,omitempty" json:"direction,omitempty"`
	Page      *int           `form:"page,omitempty" json:"page,omitempty"`
	PageSize  *int           `form:"pageSize,omitempty" json:"pageSize,omitempty"`
	Quality   *QualityFilter `form:"quality,omitempty" json:"quality,omitempty"`
}

GetUsageParams defines parameters for GetUsage.

type Harness

type Harness string

Harness defines model for Harness.

const (
	ClaudeCode Harness = "claude-code"
	Codex      Harness = "codex"
	Opencode   Harness = "opencode"
	Pi         Harness = "pi"
)

Defines values for Harness.

func (Harness) Valid

func (e Harness) Valid() bool

Valid indicates whether the value is a known member of the Harness enum.

type HarnessFilter

type HarnessFilter = []Harness

HarnessFilter defines model for HarnessFilter.

type IngestRawBatchV3JSONRequestBody added in v0.1.5

type IngestRawBatchV3JSONRequestBody = RawBatchV3

IngestRawBatchV3JSONRequestBody defines body for IngestRawBatchV3 for application/json ContentType.

type IngestionError added in v0.1.5

type IngestionError struct {
	// BatchId At most 256 UTF-8 bytes; no control characters.
	BatchId *string `json:"batchId,omitempty"`

	// Code At most 256 UTF-8 bytes; no control characters.
	Code string `json:"code"`

	// FactId At most 256 UTF-8 bytes; no control characters.
	FactId *string `json:"factId,omitempty"`

	// Stage At most 256 UTF-8 bytes; no control characters.
	Stage string `json:"stage"`
}

IngestionError Safe diagnostic codes and correlation IDs; request content is never echoed.

type InstanceResponseV2 added in v0.1.5

type InstanceResponseV2 struct {
	ApiVersion   InstanceResponseV2ApiVersion `json:"apiVersion"`
	Capabilities []string                     `json:"capabilities"`

	// DataEpoch Durable database identity; nonempty when dataReadiness is ready.
	DataEpoch     string                          `json:"dataEpoch"`
	DataReadiness InstanceResponseV2DataReadiness `json:"dataReadiness"`
	DatasetId     string                          `json:"datasetId"`
	Defaults      Selection                       `json:"defaults"`

	// Hostname Local viewers report their runtime hostname without requiring ingestion. Hosted servers reserve this field for dataset producer labels and return unknown when unavailable. Hosted server runtime hostnames never replace producer labels.
	Hostname      string                          `json:"hostname"`
	InstanceId    string                          `json:"instanceId"`
	Permissions   []InstanceResponseV2Permissions `json:"permissions"`
	ServerKind    InstanceResponseV2ServerKind    `json:"serverKind"`
	ServerVersion string                          `json:"serverVersion"`

	// Timezone Server reporting timezone, preferably an IANA name with historical DST rules. Unnamed system zones use an explicit UTC offset fallback.
	Timezone string `json:"timezone"`
}

InstanceResponseV2 defines model for InstanceResponseV2.

type InstanceResponseV2ApiVersion added in v0.1.5

type InstanceResponseV2ApiVersion string

InstanceResponseV2ApiVersion defines model for InstanceResponseV2.ApiVersion.

const (
	V2 InstanceResponseV2ApiVersion = "v2"
)

Defines values for InstanceResponseV2ApiVersion.

func (InstanceResponseV2ApiVersion) Valid added in v0.1.5

Valid indicates whether the value is a known member of the InstanceResponseV2ApiVersion enum.

type InstanceResponseV2DataReadiness added in v0.1.5

type InstanceResponseV2DataReadiness string

InstanceResponseV2DataReadiness defines model for InstanceResponseV2.DataReadiness.

const (
	InstanceResponseV2DataReadinessMetadata    InstanceResponseV2DataReadiness = "metadata"
	InstanceResponseV2DataReadinessReady       InstanceResponseV2DataReadiness = "ready"
	InstanceResponseV2DataReadinessRebuild     InstanceResponseV2DataReadiness = "rebuild"
	InstanceResponseV2DataReadinessRecovery    InstanceResponseV2DataReadiness = "recovery"
	InstanceResponseV2DataReadinessUnavailable InstanceResponseV2DataReadiness = "unavailable"
)

Defines values for InstanceResponseV2DataReadiness.

func (InstanceResponseV2DataReadiness) Valid added in v0.1.5

Valid indicates whether the value is a known member of the InstanceResponseV2DataReadiness enum.

type InstanceResponseV2Permissions added in v0.1.5

type InstanceResponseV2Permissions string

InstanceResponseV2Permissions defines model for InstanceResponseV2.Permissions.

const (
	Ingest InstanceResponseV2Permissions = "ingest"
	Read   InstanceResponseV2Permissions = "read"
)

Defines values for InstanceResponseV2Permissions.

func (InstanceResponseV2Permissions) Valid added in v0.1.5

Valid indicates whether the value is a known member of the InstanceResponseV2Permissions enum.

type InstanceResponseV2ServerKind added in v0.1.5

type InstanceResponseV2ServerKind string

InstanceResponseV2ServerKind defines model for InstanceResponseV2.ServerKind.

const (
	Hosted   InstanceResponseV2ServerKind = "hosted"
	Personal InstanceResponseV2ServerKind = "personal"
)

Defines values for InstanceResponseV2ServerKind.

func (InstanceResponseV2ServerKind) Valid added in v0.1.5

Valid indicates whether the value is a known member of the InstanceResponseV2ServerKind enum.

type InvalidRequest

type InvalidRequest = ErrorResponse

InvalidRequest defines model for InvalidRequest.

type LocationGroup added in v0.1.4

type LocationGroup string

LocationGroup defines model for LocationGroup.

const (
	Directory  LocationGroup = "directory"
	Repository LocationGroup = "repository"
)

Defines values for LocationGroup.

func (LocationGroup) Valid added in v0.1.4

func (e LocationGroup) Valid() bool

Valid indicates whether the value is a known member of the LocationGroup enum.

type LocationOption added in v0.1.4

type LocationOption struct {
	Key string `json:"key"`

	// Name Sanitized display label; full source paths are never ingested.
	Name string `json:"name"`
}

LocationOption defines model for LocationOption.

type ModelFilter

type ModelFilter = []string

ModelFilter defines model for ModelFilter.

type NativeScalar added in v0.1.5

type NativeScalar struct {
	// contains filtered or unexported fields
}

NativeScalar Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.

func (NativeScalar) AsNativeScalar0 added in v0.1.5

func (t NativeScalar) AsNativeScalar0() (NativeScalar0, error)

AsNativeScalar0 returns the union data inside the NativeScalar as a NativeScalar0

func (NativeScalar) AsNativeScalar1 added in v0.1.5

func (t NativeScalar) AsNativeScalar1() (NativeScalar1, error)

AsNativeScalar1 returns the union data inside the NativeScalar as a NativeScalar1

func (NativeScalar) AsNativeScalar2 added in v0.1.5

func (t NativeScalar) AsNativeScalar2() (NativeScalar2, error)

AsNativeScalar2 returns the union data inside the NativeScalar as a NativeScalar2

func (*NativeScalar) FromNativeScalar0 added in v0.1.5

func (t *NativeScalar) FromNativeScalar0(v NativeScalar0) error

FromNativeScalar0 overwrites any union data inside the NativeScalar as the provided NativeScalar0

func (*NativeScalar) FromNativeScalar1 added in v0.1.5

func (t *NativeScalar) FromNativeScalar1(v NativeScalar1) error

FromNativeScalar1 overwrites any union data inside the NativeScalar as the provided NativeScalar1

func (*NativeScalar) FromNativeScalar2 added in v0.1.5

func (t *NativeScalar) FromNativeScalar2(v NativeScalar2) error

FromNativeScalar2 overwrites any union data inside the NativeScalar as the provided NativeScalar2

func (NativeScalar) MarshalJSON added in v0.1.5

func (t NativeScalar) MarshalJSON() ([]byte, error)

func (*NativeScalar) MergeNativeScalar0 added in v0.1.5

func (t *NativeScalar) MergeNativeScalar0(v NativeScalar0) error

MergeNativeScalar0 performs a merge with any union data inside the NativeScalar, using the provided NativeScalar0

func (*NativeScalar) MergeNativeScalar1 added in v0.1.5

func (t *NativeScalar) MergeNativeScalar1(v NativeScalar1) error

MergeNativeScalar1 performs a merge with any union data inside the NativeScalar, using the provided NativeScalar1

func (*NativeScalar) MergeNativeScalar2 added in v0.1.5

func (t *NativeScalar) MergeNativeScalar2(v NativeScalar2) error

MergeNativeScalar2 performs a merge with any union data inside the NativeScalar, using the provided NativeScalar2

func (*NativeScalar) UnmarshalJSON added in v0.1.5

func (t *NativeScalar) UnmarshalJSON(b []byte) error

type NativeScalar0 added in v0.1.5

type NativeScalar0 = string

NativeScalar0 defines model for NativeScalar.0.

type NativeScalar1 added in v0.1.5

type NativeScalar1 = float32

NativeScalar1 defines model for NativeScalar.1.

type NativeScalar2 added in v0.1.5

type NativeScalar2 = bool

NativeScalar2 defines model for NativeScalar.2.

type Period

type Period string

Period defines model for Period.

const (
	PeriodAll       Period = "all"
	PeriodMonth     Period = "month"
	PeriodToday     Period = "today"
	PeriodWeek      Period = "week"
	PeriodYear      Period = "year"
	PeriodYesterday Period = "yesterday"
)

Defines values for Period.

func (Period) Valid

func (e Period) Valid() bool

Valid indicates whether the value is a known member of the Period enum.

type PeriodFilter

type PeriodFilter = Period

PeriodFilter defines model for PeriodFilter.

type ProcessUsage added in v0.1.5

type ProcessUsage struct {
	// CpuPercent Process user plus system CPU time over the sampling interval; 100 percent is one fully utilized core. Absent until a sampling interval is available.
	CpuPercent          *float64 `json:"cpuPercent,omitempty"`
	ResidentMemoryBytes *Count   `json:"residentMemoryBytes,omitempty"`
}

ProcessUsage Current TokenInsights process resources, sampled only by in-process Web. Hosted responses omit this object. Unavailable measurements are omitted.

type ProcessingStatus added in v0.1.5

type ProcessingStatus struct {
	Generation    Count             `json:"generation"`
	InputRevision Count             `json:"inputRevision"`
	Items         []EvidenceOutcome `json:"items"`
	Pending       Count             `json:"pending"`
}

ProcessingStatus defines model for ProcessingStatus.

type ProviderFilter

type ProviderFilter = []string

ProviderFilter defines model for ProviderFilter.

type QualityFilter added in v0.1.5

type QualityFilter = UsageQuality

QualityFilter Estimated evidence is queried separately and never included in confirmed totals.

type RawAcceptanceV3 added in v0.1.5

type RawAcceptanceV3 struct {
	Processing ProcessingStatus `json:"processing"`
	Receipt    RawReceiptV3     `json:"receipt"`
}

RawAcceptanceV3 defines model for RawAcceptanceV3.

type RawBatchV3 added in v0.1.5

type RawBatchV3 struct {
	BatchId          string                     `json:"batchId"`
	DatabaseId       string                     `json:"databaseId"`
	DatasetId        string                     `json:"datasetId"`
	Entries          []RawEntry                 `json:"entries"`
	ExtractorVersion RawBatchV3ExtractorVersion `json:"extractorVersion"`
	FromSequence     Count                      `json:"fromSequence"`
	ProtocolVersion  RawBatchV3ProtocolVersion  `json:"protocolVersion"`
	StreamId         string                     `json:"streamId"`
	ToSequence       Count                      `json:"toSequence"`
}

RawBatchV3 defines model for RawBatchV3.

type RawBatchV3ExtractorVersion added in v0.1.5

type RawBatchV3ExtractorVersion int

RawBatchV3ExtractorVersion defines model for RawBatchV3.ExtractorVersion.

const (
	RawBatchV3ExtractorVersionN1 RawBatchV3ExtractorVersion = 1
)

Defines values for RawBatchV3ExtractorVersion.

func (RawBatchV3ExtractorVersion) Valid added in v0.1.5

func (e RawBatchV3ExtractorVersion) Valid() bool

Valid indicates whether the value is a known member of the RawBatchV3ExtractorVersion enum.

type RawBatchV3ProtocolVersion added in v0.1.5

type RawBatchV3ProtocolVersion int

RawBatchV3ProtocolVersion defines model for RawBatchV3.ProtocolVersion.

const (
	RawBatchV3ProtocolVersionN3 RawBatchV3ProtocolVersion = 3
)

Defines values for RawBatchV3ProtocolVersion.

func (RawBatchV3ProtocolVersion) Valid added in v0.1.5

func (e RawBatchV3ProtocolVersion) Valid() bool

Valid indicates whether the value is a known member of the RawBatchV3ProtocolVersion enum.

type RawCapabilitiesV3 added in v0.1.5

type RawCapabilitiesV3 struct {
	Completion       RawCapabilitiesV3Completion       `json:"completion"`
	DatabaseId       string                            `json:"databaseId"`
	DatasetId        string                            `json:"datasetId"`
	ExtractorVersion RawCapabilitiesV3ExtractorVersion `json:"extractorVersion"`
	MaxBodyBytes     RawCapabilitiesV3MaxBodyBytes     `json:"maxBodyBytes"`
	MaxEntries       RawCapabilitiesV3MaxEntries       `json:"maxEntries"`
	ProtocolVersion  RawCapabilitiesV3ProtocolVersion  `json:"protocolVersion"`
}

RawCapabilitiesV3 defines model for RawCapabilitiesV3.

type RawCapabilitiesV3Completion added in v0.1.5

type RawCapabilitiesV3Completion string

RawCapabilitiesV3Completion defines model for RawCapabilitiesV3.Completion.

const (
	Acceptance RawCapabilitiesV3Completion = "acceptance"
)

Defines values for RawCapabilitiesV3Completion.

func (RawCapabilitiesV3Completion) Valid added in v0.1.5

Valid indicates whether the value is a known member of the RawCapabilitiesV3Completion enum.

type RawCapabilitiesV3ExtractorVersion added in v0.1.5

type RawCapabilitiesV3ExtractorVersion int

RawCapabilitiesV3ExtractorVersion defines model for RawCapabilitiesV3.ExtractorVersion.

const (
	RawCapabilitiesV3ExtractorVersionN1 RawCapabilitiesV3ExtractorVersion = 1
)

Defines values for RawCapabilitiesV3ExtractorVersion.

func (RawCapabilitiesV3ExtractorVersion) Valid added in v0.1.5

Valid indicates whether the value is a known member of the RawCapabilitiesV3ExtractorVersion enum.

type RawCapabilitiesV3MaxBodyBytes added in v0.1.5

type RawCapabilitiesV3MaxBodyBytes int

RawCapabilitiesV3MaxBodyBytes defines model for RawCapabilitiesV3.MaxBodyBytes.

const (
	N1048576e06 RawCapabilitiesV3MaxBodyBytes = 1.048576e+06
)

Defines values for RawCapabilitiesV3MaxBodyBytes.

func (RawCapabilitiesV3MaxBodyBytes) Valid added in v0.1.5

Valid indicates whether the value is a known member of the RawCapabilitiesV3MaxBodyBytes enum.

type RawCapabilitiesV3MaxEntries added in v0.1.5

type RawCapabilitiesV3MaxEntries int

RawCapabilitiesV3MaxEntries defines model for RawCapabilitiesV3.MaxEntries.

const (
	N256 RawCapabilitiesV3MaxEntries = 256
)

Defines values for RawCapabilitiesV3MaxEntries.

func (RawCapabilitiesV3MaxEntries) Valid added in v0.1.5

Valid indicates whether the value is a known member of the RawCapabilitiesV3MaxEntries enum.

type RawCapabilitiesV3ProtocolVersion added in v0.1.5

type RawCapabilitiesV3ProtocolVersion int

RawCapabilitiesV3ProtocolVersion defines model for RawCapabilitiesV3.ProtocolVersion.

const (
	RawCapabilitiesV3ProtocolVersionN3 RawCapabilitiesV3ProtocolVersion = 3
)

Defines values for RawCapabilitiesV3ProtocolVersion.

func (RawCapabilitiesV3ProtocolVersion) Valid added in v0.1.5

Valid indicates whether the value is a known member of the RawCapabilitiesV3ProtocolVersion enum.

type RawContext added in v0.1.5

type RawContext struct {
	// Data Only whitelisted scalar leaves and their containers. Allowed leaves further depend on harness and format; server validates the exact whitelist before storing any bytes.
	Data        RawSourceData           `json:"data"`
	Diagnostics *[]ExtractionDiagnostic `json:"diagnostics,omitempty"`
	Ordinal     Count                   `json:"ordinal"`
}

RawContext defines model for RawContext.

type RawEntry added in v0.1.5

type RawEntry struct {
	Record   RawRecord `json:"record"`
	Sequence Count     `json:"sequence"`
}

RawEntry defines model for RawEntry.

type RawLocation added in v0.1.5

type RawLocation struct {
	DirectoryKey     *string `json:"directoryKey,omitempty"`
	DirectoryName    *string `json:"directoryName,omitempty"`
	RepositoryKey    *string `json:"repositoryKey,omitempty"`
	RepositoryName   *string `json:"repositoryName,omitempty"`
	RepositorySource *string `json:"repositorySource,omitempty"`
}

RawLocation defines model for RawLocation.

type RawReceiptV3 added in v0.1.5

type RawReceiptV3 struct {
	Accepted Count `json:"accepted"`

	// AcceptedAtMs Unix milliseconds through 9999-12-30T23:59:59.999Z. One day of headroom preserves calendar query support after timezone conversion. Source units are never guessed or rescaled.
	AcceptedAtMs  TimestampMs `json:"acceptedAtMs"`
	BatchId       string      `json:"batchId"`
	DatabaseId    string      `json:"databaseId"`
	DatasetId     string      `json:"datasetId"`
	FromSequence  Count       `json:"fromSequence"`
	InputRevision Count       `json:"inputRevision"`
	RequestHash   string      `json:"requestHash"`
	StreamId      string      `json:"streamId"`
	ToSequence    Count       `json:"toSequence"`
}

RawReceiptV3 defines model for RawReceiptV3.

type RawRecord added in v0.1.5

type RawRecord struct {
	Context *[]RawContext `json:"context,omitempty"`

	// Data Only whitelisted scalar leaves and their containers. Allowed leaves further depend on harness and format; server validates the exact whitelist before storing any bytes.
	Data        RawSourceData           `json:"data"`
	Diagnostics *[]ExtractionDiagnostic `json:"diagnostics,omitempty"`
	Format      RawRecordFormat         `json:"format"`
	Harness     Harness                 `json:"harness"`
	Lineage     string                  `json:"lineage"`
	Location    *RawLocation            `json:"location,omitempty"`
	Ordinal     Count                   `json:"ordinal"`
	SourceId    string                  `json:"sourceId"`
}

RawRecord defines model for RawRecord.

type RawRecordFormat added in v0.1.5

type RawRecordFormat string

RawRecordFormat defines model for RawRecord.Format.

const (
	ClaudeCodeJsonl RawRecordFormat = "claude-code-jsonl"
	CodexJsonl      RawRecordFormat = "codex-jsonl"
	OpencodeProject RawRecordFormat = "opencode-project"
	OpencodeSession RawRecordFormat = "opencode-session"
	OpencodeV1      RawRecordFormat = "opencode-v1"
	OpencodeV2      RawRecordFormat = "opencode-v2"
	PiJsonl         RawRecordFormat = "pi-jsonl"
)

Defines values for RawRecordFormat.

func (RawRecordFormat) Valid added in v0.1.5

func (e RawRecordFormat) Valid() bool

Valid indicates whether the value is a known member of the RawRecordFormat enum.

type RawSourceData added in v0.1.5

type RawSourceData struct {
	Data *struct {
		Model *struct {
			// Id Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Id *NativeScalar `json:"id,omitempty"`

			// ProviderID Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			ProviderID *NativeScalar `json:"providerID,omitempty"`
		} `json:"model,omitempty"`

		// ModelID Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ModelID *NativeScalar `json:"modelID,omitempty"`

		// ProviderID Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ProviderID *NativeScalar `json:"providerID,omitempty"`

		// Role Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Role *NativeScalar `json:"role,omitempty"`
		Time *struct {
			// Completed Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Completed *NativeScalar `json:"completed,omitempty"`

			// Created Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Created *NativeScalar `json:"created,omitempty"`
		} `json:"time,omitempty"`
		Tokens *struct {
			Cache *struct {
				// Read Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				Read *NativeScalar `json:"read,omitempty"`

				// Write Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				Write *NativeScalar `json:"write,omitempty"`
			} `json:"cache,omitempty"`

			// Input Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Input *NativeScalar `json:"input,omitempty"`

			// Output Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Output *NativeScalar `json:"output,omitempty"`

			// Reasoning Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Reasoning *NativeScalar `json:"reasoning,omitempty"`
		} `json:"tokens,omitempty"`
	} `json:"data,omitempty"`

	// Id Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	Id      *NativeScalar `json:"id,omitempty"`
	Message *struct {
		// Id Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Id *NativeScalar `json:"id,omitempty"`

		// Model Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Model *NativeScalar `json:"model,omitempty"`

		// ModelID Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ModelID *NativeScalar `json:"modelID,omitempty"`

		// ModelIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ModelIdAlias *NativeScalar `json:"model_id,omitempty"`

		// Provider Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Provider *NativeScalar `json:"provider,omitempty"`

		// ProviderID Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ProviderID *NativeScalar `json:"providerID,omitempty"`

		// ProviderIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ProviderIdAlias *NativeScalar `json:"provider_id,omitempty"`

		// Role Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Role *NativeScalar `json:"role,omitempty"`

		// Timestamp Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Timestamp *NativeScalar `json:"timestamp,omitempty"`
		Usage     *struct {
			// CacheRead Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			CacheRead *NativeScalar `json:"cacheRead,omitempty"`

			// CacheWrite Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			CacheWrite *NativeScalar `json:"cacheWrite,omitempty"`

			// CacheCreationInputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			CacheCreationInputTokensAlias *NativeScalar `json:"cache_creation_input_tokens,omitempty"`

			// CacheReadInputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			CacheReadInputTokensAlias *NativeScalar `json:"cache_read_input_tokens,omitempty"`

			// Input Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Input *NativeScalar `json:"input,omitempty"`

			// InputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			InputTokensAlias *NativeScalar `json:"input_tokens,omitempty"`

			// Output Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Output *NativeScalar `json:"output,omitempty"`

			// OutputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			OutputTokensAlias        *NativeScalar `json:"output_tokens,omitempty"`
			OutputTokensDetailsAlias *struct {
				// ReasoningTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				ReasoningTokensAlias *NativeScalar `json:"reasoning_tokens,omitempty"`

				// ThinkingTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				ThinkingTokensAlias *NativeScalar `json:"thinking_tokens,omitempty"`
			} `json:"output_tokens_details,omitempty"`

			// Reasoning Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			Reasoning *NativeScalar `json:"reasoning,omitempty"`

			// TotalTokens Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			TotalTokens *NativeScalar `json:"totalTokens,omitempty"`

			// TotalTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
			TotalTokensAlias *NativeScalar `json:"total_tokens,omitempty"`
		} `json:"usage,omitempty"`
	} `json:"message,omitempty"`
	Payload *struct {
		// ForkedFromIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ForkedFromIdAlias *NativeScalar `json:"forked_from_id,omitempty"`

		// Id Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Id   *NativeScalar `json:"id,omitempty"`
		Info *struct {
			LastTokenUsageAlias *struct {
				// CacheReadInputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				CacheReadInputTokensAlias *NativeScalar `json:"cache_read_input_tokens,omitempty"`

				// CachedInputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				CachedInputTokensAlias *NativeScalar `json:"cached_input_tokens,omitempty"`

				// InputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				InputTokensAlias *NativeScalar `json:"input_tokens,omitempty"`

				// OutputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				OutputTokensAlias *NativeScalar `json:"output_tokens,omitempty"`

				// ReasoningOutputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				ReasoningOutputTokensAlias *NativeScalar `json:"reasoning_output_tokens,omitempty"`

				// TotalTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				TotalTokensAlias *NativeScalar `json:"total_tokens,omitempty"`
			} `json:"last_token_usage,omitempty"`
			TotalTokenUsageAlias *struct {
				// CacheReadInputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				CacheReadInputTokensAlias *NativeScalar `json:"cache_read_input_tokens,omitempty"`

				// CachedInputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				CachedInputTokensAlias *NativeScalar `json:"cached_input_tokens,omitempty"`

				// InputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				InputTokensAlias *NativeScalar `json:"input_tokens,omitempty"`

				// OutputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				OutputTokensAlias *NativeScalar `json:"output_tokens,omitempty"`

				// ReasoningOutputTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				ReasoningOutputTokensAlias *NativeScalar `json:"reasoning_output_tokens,omitempty"`

				// TotalTokensAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
				TotalTokensAlias *NativeScalar `json:"total_tokens,omitempty"`
			} `json:"total_token_usage,omitempty"`
		} `json:"info,omitempty"`

		// Model Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Model *NativeScalar `json:"model,omitempty"`

		// ModelProviderAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ModelProviderAlias *NativeScalar `json:"model_provider,omitempty"`

		// ParentThreadIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		ParentThreadIdAlias *NativeScalar `json:"parent_thread_id,omitempty"`
		Source              *struct {
			Subagent *struct {
				ThreadSpawnAlias *struct {
					// ParentThreadIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
					ParentThreadIdAlias *NativeScalar `json:"parent_thread_id,omitempty"`
				} `json:"thread_spawn,omitempty"`
			} `json:"subagent,omitempty"`
		} `json:"source,omitempty"`

		// TurnIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		TurnIdAlias *NativeScalar `json:"turn_id,omitempty"`

		// Type Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
		Type *NativeScalar `json:"type,omitempty"`
	} `json:"payload,omitempty"`

	// ProjectIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	ProjectIdAlias *NativeScalar `json:"project_id,omitempty"`

	// RequestId Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	RequestId *NativeScalar `json:"requestId,omitempty"`

	// RequestIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	RequestIdAlias *NativeScalar `json:"request_id,omitempty"`

	// SessionId Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	SessionId *NativeScalar `json:"sessionId,omitempty"`

	// SessionIdAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	SessionIdAlias *NativeScalar `json:"session_id,omitempty"`

	// TimeCreatedAlias Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	TimeCreatedAlias *NativeScalar `json:"time_created,omitempty"`

	// Timestamp Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	Timestamp *NativeScalar `json:"timestamp,omitempty"`

	// Type Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	Type *NativeScalar `json:"type,omitempty"`

	// Uuid Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	Uuid *NativeScalar `json:"uuid,omitempty"`

	// Vcs Original scalar source value, including explicit null. Processing validates integer counters and native timestamps.
	Vcs *NativeScalar `json:"vcs,omitempty"`
}

RawSourceData Only whitelisted scalar leaves and their containers. Allowed leaves further depend on harness and format; server validates the exact whitelist before storing any bytes.

type RepositoryFilter added in v0.1.4

type RepositoryFilter = []string

RepositoryFilter defines model for RepositoryFilter.

type ReprocessAcceptance added in v0.1.5

type ReprocessAcceptance struct {
	Generation Count `json:"generation"`
}

ReprocessAcceptance defines model for ReprocessAcceptance.

type Selection

type Selection struct {
	Bucket Bucket `json:"bucket"`

	// From Inclusive lower local-date bound, or empty when unset.
	From      string    `json:"from"`
	Harnesses []Harness `json:"harnesses"`
	Models    []string  `json:"models"`
	Period    Period    `json:"period"`
	Providers []string  `json:"providers"`
	Sessions  []string  `json:"sessions"`

	// To Inclusive upper local-date bound, or empty when unset.
	To string `json:"to"`
}

Selection defines model for Selection.

type SessionFilter

type SessionFilter = []string

SessionFilter defines model for SessionFilter.

type SortDirection

type SortDirection string

SortDirection defines model for SortDirection.

const (
	Asc  SortDirection = "asc"
	Desc SortDirection = "desc"
)

Defines values for SortDirection.

func (SortDirection) Valid

func (e SortDirection) Valid() bool

Valid indicates whether the value is a known member of the SortDirection enum.

type SortField

type SortField string

SortField defines model for SortField.

const (
	SortFieldAverageContext SortField = "averageContext"
	SortFieldCacheRead      SortField = "cacheRead"
	SortFieldCacheWrite     SortField = "cacheWrite"
	SortFieldContext        SortField = "context"
	SortFieldDate           SortField = "date"
	SortFieldHarness        SortField = "harness"
	SortFieldInput          SortField = "input"
	SortFieldMaxContext     SortField = "maxContext"
	SortFieldMedianContext  SortField = "medianContext"
	SortFieldModel          SortField = "model"
	SortFieldName           SortField = "name"
	SortFieldOutput         SortField = "output"
	SortFieldProvider       SortField = "provider"
	SortFieldReasoning      SortField = "reasoning"
	SortFieldSessions       SortField = "sessions"
	SortFieldTotal          SortField = "total"
)

Defines values for SortField.

func (SortField) Valid

func (e SortField) Valid() bool

Valid indicates whether the value is a known member of the SortField enum.

type StatusResponseV2 added in v0.1.5

type StatusResponseV2 struct {
	// DataEpoch Durable database identity; nonempty when dataReadiness is ready.
	DataEpoch     string                        `json:"dataEpoch"`
	DataReadiness StatusResponseV2DataReadiness `json:"dataReadiness"`
	DatasetId     string                        `json:"datasetId"`

	// Failed Pending scopes with a durable processing error in this dataset and target generation.
	Failed *int64 `json:"failed,omitempty"`

	// FailedRetryAtMs Earliest retry time for failed pending scopes, as Unix milliseconds; zero when none exist.
	FailedRetryAtMs *int64 `json:"failedRetryAtMs,omitempty"`
	Generation      Count  `json:"generation"`
	InputRevision   Count  `json:"inputRevision"`
	InstanceId      string `json:"instanceId"`
	Pending         Count  `json:"pending"`

	// ProcessUsage Current TokenInsights process resources, sampled only by in-process Web. Hosted responses omit this object. Unavailable measurements are omitted.
	ProcessUsage     *ProcessUsage `json:"processUsage,omitempty"`
	Revision         Count         `json:"revision"`
	TargetGeneration Count         `json:"targetGeneration"`
}

StatusResponseV2 defines model for StatusResponseV2.

type StatusResponseV2DataReadiness added in v0.1.5

type StatusResponseV2DataReadiness string

StatusResponseV2DataReadiness defines model for StatusResponseV2.DataReadiness.

const (
	StatusResponseV2DataReadinessMetadata    StatusResponseV2DataReadiness = "metadata"
	StatusResponseV2DataReadinessReady       StatusResponseV2DataReadiness = "ready"
	StatusResponseV2DataReadinessRebuild     StatusResponseV2DataReadiness = "rebuild"
	StatusResponseV2DataReadinessRecovery    StatusResponseV2DataReadiness = "recovery"
	StatusResponseV2DataReadinessUnavailable StatusResponseV2DataReadiness = "unavailable"
)

Defines values for StatusResponseV2DataReadiness.

func (StatusResponseV2DataReadiness) Valid added in v0.1.5

Valid indicates whether the value is a known member of the StatusResponseV2DataReadiness enum.

type TimestampMs added in v0.1.5

type TimestampMs = int64

TimestampMs Unix milliseconds through 9999-12-30T23:59:59.999Z. One day of headroom preserves calendar query support after timezone conversion. Source units are never guessed or rescaled.

type ToFilter

type ToFilter = string

ToFilter defines model for ToFilter.

type Unavailable

type Unavailable = ErrorResponse

Unavailable defines model for Unavailable.

type UsageFacetsResponseV2 added in v0.1.5

type UsageFacetsResponseV2 struct {
	DataEpoch     string           `json:"dataEpoch"`
	DatasetId     string           `json:"datasetId"`
	Directories   []LocationOption `json:"directories"`
	Generation    *Count           `json:"generation,omitempty"`
	Harnesses     []Harness        `json:"harnesses"`
	InputRevision *Count           `json:"inputRevision,omitempty"`
	InstanceId    string           `json:"instanceId"`
	Models        []string         `json:"models"`
	Pending       *Count           `json:"pending,omitempty"`
	Providers     []string         `json:"providers"`
	Repositories  []LocationOption `json:"repositories"`
	Revision      Count            `json:"revision"`
	Sessions      []string         `json:"sessions"`
}

UsageFacetsResponseV2 defines model for UsageFacetsResponseV2.

type UsageQuality added in v0.1.5

type UsageQuality string

UsageQuality Estimated evidence is queried separately and never included in confirmed totals.

const (
	Confirmed UsageQuality = "confirmed"
	Estimated UsageQuality = "estimated"
)

Defines values for UsageQuality.

func (UsageQuality) Valid added in v0.1.5

func (e UsageQuality) Valid() bool

Valid indicates whether the value is a known member of the UsageQuality enum.

type UsageResponseV2 added in v0.1.5

type UsageResponseV2 struct {
	Chart         []UsageRow `json:"chart"`
	DataEpoch     string     `json:"dataEpoch"`
	DatasetId     string     `json:"datasetId"`
	FactCount     *Count     `json:"factCount,omitempty"`
	Generation    *Count     `json:"generation,omitempty"`
	InputRevision *Count     `json:"inputRevision,omitempty"`
	InstanceId    string     `json:"instanceId"`

	// LastSynced Time of the last committed ingestion, in Unix milliseconds; zero for an empty server.
	LastSynced Count  `json:"lastSynced"`
	Page       int    `json:"page"`
	PageSize   int    `json:"pageSize"`
	Pending    *Count `json:"pending,omitempty"`

	// Quality Estimated evidence is queried separately and never included in confirmed totals.
	Quality    *UsageQuality `json:"quality,omitempty"`
	Range      string        `json:"range"`
	Revision   Count         `json:"revision"`
	RowCount   Count         `json:"rowCount"`
	Rows       []UsageRow    `json:"rows"`
	Summary    UsageSummary  `json:"summary"`
	Unresolved *Count        `json:"unresolved,omitempty"`
}

UsageResponseV2 defines model for UsageResponseV2.

type UsageRow

type UsageRow struct {
	AverageContext Count `json:"averageContext"`
	CacheRead      Count `json:"cacheRead"`
	CacheWrite     Count `json:"cacheWrite"`
	Context        Count `json:"context"`
	Date           Count `json:"date"`

	// DirectoryNames Distinct recorded directories contributing to this row, sorted by display name. Empty outside Repo rows.
	DirectoryNames []string `json:"directoryNames"`
	Harness        string   `json:"harness"`

	// HasUnknownDirectory Whether any contributing fact lacks a recorded directory. False outside Repo rows.
	HasUnknownDirectory bool   `json:"hasUnknownDirectory"`
	Input               Count  `json:"input"`
	Key                 string `json:"key"`
	LocationKey         string `json:"locationKey"`

	// LocationName Sanitized display label; full source paths are never ingested.
	LocationName   string `json:"locationName"`
	MaxContext     Count  `json:"maxContext"`
	MedianContext  Count  `json:"medianContext"`
	Model          string `json:"model"`
	Name           string `json:"name"`
	Output         Count  `json:"output"`
	Provider       string `json:"provider"`
	Reasoning      Count  `json:"reasoning"`
	RepositoryKey  string `json:"repositoryKey"`
	RepositoryName string `json:"repositoryName"`
	Sessions       Count  `json:"sessions"`
	Total          Count  `json:"total"`
}

UsageRow defines model for UsageRow.

type UsageSummary

type UsageSummary struct {
	CacheRead      Count `json:"cacheRead"`
	CacheWrite     Count `json:"cacheWrite"`
	Input          Count `json:"input"`
	Output         Count `json:"output"`
	Reasoning      Count `json:"reasoning"`
	Sessions       Count `json:"sessions"`
	SyncedSessions Count `json:"syncedSessions"`
	Total          Count `json:"total"`
}

UsageSummary defines model for UsageSummary.

type UsageTab

type UsageTab string

UsageTab defines model for UsageTab.

const (
	UsageTabContext   UsageTab = "context"
	UsageTabHarnesses UsageTab = "harnesses"
	UsageTabModels    UsageTab = "models"
	UsageTabProviders UsageTab = "providers"
	UsageTabRepo      UsageTab = "repo"
	UsageTabSessions  UsageTab = "sessions"
	UsageTabTokens    UsageTab = "tokens"
)

Defines values for UsageTab.

func (UsageTab) Valid

func (e UsageTab) Valid() bool

Valid indicates whether the value is a known member of the UsageTab enum.

Jump to

Keyboard shortcuts

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