Participant interactions
Inspect visible participant controls, embedded forms and tap or bump actions in local SDK tests. Import these helpers from @scape-wtf/sdk/runtime.
Public exports
Import from @scape-wtf/sdk.
ParticipantInteraction, participantInteractions.
Type declarations
Import the public exports listed above from the package entry point.
ts
import { type ObjectAction, type ObjectDefinition, type ObjectField } from './api.js';
/** A concrete interaction offered by a definition to an ordinary participant. */
export interface ParticipantInteraction {
id: string;
label: string;
action: ObjectAction;
fields: ObjectField[];
confirm?: string;
pressed?: boolean;
}
export declare function participantInteractions(definition: ObjectDefinition, state: unknown, actorId: string, locked?: ReadonlySet<string>, room?: string | null): {
items: import("./api.js").ObjectListItem[];
choices: ParticipantInteraction[];
instructions?: string | undefined;
title: string;
description: string;
};1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Usage and limits
See Gizmo guides, working examples, and limits for lifecycle, validation and Scape behavior.
