type
PluginFieldType
Exact generated Go, TypeScript, where, and OpenAPI types for a plugin field.
Properties
| Property | Type | Description |
|---|---|---|
EmbeddedTypes | []string | EmbeddedTypes lists tree.case selectors supplying ordered generic payload type arguments. |
Key | string | PluginField key stored in the schema manifest. |
TypeScriptPackage | string | Package exporting the named TypeScript contracts. |
TypeScriptOutput | string | Stored document value type export. |
TypeScriptInput | string | Create and update value type export. |
TypeScriptWhere | string | Optional query operand type export. |
GoPackage | string | Optional generated-model Go import path. |
GoType | string | Exported type in GoPackage; both Go fields are optional together. |
JSONSchema | []byte | Deterministic 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
}