@maverickcer/env-cap
    Preparing search index...

    Interface ContractDocs<S>

    Contract-level documentation, plus everything documentEnv's options used to carry that only the generator ever read.

    Generic over S, the exact schema type documentEnv infers from its schema argument -- this is what makes variables below a closed, checked map (a typo'd or renamed key is a compile error, not a silent no-op) rather than an open Record<string, VariableDocs> any string would satisfy. S defaults to the widest possible schema so this type is still nameable on its own (e.g. in a helper function's own parameter type) without narrowing to one specific contract.

    interface ContractDocs<S extends EnvSchema = EnvSchema> {
        active?: boolean;
        auditRequired?: boolean;
        category?: string;
        dataResidency?: string | string[];
        deprecated?: boolean;
        deprecatedReason?: string;
        exclusiveGroup?: string;
        expiresAt?: string;
        legalBasis?: string;
        metadata?: Record<string, unknown>;
        name?: string;
        owner?: string;
        purpose?: string;
        retention?: string;
        sensitivity?: string;
        variables?: { readonly [K in string | number | symbol]?: VariableDocs };
    }

    Type Parameters

    Index
    active?: boolean

    When false, this contract is excluded from the generated manifest, docs' required section, and exclusiveGroup checks -- it still appears, marked disabled, in the feature catalog. Defaults to true.

    auditRequired?: boolean

    Default audit-required assertion for this contract's variables -- see VariableDocs.auditRequired.

    category?: string

    Groups this contract under a heading in the generated docs' feature catalog.

    dataResidency?: string | string[]

    Default data residency for this contract's variables -- see VariableDocs.dataResidency.

    deprecated?: boolean

    Marks this whole contract/feature as being phased out. Independent of active (on/off, not a phase-out signal).

    deprecatedReason?: string

    Why this contract is deprecated, and/or what to use instead. Only meaningful alongside deprecated: true.

    exclusiveGroup?: string

    The generator throws if two active contracts declare the same exclusiveGroup -- use it to mark interchangeable features (e.g. two database backends) as mutually exclusive.

    expiresAt?: string

    Whole-contract/feature sunset date, ISO date string.

    legalBasis?: string

    Default legal basis for this contract's variables -- see VariableDocs.legalBasis.

    metadata?: Record<string, unknown>

    Arbitrary contract-level documentation (e.g. runbook), rendered alongside this feature -- see VariableDocs.metadata.

    name?: string

    Overrides the auto-generated label used in generated docs. Purely cosmetic. Wins over createEnv()'s own name option, which in turn wins over the exported binding name.

    owner?: string

    Default owner for every variable in this contract that doesn't set its own owner.

    purpose?: string

    Default reason this contract's variables' values are collected/used -- see VariableDocs.purpose.

    retention?: string

    Default retention policy for this contract's variables -- see VariableDocs.retention.

    sensitivity?: string

    Default sensitivity for every variable in this contract that doesn't set its own sensitivity -- see VariableDocs.sensitivity for why this is an open string.

    variables?: { readonly [K in string | number | symbol]?: VariableDocs }

    Per-variable documentation, keyed by variable name -- keys are checked against S's own keys at compile time, so documenting a variable that was renamed or removed from schema (or a plain typo) is a type error here, not a silently-ignored entry the generator would otherwise have to report as "stale" after the fact. A schema key absent from variables entirely is still valid (not every variable needs documentation) and is reported as undocumented by the generator, exactly as before.