type
Collection
Public authoring and runtime contracts live in core. These aliases keep the root package as the ergonomic application-facing entry point.
Properties
| Property | Type | Description |
|---|---|---|
Slug | schema.CollectionSlug | Slug is the URL-safe collection name used by APIs, relationships, and the admin. |
Labels | CollectionLabels | Labels override the singular and plural names shown to authors. |
Admin | CollectionAdmin | Admin configures collection presentation and editorial organization. |
Fields | field.Fields | Fields owns the collection's immutable field shape, behavior, and presentation. |
Indexes | []CollectionIndex | Indexes defines ordered multi-field indexes. Unique indexes enforce tuple uniqueness while allowing multiple rows containing null. |
Auth | bool | Auth enables identities, passwords, and sessions for this collection. |
AuthConfig | AuthConfig | AuthConfig customizes behavior that applies when Auth is enabled. |
Upload | bool | Upload enables file metadata and storage behavior for this collection. |
UploadConfig | UploadConfig | UploadConfig customizes validation, privacy, and image variants for uploads. |
Versions | bool | Versions enables document revisions for this collection. |
Trash | bool | Trash keeps deleted documents recoverable until they are permanently deleted. |
LockDocuments | bool | LockDocuments coordinates exclusive document editing with timeout and takeover. |
DocumentLockConfig | DocumentLockConfig | DocumentLockConfig customizes lock expiry when LockDocuments is enabled. |
VersionConfig | VersionConfig | VersionConfig customizes drafts, retention, and autosave behavior. |
Access | CollectionAccess | Access defines collection-level authorization for each operation. |
Hooks | CollectionHooks | Hooks defines collection-wide lifecycle behavior. |
Endpoints | []Endpoint | Endpoints declares custom HTTP endpoints below /api/collections/<slug>. They run before matching built-in collection routes for the same method. |