Skip to content

SubjectEntry

Defined in: packages/core/src/access/types.ts:280

One entry in the subject registry: the action union, the data shape passed to callbacks, and the index registry q.withIndex resolves against.

action: string

Defined in: packages/core/src/access/types.ts:282

Union of actions this subject supports.


data: unknown

Defined in: packages/core/src/access/types.ts:286

Document/context type; never for subjects without data.


indexes: string

Defined in: packages/core/src/access/types.ts:288

Union of access-index names declared on this resource; never for non-indexable subjects.


indexFields: Record<string, readonly string[]>

Defined in: packages/core/src/access/types.ts:298

The resource’s declared indexes as name → field tuple, in declaration order. {} for subjects with no table to index (custom resources, admin subjects), which makes q.withIndex uncallable there rather than absent.

Carries TUPLES, not just the names in indexes, because AccessQueryBuilder.withIndex binds q to one index’s real field order — that is what makes positional constraint typing reachable.


queryAction: string

Defined in: packages/core/src/access/types.ts:284

Actions on this subject whose q carries withIndex. never when none do.