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/**
7 * The `sourceStageArn` and `destinationStageArn` are injected by the binding
8 * from the bound stages.
9 */
10export interface StopParticipantReplicationRequest extends Omit<
11 ivsrealtime.StopParticipantReplicationRequest,
12 "sourceStageArn" | "destinationStageArn"
13> {}
14
15/**
16 * Stop replicating a participant's media from the bound source stage into
17 * the bound destination stage.
18 *
19 * ### Replicating Participants
20 * **Example:** Stop a replication
21 * ```typescript
22 * // init — bound to (source, destination)
23 * const stopParticipantReplication =
24 * yield* IVSRealtime.StopParticipantReplication(mainStage, overflowStage);
25 *
26 * // runtime
27 * yield* stopParticipantReplication({ participantId: "abcDEF123" });
28 * ```
29 *
30 * @binding
31 */
32export interface StopParticipantReplication extends Binding.Service<
33 StopParticipantReplication,
34 "AWS.IVSRealtime.StopParticipantReplication",
35 (
36 sourceStage: Stage,
37 destinationStage: Stage,
38 ) => Effect.Effect<
39 (
40 request: StopParticipantReplicationRequest,
41 ) => Effect.Effect<
42 ivsrealtime.StopParticipantReplicationResponse,
43 ivsrealtime.StopParticipantReplicationError
44 >
45 >
46> {}
47export const StopParticipantReplication =
48 Binding.Service<StopParticipantReplication>(
49 "AWS.IVSRealtime.StopParticipantReplication",
50 );