ViewConnectOptions interface

Module @runic-artifex/views/generated in @runic-artifex/views 0.23.0

interface ViewConnectOptions<TState> extends BridgeConnectOptions

How a generated module connects one View route. Generated code is its only intended caller.

Properties

contract

readonly contract: string;

The View's operation contract, {view}:{fingerprint}.

route

readonly route: string;

The route: the root name, or content{id} for presented content.

members

readonly members: BridgeMemberDecoders<TState>;

The state members' decoders, by wire name. Members of a state that are not listed are ignored.

checkedFields

readonly checkedFields?: readonly string[];

Wire names of checked fields (write and fieldBaseline).

texts

readonly texts?: readonly string[];

Wire names of text members: string members other than append-only text fields. With the feature text-splice/1, frames change them with splices and setters send splices of long values.

scopedCommands

readonly scopedCommands?: readonly string[];

Wire names of commands scoped to the presentation they were issued for ([RunicPresentationScoped]). With the feature presentation-epoch/1, command sends them with the epoch of the state the presentation last delivered, and a call the producer answers superseded (the route's epoch changed meanwhile) resolves like one that ran.

interactions

readonly interactions?: BridgeInteractions;

The client's interactions, from defineInteractions.

handlers

readonly handlers?: Readonly<Record<string, ((input: never, context: BridgeInteractionContext) => unknown) | undefined>>;

Interaction handlers by interaction name, registered before open and sent with it, so the producer can ask them from the first request on. Handlers registered later through interactions are sent with interactions. An undefined entry registers nothing, so a generated connect{Name} can pass its typed options through.

requests

readonly requests?: BridgeViewRequests;

The client's view requests, from defineRequests (view-requests/1).

collections

readonly collections?: BridgeCollections;

The keyed collections and append-only text fields, from defineCollections.

operations

readonly operations?: BridgeOperations;

bridgeOperations, for a client with operations.