Skip to content

Resources

Everything below Policy is generated from your schema, so the exact list depends on it. What follows is the shape.

The one declaration this lexicon serializes. One Policy per policy.

import { Policy } from "@intentius/chant-lexicon-cedar";
export const ownerRead = new Policy({ /* … */ });

Its props are covered in Policies.

Each entity T = { … } in the schema produces three things:

GeneratedKindWhat it is
Documentresource classThe entity type, for declaring entities
DocumentAttributesproperty classIts attribute record, usable standalone
DocumentUidtypeApp::Document::"${string}" — a template-literal type

DocumentUid is the one that earns its keep. It makes a mistyped namespace a compile error:

import type { DocumentUid } from "@intentius/chant-lexicon-cedar";
const contract: DocumentUid = 'App::Document::"contract-2026"'; // ok
const typo: DocumentUid = 'App::Docmnt::"contract-2026"'; // compile error

Each action produces a const (not a class — an action UID is a value, not a constructor) and a context record type:

import { ReadAction, type ReadContextProps } from "@intentius/chant-lexicon-cedar";
// ReadAction === 'App::Action::"read"'
NameWhat it holds
EntityTypeNameUnion of every entity type name, as Cedar writes it
EntityUidUnion of every entity UID type
ActionUidUnion of every action UID
PolicyRefEntityUid | ActionUid — anything a scope may name
PolicyScopeOne scope position
ALL_ACTIONSEvery action constant, for exhaustive iteration
ALL_ENTITY_TYPESEvery entity type name

ALL_ACTIONS is what a cross-domain post-synth check iterates when asking “is any action uncovered”.

Names are derived from the schema and de-duplicated against a single pool, so a schema declaring an entity type literally called UserAttributes beside a User does not get its name stolen by the derived record type. Two declarations in the same namespace reducing to the same short name are both qualified rather than one silently overwriting the other.

Terminal window
npx chant cedar coverage --verbose

Reports whether every entity type and every action in the schema is reachable from the generated artifacts. A gap is a defect: an action with no generated constant is one a policy can only name as a hand-typed string, which is the failure mode this lexicon exists to remove.