Configuration Types
StrapiIntegrateConfig
Fully resolved and validated configuration object.
Field Descriptions
Field Descriptions
string
required
Strapi backend URL (validated as valid URL)
string
API token for schema sync
string
default:"/api"
Strapi REST API prefix
'v4' | 'v5'
default:"v5"
Strapi major version
'typescript' | 'jsdoc'
default:"typescript"
Output file format
'esm' | 'commonjs'
Module system for JSDoc output
string
default:"src/strapi"
Output directory path
object
required
Feature flags for code generation
boolean
default:false
Use advanced relation format
boolean
default:false
Include draft content types
boolean
default:false
Generate strict types (no optional fields)
StrapiIntegrateConfigInput
Input type for defineConfig() - Zod’s input type with optional fields and defaults.
CLI Command Types
InitCommandOptions
Options for the init command.
SyncCommandOptions
Options for the sync command.
Schema Types
Types representing Strapi schema structure.StrapiSchema
Raw schema from Strapi API.
StrapiLocale
Locale configuration from Strapi i18n plugin.
ContentTypeSchema
Content type schema from Strapi (v5 structure).
ComponentSchema
Component schema from Strapi.
ParsedSchema
Simplified schema after parsing (used for code generation).
CollectionType
SingleType
ComponentType
Attribute Types
Types representing Strapi field attributes.AttributeType
Union of all possible attribute type strings.
BaseAttribute
Common fields for all attributes.
StringAttribute
BlocksAttribute
Strapi v5 blocks editor field.
NumberAttribute
BooleanAttribute
DateAttribute
JsonAttribute
EnumerationAttribute
MediaAttribute
RelationAttribute
ComponentAttribute
DynamicZoneAttribute
Attribute
Union of all attribute types.
Utility Types
StrapiVersion
Import Paths
Type Guards
While not exported, you can create type guards for attribute discrimination:Generated Types
The types above are for strapi2front’s internal structure. When you runstrapi2front sync, it generates types specific to your Strapi schema: