CollectionConfig
Defined in: packages/core/src/collections/types.ts:599
Resolved collection configuration after defaults are applied by defineCollection().
- CollectionConfigInput for the user-facing input type
- defineCollection for the config function
Type Parameters
Section titled “Type Parameters”TFieldMeta
Section titled “TFieldMeta”TFieldMeta extends object = { }
TCollectionMeta
Section titled “TCollectionMeta”TCollectionMeta extends object = { }
TCollectionSlug
Section titled “TCollectionSlug”TCollectionSlug extends CollectionSlug = CollectionSlug
TFields
Section titled “TFields”TFields extends Record<string, AdminField> = Record<string, AdminField>
TComponent
Section titled “TComponent”TComponent extends ComponentHKT = ComponentHKT
TDrafts
Section titled “TDrafts”TDrafts extends boolean = boolean
TTimestamps
Section titled “TTimestamps”TTimestamps extends boolean = boolean
TFieldSlug
Section titled “TFieldSlug”TFieldSlug extends string = CollectionDataFieldSlug<TFields, TTimestamps>
Properties
Section titled “Properties”admin:
AdminCollectionConfig<TFieldSlug,TComponent,TCollectionSlug>
Defined in: packages/core/src/collections/types.ts:621
Resolved admin panel configuration for this collection.
fields
Section titled “fields”fields:
Partial<Record<"updatedAt",AdminField<TFieldMeta>>> &TFields
Defined in: packages/core/src/collections/types.ts:639
Resolved field definitions for this collection.
The ReservedCollectionFieldKey half covers the updatedAt field
defineCollection injects. It is Partial because { timestamps: false }
opts out, so reading it must be null-checked — the same reason
stampUpdatedAt treats an absent entry as “do not stamp”.
hooks:
CollectionHooks<TCollectionSlug>
Defined in: packages/core/src/collections/types.ts:650
Resolved lifecycle hooks. Always present; defaults to {}.
indexes?
Section titled “indexes?”
optionalindexes?:object[]
Defined in: packages/core/src/collections/types.ts:643
Index definitions that create indexes on this collection in Convex.
draftStatus?
Section titled “draftStatus?”
optionaldraftStatus?:TDraftsextendstrue?true|"both":never
fields
Section titled “fields”fields:
NoInfer<TFieldSlug>[]
name:
string
interfaceName
Section titled “interfaceName”interfaceName:
string
Defined in: packages/core/src/collections/types.ts:641
PascalCase identifier derived from slug, used as the TypeScript interface name in generated types (e.g. "posts" → "Posts").
labels
Section titled “labels”labels:
object
Defined in: packages/core/src/collections/types.ts:625
Display names shown in the admin panel — always present after defaults are applied.
plural
Section titled “plural”plural:
string
Plural display name (e.g. "Posts").
singular
Section titled “singular”singular:
string
Singular display name (e.g. "Post").
meta:
TCollectionMeta
Defined in: packages/core/src/collections/types.ts:648
slug:
TCollectionSlug
Defined in: packages/core/src/collections/types.ts:623
Convex table name for this collection.
versions
Section titled “versions”versions:
object
Defined in: packages/core/src/collections/types.ts:651
autosave
Section titled “autosave”autosave:
object
autosave.debounceMs
Section titled “autosave.debounceMs”debounceMs:
number
autosave.enabled
Section titled “autosave.enabled”enabled:
boolean
cascadeDelete
Section titled “cascadeDelete”cascadeDelete:
boolean
defaultStatus
Section titled “defaultStatus”defaultStatus:
"draft"|"published"
drafts
Section titled “drafts”drafts:
TDrafts