/** * Reading a collection's `display` block. * * Two questions, kept apart because they are answered at different times: which * *property* fills a role (readable from values already in hand) and which * *resolver* fills it (may have to go to the network). A caller that cannot * await — a sort comparator, an export column, a server render — uses the key * and is documented to ignore resolvers. */ import type { AdminCollection, EntityDisplayResolver, EntityDisplayRole } from "@rebasepro/cms-types"; /** * The property path a role is declared to read, when it is declared as a path. * * Returns `undefined` for a role filled by a resolver — a resolver has no key — * and for a role the collection says nothing about, which is then derived. * * @group Collections */ export declare function getDisplayPropertyKey>(collection: AdminCollection, role: EntityDisplayRole): string | undefined; /** * The resolver a role is declared to use, when it is declared as one. * * @group Collections */ export declare function getDisplayResolver>(collection: AdminCollection, role: EntityDisplayRole): EntityDisplayResolver | undefined; /** * True when the collection states this role at all, in either form. * * The derivation is a guess about what a collection probably means; a statement * outranks it, and the heuristics that look for "the first enum" or "the leading * relation" have to stand down when one exists. * * @group Collections */ export declare function hasDeclaredDisplay>(collection: AdminCollection, role: EntityDisplayRole): boolean;