Skip to content

FieldMeta

FieldMeta = object

Defined in: packages/schema/src/field.ts:11

Everything a field’s builder methods have set, from which the resource’s FieldModel is built.

optional access?: FieldAccess

Defined in: packages/schema/src/field.ts:33

Its role rules (.access()).


optional ai?: object

Defined in: packages/schema/src/field.ts:63

How a job fills it (.ai()).

prompt: string

The prompt the job fills it from.


aliases: string[]

Defined in: packages/schema/src/field.ts:25

Other names filters may use for it (.alias()).


optional column?: string

Defined in: packages/schema/src/field.ts:15

The column, when it is not the snake_case of the field’s name (.column()).


optional dbDefault?: boolean

Defined in: packages/schema/src/field.ts:31

Whether the database supplies a value when none is given (.dbDefault()).


optional defaultValue?: unknown

Defined in: packages/schema/src/field.ts:29

The value of .default().


optional enumValues?: string[]

Defined in: packages/schema/src/field.ts:37

An enum’s values (f.enum()).


optional file?: FileOptions

Defined in: packages/schema/src/field.ts:61

A file field’s settings (f.file()).


filterable: boolean

Defined in: packages/schema/src/field.ts:21

Whether filters may use it (.filterable()).


hasDefault: boolean

Defined in: packages/schema/src/field.ts:27

Whether .default() gave it a value.


optional max?: number

Defined in: packages/schema/src/field.ts:52

The greatest value, or for text the longest length (.max()).


optional min?: number

Defined in: packages/schema/src/field.ts:50

The least value, or for text the shortest length (.min()).


nullable: boolean

Defined in: packages/schema/src/field.ts:17

Whether the value may be null (.optional()).


optional precision?: number

Defined in: packages/schema/src/field.ts:46

A decimal’s number of digits (f.decimal()).


readOnly: boolean

Defined in: packages/schema/src/field.ts:19

Whether the API never writes it (.readOnly()).


optional regex?: object

Defined in: packages/schema/src/field.ts:54

A pattern the text must match (.regex()).

message: string

The message of the issue a value that does not match gets.

re: RegExp

The pattern.


optional relation?: object

Defined in: packages/schema/src/field.ts:39

A relation’s resource and the columns that hold its key (f.relation(), .columns()).

optional columns?: string[]

The columns holding the other record’s key, in the order of that key; the field’s own column when omitted.

resource: string

The resource it points at.


optional scale?: number

Defined in: packages/schema/src/field.ts:48

A decimal’s number of digits after the point (f.decimal()).


optional sensitive?: boolean

Defined in: packages/schema/src/field.ts:35

Whether it is hidden like a password (.sensitive()).


sortable: boolean

Defined in: packages/schema/src/field.ts:23

Whether sorts may use it (.sortable()).


type: FieldType

Defined in: packages/schema/src/field.ts:13

The field’s type.