openmixer — generated API reference
    Preparing search index...

    Interface DerivedConfig<A, S>

    interface DerivedConfig<A, S extends object> {
        address: AddressCodec<A>;
        carried?: CarriedSeriesDeclaration;
        declares?: Readonly<Record<string, FieldCodec<unknown>>>;
        derive: (addr: A) => S | undefined;
        instances?: () => Iterable<A>;
        lifecycle?: LifecycleDoors<A>;
        path: string;
        policy?: ResourcePolicy;
        served?: (state: S, view: ReadView) => object;
    }

    Type Parameters

    • A
    • S extends object
    Index
    address: AddressCodec<A>

    The per-instance row this collection CARRIES as level series, and how — see carried-series.ts. From this one declaration the mold publishes every series' codec on OPTIONS (beside declares), the registry answers which collection carries a path, and the stream hub projects the frame per subscriber. A collection declares it; nothing else does.

    declares?: Readonly<Record<string, FieldCodec<unknown>>>

    Fields a READ of this view may answer BEYOND the derived state's own keys, with the codec that spells each — published on OPTIONS with the codec's travel, exactly as a stored field's codec is. A view whose served body takes a subscriber-chosen projection (the spectrum at ?bands=N) declares that projection's field here, so a client learns the quantum and the unit from the desk rather than compiling them in.

    derive: (addr: A) => S | undefined

    The whole state, computed fresh; undefined means the instance does not exist.

    instances?: () => Iterable<A>

    Which addresses this view currently answers for, when the underlying store can say.

    Omitted is not "none": a derived row over somebody else's store often has no key list, and the registry then probes the empty id — which is all a SINGLETON view needs, so no /telemetry/latency-shaped row declares this to be in a console snapshot.

    lifecycle?: LifecycleDoors<A>

    The item-lifecycle doors. A derived view of a STORE is exactly where creation belongs: POST /scenes has no instance to patch — the id does not exist until the store mints it — so the collection itself is the addressable thing and the minted id is the answer.

    path: string

    What a committed write here means for the session's dirtiness and the operator's history. Absent means the layer default: it dirties the session, is not undoable, and is not a barrier (see ResourcePolicy).

    served?: (state: S, view: ReadView) => object

    The state as one reader sees it — see ConsoleResource.served. The spectrum row declares its banding here (bands = the reader's resolution). A row that declares carried and no served gets the carried projection: the frame narrowed to the instances the reader demands, whole for a reader that demands the collection itself.