@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 48 lines 1.49 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 ListFragmentsRequest extends Omit<
8 kvam.ListFragmentsInput,
9 "StreamName" | "StreamARN"
10 > {}
11
12 /**
13 * Runtime binding for `kinesisvideo:ListFragments` (archived media data
14 * plane).
15 *
16 * Bind this operation to a `Stream` inside a function runtime to get a
17 * callable that resolves the per-stream data endpoint (`GetDataEndpoint`)
18 * and lists the media fragments stored in the requested timestamp range.
19 * ### Reading Media
20 * **Example:** List Stored Fragments
21 * ```typescript
22 * // init
23 * const listFragments = yield* AWS.KinesisVideo.ListFragments(stream);
24 *
25 * // runtime
26 * const { Fragments } = yield* listFragments({
27 * FragmentSelector: {
28 * FragmentSelectorType: "SERVER_TIMESTAMP",
29 * TimestampRange: { StartTimestamp: start, EndTimestamp: end },
30 * },
31 * });
32 * ```
33 *
34 * @binding
35 */
36 export interface ListFragments extends Binding.Service<
37 ListFragments,
38 "AWS.KinesisVideo.ListFragments",
39 <S extends Stream>(
40 stream: S,
41 ) => Effect.Effect<
42 (
43 request?: ListFragmentsRequest,
44 ) => Effect.Effect<kvam.ListFragmentsOutput, kvam.ListFragmentsError | kv.GetDataEndpointError>
45 >
46 > {}
47
48 export const ListFragments = Binding.Service<ListFragments>("AWS.KinesisVideo.ListFragments");