web / lib/types/schema-inference
lib/types/schema-inference
Shared types for the schema inference API and its consumers.
These types describe the request options and response returned by the
/api/v1/datasets/[id]/schema/infer endpoint. They live here (rather
than in the route file) so that both server and client code can import
them without creating a dependency from hooks/components into route modules.
Interfaces
SchemaInferenceOptions
Options for controlling schema inference behavior.
Properties
sampleSize?
optionalsampleSize:number
Maximum number of events to sample (default: 500)
batchSize?
optionalbatchSize:number
Number of events to process per batch (default: 100)
forceRegenerate?
optionalforceRegenerate:boolean
Generate schema even if one already exists and is fresh (default: false)
SchemaInferenceResponse
Response format for the schema inference endpoint.
Properties
generated
generated:
boolean
message
message:
string
eventsSampled?
optionaleventsSampled:number
schema
schema:
{ id: number; versionNumber: number; createdAt: string; eventCountAtCreation?: number; }|null