1import type * as mediaconnect from "@distilled.cloud/aws/mediaconnect";
2import type * as Effect from "effect/Effect";
3import * as Binding from "../../Binding.ts";
4import type { Flow } from "./Flow.ts";
5
6/**
7 * Runtime binding for `mediaconnect:DescribeFlowSourceThumbnail`.
8 *
9 * Fetches a thumbnail of the content currently arriving at the bound
10 * {@link Flow}'s source (base64-encoded, refreshed every few seconds) —
11 * the building block for visual confidence monitoring. Thumbnails are
12 * only generated while the flow is running and `sourceMonitoringConfig`
13 * has thumbnails enabled; otherwise the response carries
14 * `ThumbnailMessages` explaining why no image is available. The flow ARN
15 * is injected from the binding. Provide the implementation with
16 * `Effect.provide(AWS.MediaConnect.DescribeFlowSourceThumbnailHttp)`.
17 * ### Observing Flows
18 * **Example:** Render a Confidence Thumbnail
19 * ```typescript
20 * // init — bind the operation to the flow
21 * const sourceThumbnail = yield* AWS.MediaConnect.DescribeFlowSourceThumbnail(flow);
22 *
23 * // runtime
24 * const { ThumbnailDetails } = yield* sourceThumbnail();
25 * const image = ThumbnailDetails?.Thumbnail; // base64-encoded JPEG
26 * ```
27 *
28 * @binding
29 */
30export interface DescribeFlowSourceThumbnail extends Binding.Service<
31 DescribeFlowSourceThumbnail,
32 "AWS.MediaConnect.DescribeFlowSourceThumbnail",
33 (
34 flow: Flow,
35 ) => Effect.Effect<
36 () => Effect.Effect<
37 mediaconnect.DescribeFlowSourceThumbnailResponse,
38 mediaconnect.DescribeFlowSourceThumbnailError
39 >
40 >
41> {}
42export const DescribeFlowSourceThumbnail =
43 Binding.Service<DescribeFlowSourceThumbnail>(
44 "AWS.MediaConnect.DescribeFlowSourceThumbnail",
45 );