1import type * as medialive from "@distilled.cloud/aws/medialive";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Channel } from "./Channel.ts";
5
6/**
7 * Runtime binding for `medialive:DescribeThumbnails`.
8 *
9 * Fetches the latest preview thumbnail (base64 JPEG) from a pipeline of
10 * the bound RUNNING {@link Channel} — e.g. a confidence-monitoring
11 * dashboard that renders a live snapshot of what the channel is encoding.
12 * Requires thumbnails to be enabled in the channel's encoder settings; a
13 * channel that is not running answers with the typed
14 * `BadRequestException` tag. The channel id is injected from the binding.
15 * Provide the implementation with
16 * `Effect.provide(AWS.MediaLive.DescribeThumbnailsHttp)`.
17 * ### Observing Channels
18 * **Example:** Fetch the Latest Preview Thumbnail
19 * ```typescript
20 * // init — bind the operation to the channel
21 * const describeThumbnails = yield* AWS.MediaLive.DescribeThumbnails(channel);
22 *
23 * // runtime
24 * const { ThumbnailDetails } = yield* describeThumbnails({
25 * PipelineId: "0",
26 * ThumbnailType: "CURRENT_ACTIVE",
27 * });
28 * ```
29 *
30 * @binding
31 */
32export interface DescribeThumbnails extends Binding.Service<
33 DescribeThumbnails,
34 "AWS.MediaLive.DescribeThumbnails",
35 (
36 channel: Channel,
37 ) => Effect.Effect<
38 (
39 request?: Omit<medialive.DescribeThumbnailsRequest, "ChannelId">,
40 ) => Effect.Effect<
41 medialive.DescribeThumbnailsResponse,
42 medialive.DescribeThumbnailsError
43 >
44 >
45> {}
46export const DescribeThumbnails = Binding.Service<DescribeThumbnails>(
47 "AWS.MediaLive.DescribeThumbnails",
48);