basalt / admin/src / ResourceConfig
Interface: ResourceConfig
Defined in: admin/src/resource.ts:4
Properties
columns?
> optional columns?: string[]
Defined in: admin/src/resource.ts:15
Ordered subset of fields shown in the table. Defaults to all.
createSchema?
> optional createSchema?: ZodObject<Readonly<{[k: string]: $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; }>, $strip>
Defined in: admin/src/resource.ts:11
Input schema for creation — drives the create form and validation.
fields?
> optional fields?: Record<string, FieldConfig>
Defined in: admin/src/resource.ts:31
Display overrides keyed by field name, for every schema of the resource.
Labels otherwise come from the field name through humanize(), which is an English transformation of an identifier — taxId reads 'Tax Id' — and enum options come out as the stored values. Neither is presentable in an application written in another language, or wherever the field name is a developer's name for the thing rather than the reader's.
fields: { taxId: { label: 'NIF' }, kind: { options: { person: 'Pessoa' } } }idField?
> optional idField?: string
Defined in: admin/src/resource.ts:17
Identifier field. Default: 'id'.
label?
> optional label?: string
Defined in: admin/src/resource.ts:7
name
> name: string
Defined in: admin/src/resource.ts:6
Plural machine name, e.g. 'projects'.
schema
> schema: ZodObject<Readonly<{[k: string]: $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; }>>
Defined in: admin/src/resource.ts:9
Entity schema — drives table columns.
updateSchema?
> optional updateSchema?: ZodObject<Readonly<{[k: string]: $ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>; }>, $strip>
Defined in: admin/src/resource.ts:13
Input schema for edits. Defaults to createSchema.