1import type * as ivsrealtime from "@distilled.cloud/aws/ivs-realtime";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Stage } from "./Stage.ts";
5
6/** The `stageArn` is injected by the binding from the bound stage. */
7export interface ListParticipantEventsRequest extends Omit<
8 ivsrealtime.ListParticipantEventsRequest,
9 "stageArn"
10> {}
11
12/**
13 * List the events (joined, left, publish started/stopped, errors) recorded
14 * for a participant during a session of the bound stage.
15 *
16 * ### Inspecting Participants
17 * **Example:** Audit a participant's session events
18 * ```typescript
19 * // init
20 * const listParticipantEvents = yield* IVSRealtime.ListParticipantEvents(stage);
21 *
22 * // runtime
23 * const { events } = yield* listParticipantEvents({
24 * sessionId: "st-a1b2c3d4e5f6",
25 * participantId: "abcDEF123",
26 * });
27 * ```
28 *
29 * @binding
30 */
31export interface ListParticipantEvents extends Binding.Service<
32 ListParticipantEvents,
33 "AWS.IVSRealtime.ListParticipantEvents",
34 (
35 stage: Stage,
36 ) => Effect.Effect<
37 (
38 request: ListParticipantEventsRequest,
39 ) => Effect.Effect<
40 ivsrealtime.ListParticipantEventsResponse,
41 ivsrealtime.ListParticipantEventsError
42 >
43 >
44> {}
45export const ListParticipantEvents = Binding.Service<ListParticipantEvents>(
46 "AWS.IVSRealtime.ListParticipantEvents",
47);