type

PluginFieldType

Exact generated Go, TypeScript, where, and OpenAPI types for a plugin field.

Properties

PropertyTypeDescription
EmbeddedTypes[]stringEmbeddedTypes lists tree.case selectors supplying ordered generic payload type arguments.
KeystringPluginField key stored in the schema manifest.
TypeScriptPackagestringPackage exporting the named TypeScript contracts.
TypeScriptOutputstringStored document value type export.
TypeScriptInputstringCreate and update value type export.
TypeScriptWherestringOptional query operand type export.
GoPackagestringOptional generated-model Go import path.
GoTypestringExported type in GoPackage; both Go fields are optional together.
JSONSchema[]byteDeterministic OpenAPI 3.1 schema for one field value.

How it works

Go type mapping is optional and falls back to json.RawMessage. TypeScript names are emitted as type-only imports. JSONSchema must be deterministic.

Full signature

type PluginFieldType struct { // EmbeddedTypes lists tree.case selectors supplying ordered generic payload type arguments. EmbeddedTypes []string `json:"embeddedTypes,omitempty"` // Key matches the PluginField key stored in the schema manifest. Key string // TypeScriptPackage is the static import specifier exporting the named output, // input, and where types. It may select a package export subpath. TypeScriptPackage string // TypeScriptOutput is the stored document value type export. TypeScriptOutput string // TypeScriptInput is the create and update value type export. TypeScriptInput string // TypeScriptWhere is the optional query operand type export. TypeScriptWhere string // GoPackage and GoType optionally name the generated Go model type. GoPackage string // GoType is an exported type in GoPackage; both Go fields are optional together. GoType string // JSONSchema is the deterministic OpenAPI 3.1 schema for one field value. JSONSchema []byte }

Source core/plugin.go:51