@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 40 lines 1.46 KB
Raw
1 import type * as mediapackagev2 from "@distilled.cloud/aws/mediapackagev2";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { OriginEndpoint } from "./OriginEndpoint.ts";
5
6 /**
7 * Runtime binding for `mediapackagev2:GetHarvestJob`.
8 *
9 * Reads the status of a harvest job on the bound {@link OriginEndpoint} —
10 * e.g. polling until a clip export reaches `COMPLETED` before publishing
11 * the VOD asset. The endpoint's group, channel, and name are injected from
12 * the binding. Provide the implementation with
13 * `Effect.provide(AWS.MediaPackageV2.GetHarvestJobHttp)`.
14 * ### Harvesting Live-to-VOD Clips
15 * **Example:** Poll a Harvest Job Until It Completes
16 * ```typescript
17 * // init — bind the operation to the endpoint
18 * const getHarvestJob = yield* AWS.MediaPackageV2.GetHarvestJob(endpoint);
19 *
20 * // runtime
21 * const { Status } = yield* getHarvestJob({ HarvestJobName: job.HarvestJobName });
22 * ```
23 *
24 * @binding
25 */
26 export interface GetHarvestJob extends Binding.Service<
27 GetHarvestJob,
28 "AWS.MediaPackageV2.GetHarvestJob",
29 (
30 endpoint: OriginEndpoint,
31 ) => Effect.Effect<
32 (
33 request: Omit<
34 mediapackagev2.GetHarvestJobRequest,
35 "ChannelGroupName" | "ChannelName" | "OriginEndpointName"
36 >,
37 ) => Effect.Effect<mediapackagev2.GetHarvestJobResponse, mediapackagev2.GetHarvestJobError>
38 >
39 > {}
40 export const GetHarvestJob = Binding.Service<GetHarvestJob>("AWS.MediaPackageV2.GetHarvestJob");