Schemas and Types
Astro PocketBase generates schemas and types for your collections
Generic type
The PocketBase SDK provides a generic type for its collections called RecordModel
:
Generated types
Zod schemas and types are generated for you and available for each collection in src/lib/pocketbase/schemas
:
The default naming is based on the PocketBase SDK convention; so for a collection named posts
you will be given access to a PostsRecord
schema and a PostsRecord
type.