@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 42 lines 1.24 KB
Raw
1 import type * as ivsrealtime from "@distilled.cloud/aws/ivs-realtime";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { Stage } from "./Stage.ts";
5
6 /** The `stageArn` is injected by the binding from the bound stage. */
7 export interface GetParticipantRequest extends Omit<
8 ivsrealtime.GetParticipantRequest,
9 "stageArn"
10 > {}
11
12 /**
13 * Read a participant's detail (state, join time, attributes, publish state,
14 * recording state, connection metadata) for a session of the bound stage.
15 *
16 * ### Inspecting Participants
17 * **Example:** Look up a participant
18 * ```typescript
19 * // init
20 * const getParticipant = yield* IVSRealtime.GetParticipant(stage);
21 *
22 * // runtime
23 * const { participant } = yield* getParticipant({
24 * sessionId: "st-a1b2c3d4e5f6",
25 * participantId: "abcDEF123",
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface GetParticipant extends Binding.Service<
32 GetParticipant,
33 "AWS.IVSRealtime.GetParticipant",
34 (
35 stage: Stage,
36 ) => Effect.Effect<
37 (
38 request: GetParticipantRequest,
39 ) => Effect.Effect<ivsrealtime.GetParticipantResponse, ivsrealtime.GetParticipantError>
40 >
41 > {}
42 export const GetParticipant = Binding.Service<GetParticipant>("AWS.IVSRealtime.GetParticipant");