import type { TypeBinding } from './store-types.js'; export type ReadLevel = 'all' | 'accepted'; /** How a role relates to a type; also the `role` the listing shows. */ export type TypeRole = 'root' | 'producer' | 'consumer-lead' | 'consumer' | 'reader'; interface DefLike { sections?: unknown; roles: { id: string; type?: string; reports_to?: string | null; }[]; } /** Lead and members of a section, as declared. */ export declare function sectionRoster(def: Pick, name: string): string[]; export declare class DocAccess { readonly root: string | undefined; private readonly byType; private readonly rosters; constructor(def: DefLike, bindings: readonly TypeBinding[]); knows(type: string): boolean; /** Types `role` may publish. */ publishable(role: string): string[]; consumerIds(type: string): string[]; /** How `role` relates to `type`, or undefined when it does not (and may not read it). */ roleFor(role: string, type: string): TypeRole | undefined; readLevel(role: string, type: string): ReadLevel | undefined; /** The types `role` may see in a listing, in declaration order. */ typesFor(role: string): { type: string; role: TypeRole; }[]; publishRefusal(role: string, type: string): string | undefined; readRefusal(role: string, type: string): string | undefined; /** A role limited to accepted versions asked for one that is not. */ acceptedOnlyRefusal(role: string, type: string, version: number, status: string): string; /** `rootOverride`: the root decides a document whose rework cap is spent (P4.7; the host establishes it). */ decideRefusal(role: string, type: string, rootOverride?: boolean): string | undefined; } export {}; //# sourceMappingURL=access.d.ts.map