Documentation Index
Fetch the complete documentation index at: https://mintlify.com/tailor-platform/sdk/llms.txt
Use this file to discover all available pages before exploring further.
Function Signature
Parameters
Variable number of generator configurations. Each configuration is a tuple of
[generatorName, options]Generator package name. Built-in generators:
"@tailor-platform/kysely-type": Generate Kysely types for TailorDB"@tailor-platform/seed": Generate seed data utilities"@tailor-platform/enum-constants": Generate enum constants"@tailor-platform/file-utils": Generate file utility functions
Returns
The same generator configurations array passed as input
Migration to Plugins
ThedefineGenerators() function has been deprecated in favor of definePlugins(), which provides more flexibility and power. Here’s how to migrate:
- Old (Deprecated)
- New (Recommended)
Example (Deprecated)
Built-in Generators
Kysely Type Generator
Generates TypeScript types for TailorDB schemas using Kysely.- Install
@tailor-platform/kysely-typeas a dependency - Required for using
getDB()in resolvers, executors, and workflows
Seed Generator
Generates utilities for seeding data into TailorDB.- Install
@tailor-platform/function-typesas a devDependency
Enum Constants Generator
Generates TypeScript constants for enum values defined in TailorDB schemas.File Utils Generator
Generates utility functions for file operations.Notes
- This function is deprecated and will be removed in a future version
- Use
definePlugins()instead for new projects - Generators are passed as tuples (rest arguments), not as an array
- The generated files are created during the build process
- Generators depend on your TailorDB schema definitions
- See the definePlugins documentation for the recommended approach