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

main
ts 45 lines 1.43 KB
Raw
1 import type * as kv from "@distilled.cloud/aws/kinesis-video";
2 import type * as kvam from "@distilled.cloud/aws/kinesis-video-archived-media";
3 import * as Binding from "alchemy/Binding";
4 import type * as Effect from "effect/Effect";
5 import type { Stream } from "./Stream.ts";
6
7 export interface GetImagesRequest extends Omit<kvam.GetImagesInput, "StreamName" | "StreamARN"> {}
8
9 /**
10 * Runtime binding for `kinesisvideo:GetImages` (archived media data plane).
11 *
12 * Bind this operation to a `Stream` inside a function runtime to get a
13 * callable that resolves the per-stream data endpoint (`GetDataEndpoint`)
14 * and extracts base64-encoded still images (JPEG/PNG) from the stored
15 * media at the requested sampling interval.
16 * ### Reading Media
17 * **Example:** Extract Thumbnails
18 * ```typescript
19 * // init
20 * const getImages = yield* AWS.KinesisVideo.GetImages(stream);
21 *
22 * // runtime
23 * const { Images } = yield* getImages({
24 * ImageSelectorType: "SERVER_TIMESTAMP",
25 * StartTimestamp: start,
26 * EndTimestamp: end,
27 * Format: "JPEG",
28 * });
29 * ```
30 *
31 * @binding
32 */
33 export interface GetImages extends Binding.Service<
34 GetImages,
35 "AWS.KinesisVideo.GetImages",
36 <S extends Stream>(
37 stream: S,
38 ) => Effect.Effect<
39 (
40 request: GetImagesRequest,
41 ) => Effect.Effect<kvam.GetImagesOutput, kvam.GetImagesError | kv.GetDataEndpointError>
42 >
43 > {}
44
45 export const GetImages = Binding.Service<GetImages>("AWS.KinesisVideo.GetImages");