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

main
ts 44 lines 1.28 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 ListParticipantsRequest extends Omit<
8 ivsrealtime.ListParticipantsRequest,
9 "stageArn"
10 > {}
11
12 /**
13 * List all participants in a session of the bound stage, optionally
14 * filtered by user id, publish state, connection state, or recording state.
15 *
16 * ### Inspecting Participants
17 * **Example:** List a session's participants
18 * ```typescript
19 * // init
20 * const listParticipants = yield* IVSRealtime.ListParticipants(stage);
21 *
22 * // runtime
23 * const { participants } = yield* listParticipants({
24 * sessionId: "st-a1b2c3d4e5f6",
25 * filterByPublished: true,
26 * });
27 * ```
28 *
29 * @binding
30 */
31 export interface ListParticipants extends Binding.Service<
32 ListParticipants,
33 "AWS.IVSRealtime.ListParticipants",
34 (
35 stage: Stage,
36 ) => Effect.Effect<
37 (
38 request: ListParticipantsRequest,
39 ) => Effect.Effect<ivsrealtime.ListParticipantsResponse, ivsrealtime.ListParticipantsError>
40 >
41 > {}
42 export const ListParticipants = Binding.Service<ListParticipants>(
43 "AWS.IVSRealtime.ListParticipants",
44 );