Documentation
¶
Overview ¶
Package codegen generates typed source code from plugin action and connector descriptors (JSON Schema). First target language: TypeScript.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTypeScript ¶
func GenerateTypeScript(entry *plugins.CatalogEntry, namespace string) ([]byte, error)
GenerateTypeScript converts a CatalogEntry into a complete .ts file containing one namespace (PascalCase of the plugin id) with Input/Output interfaces for every action, a type guard function for every Output, and a Config interface for every connector.
namespace overrides the auto-detected namespace name. When empty, the namespace is inferred from the common domain prefix of the plugin's action ids (e.g. actions "imap.list-messages@1" and "imap.get-message@1" share the domain "imap" → namespace "Imap"). If no common domain exists, the plugin id itself is used as a fallback.
Types ¶
This section is empty.