@karmaniverous/entity-manager
    Preparing search index...

    Interface ConfigInput

    Values-first config input used to capture literal tokens from the provided configuration value. This does not enforce full Config shape at compile time; runtime validation still occurs via Zod in the EntityManager.

    Keep this intentionally permissive to maximize inference from as const.

    interface ConfigInput {
        entities?: Record<string, unknown>;
        entitiesSchema?: Record<
            string,
            ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>,
        >;
        generatedKeyDelimiter?: string;
        generatedProperties?: {
            sharded?: Record<string, readonly string[]>;
            unsharded?: Record<string, readonly string[]>;
        };
        generatedValueDelimiter?: string;
        hashKey: string;
        indexes?: Record<
            string,
            { hashKey: string; projections?: string[]; rangeKey: string },
        >;
        propertyTranscodes?: Record<string, string>;
        rangeKey: string;
        shardKeyDelimiter?: string;
        throttle?: number;
        transcodes?: unknown;
    }
    Index

    Properties

    entities?: Record<string, unknown>

    Optional per-entity configuration (runtime semantics).

    This is intentionally permissive in ConfigInput; runtime validation occurs in the EntityManager constructor via Zod.

    entitiesSchema?: Record<
        string,
        ZodType<unknown, unknown, $ZodTypeInternals<unknown, unknown>>,
    >

    Optional Zod schemas for per-entity domain shapes (non-generated fields only).

    Schemas MUST declare only base (non-generated) properties. Do not include:

    • global keys (hashKey/rangeKey), or
    • generated property tokens (sharded/unsharded keys).
    generatedKeyDelimiter?: string

    Optional delimiter between generated key elements (default |).

    generatedProperties?: {
        sharded?: Record<string, readonly string[]>;
        unsharded?: Record<string, readonly string[]>;
    }

    Optional generated property token maps.

    Type Declaration

    • Optionalsharded?: Record<string, readonly string[]>

      Sharded generated property tokens (hash-side).

    • Optionalunsharded?: Record<string, readonly string[]>

      Unsharded generated property tokens (range-side).

    • sharded keys are hash-side generated property tokens and are encoded atomically.
    • unsharded keys are range-side generated property tokens.
    generatedValueDelimiter?: string

    Optional delimiter between a generated element name and its value (default #).

    hashKey: string

    Global hash key property name (e.g., "pk").

    indexes?: Record<
        string,
        { hashKey: string; projections?: string[]; rangeKey: string },
    >

    Optional index token map used for typing and paging-key narrowing.

    This is provider-agnostic metadata (not a provider-specific index definition).

    propertyTranscodes?: Record<string, string>

    Optional map of transcodable property token -> transcode name.

    Only properties present here are treated as “transcoded properties”.

    rangeKey: string

    Global range key property name (e.g., "sk").

    shardKeyDelimiter?: string

    Optional delimiter between entity token and shard suffix in hash key values (default !).

    throttle?: number

    Optional maximum concurrency for shard queries.

    transcodes?: unknown

    Optional transcode registry/value (validated at runtime).