FieldPermissionKey
FieldPermissionKey<
TData> = [Extract<keyofTData,string>] extends [never] ?string:Exclude<Extract<keyofTData,string>,SystemFieldKey>
Defined in: packages/core/src/access/types.ts:69
The gateable field names of a document type — its own keys minus the system keys Convex owns.
Degrades to string when the document type enumerates no keys — the
pre-generation case, where AccessDocFor resolves to the wide fallback and
DeclaredDoc strips its index signature down to {}. Without the
degradation keyof would be never and EVERY map key would read as excess,
so the validator would reject every map until vex generate has run.
Degrading instead collapses both FieldPermissionMap branches to “any
string-keyed map” and makes the exhaustiveness requirement inert, which is
the same posture AccessDocFor already takes.
Type Parameters
Section titled “Type Parameters”TData
Document type for the subject.