1import type * as ivs from "@distilled.cloud/aws/ivs";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Channel } from "./Channel.ts";
5
6export interface ListStreamSessionsRequest extends Omit<
7 ivs.ListStreamSessionsRequest,
8 "channelArn"
9> {}
10
11/**
12 * Runtime binding for `ivs:ListStreamSessions`.
13 *
14 * Enumerates current and previous broadcast sessions on the bound
15 * {@link Channel} (most recent first). The channel ARN is injected from
16 * the binding. Provide the implementation with
17 * `Effect.provide(AWS.IVS.ListStreamSessionsHttp)`.
18 * ### Monitoring Live Streams
19 * **Example:** List Recent Broadcasts
20 * ```typescript
21 * // init — bind the operation to the channel
22 * const listStreamSessions = yield* AWS.IVS.ListStreamSessions(channel);
23 *
24 * // runtime
25 * const { streamSessions } = yield* listStreamSessions({ maxResults: 10 });
26 * yield* Effect.log(`sessions: ${streamSessions.length}`);
27 * ```
28 *
29 * @binding
30 */
31export interface ListStreamSessions extends Binding.Service<
32 ListStreamSessions,
33 "AWS.IVS.ListStreamSessions",
34 (
35 channel: Channel,
36 ) => Effect.Effect<
37 (
38 request?: ListStreamSessionsRequest,
39 ) => Effect.Effect<
40 ivs.ListStreamSessionsResponse,
41 ivs.ListStreamSessionsError
42 >
43 >
44> {}
45export const ListStreamSessions = Binding.Service<ListStreamSessions>(
46 "AWS.IVS.ListStreamSessions",
47);