| 1 | import type * as ivsrealtime from "@distilled.cloud/aws/ivs-realtime"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Stage } from "./Stage.ts"; |
| 5 | |
| 6 | /** |
| 7 | * The `sourceStageArn` is injected by the binding from the bound (source) |
| 8 | * stage. |
| 9 | */ |
| 10 | export interface ListParticipantReplicasRequest extends Omit< |
| 11 | ivsrealtime.ListParticipantReplicasRequest, |
| 12 | "sourceStageArn" |
| 13 | > {} |
| 14 | |
| 15 | /** |
| 16 | * List the replicas of a participant of the bound (source) stage — the |
| 17 | * destination stages a participant's media is replicated to and each |
| 18 | * replica's state. |
| 19 | * |
| 20 | * ### Replicating Participants |
| 21 | * **Example:** List a participant's replicas |
| 22 | * ```typescript |
| 23 | * // init |
| 24 | * const listParticipantReplicas = yield* IVSRealtime.ListParticipantReplicas(stage); |
| 25 | * |
| 26 | * // runtime |
| 27 | * const { replicas } = yield* listParticipantReplicas({ |
| 28 | * participantId: "abcDEF123", |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface ListParticipantReplicas extends Binding.Service< |
| 35 | ListParticipantReplicas, |
| 36 | "AWS.IVSRealtime.ListParticipantReplicas", |
| 37 | ( |
| 38 | stage: Stage, |
| 39 | ) => Effect.Effect< |
| 40 | ( |
| 41 | request: ListParticipantReplicasRequest, |
| 42 | ) => Effect.Effect< |
| 43 | ivsrealtime.ListParticipantReplicasResponse, |
| 44 | ivsrealtime.ListParticipantReplicasError |
| 45 | > |
| 46 | > |
| 47 | > {} |
| 48 | export const ListParticipantReplicas = Binding.Service<ListParticipantReplicas>( |
| 49 | "AWS.IVSRealtime.ListParticipantReplicas", |
| 50 | ); |