@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 45 lines 1.6 KB
Raw
1 import type * as medialive from "@distilled.cloud/aws/medialive";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import 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 */
32 export 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<medialive.DescribeThumbnailsResponse, medialive.DescribeThumbnailsError>
41 >
42 > {}
43 export const DescribeThumbnails = Binding.Service<DescribeThumbnails>(
44 "AWS.MediaLive.DescribeThumbnails",
45 );