| 1 | import type * as ivs from "@distilled.cloud/aws/ivs"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `ivs:BatchStartViewerSessionRevocation`. |
| 7 | * |
| 8 | * Starts revoking viewer sessions for up to 20 channel-ARN/viewer-ID |
| 9 | * pairs in one call — the multi-channel form of |
| 10 | * `StartViewerSessionRevocation` (e.g. kicking a banned viewer off every |
| 11 | * channel they are watching). Per-pair failures are reported in the |
| 12 | * response's `errors` array rather than failing the whole call. The |
| 13 | * operation spans many channels, so it is account-scoped. Provide the |
| 14 | * implementation with |
| 15 | * `Effect.provide(AWS.IVS.BatchStartViewerSessionRevocationHttp)`. |
| 16 | * ### Revoking Viewer Sessions |
| 17 | * **Example:** Revoke a Viewer Across Channels |
| 18 | * ```typescript |
| 19 | * // init — bind the account-level operation |
| 20 | * const revokeViewerSessions = |
| 21 | * yield* AWS.IVS.BatchStartViewerSessionRevocation(); |
| 22 | * |
| 23 | * // runtime |
| 24 | * const { errors } = yield* revokeViewerSessions({ |
| 25 | * viewerSessions: [ |
| 26 | * { channelArn: channelA, viewerId: "banned-viewer" }, |
| 27 | * { channelArn: channelB, viewerId: "banned-viewer" }, |
| 28 | * ], |
| 29 | * }); |
| 30 | * ``` |
| 31 | * |
| 32 | * @binding |
| 33 | */ |
| 34 | export interface BatchStartViewerSessionRevocation extends Binding.Service< |
| 35 | BatchStartViewerSessionRevocation, |
| 36 | "AWS.IVS.BatchStartViewerSessionRevocation", |
| 37 | () => Effect.Effect< |
| 38 | ( |
| 39 | request: ivs.BatchStartViewerSessionRevocationRequest, |
| 40 | ) => Effect.Effect< |
| 41 | ivs.BatchStartViewerSessionRevocationResponse, |
| 42 | ivs.BatchStartViewerSessionRevocationError |
| 43 | > |
| 44 | > |
| 45 | > {} |
| 46 | export const BatchStartViewerSessionRevocation = |
| 47 | Binding.Service<BatchStartViewerSessionRevocation>( |
| 48 | "AWS.IVS.BatchStartViewerSessionRevocation", |
| 49 | ); |