Skip to main content
Generate typed code from trigger payload JSON schemas. Fetches schemas linked to workflows and events from a workspace and generates type definitions in the target language.

Syntax

suprsend generate-types <language> [flags]
Arguments:
ArgumentDescription
<language>Target language: typescript, go, python, java, kotlin, swift, dart

Common Flags

FlagDescriptionDefault
-h, --helpShow help for the command
--output-file stringOutput file path for generated typesLanguage-specific default
--mode stringVersion mode (draft or live)live
--workspace stringWorkspace to get schemas fromstaging

Language-Specific Flags

Generate TypeScript type definitions from trigger payload schemas. Fetches linked schemas and generates types in a single output file. Supports Zod schema generation with --zod.
FlagDescriptionDefault
--output-file stringOutput file pathsuprsend-types.ts
--zodGenerate Zod schemas instead of plain TypeScript typesfalse

Example

# Generate TypeScript types
suprsend generate-types typescript

# Generate TypeScript types with Zod schemas
suprsend generate-types typescript --zod --workspace production

# Custom output file
suprsend generate-types typescript --output-file src/types/notifications.ts