@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 54 lines 1.85 KB
Raw
1 import type * as mediatailor from "@distilled.cloud/aws/mediatailor";
2 import * as Binding from "alchemy/Binding";
3 import type * as Effect from "effect/Effect";
4 import type { PlaybackConfiguration } from "./PlaybackConfiguration.ts";
5
6 /**
7 * `CreatePrefetchSchedule` request with `PlaybackConfigurationName` injected
8 * from the bound {@link PlaybackConfiguration}.
9 */
10 export interface CreatePrefetchScheduleRequest extends Omit<
11 mediatailor.CreatePrefetchScheduleRequest,
12 "PlaybackConfigurationName"
13 > {}
14
15 /**
16 * Runtime binding for `mediatailor:CreatePrefetchSchedule` — tell MediaTailor
17 * to fetch and prepare ads for upcoming ad breaks ahead of time (e.g. right
18 * before a live event's scheduled break) so avails fill without ADS latency.
19 *
20 * The bound {@link PlaybackConfiguration}'s name is injected; the grant is
21 * scoped to that configuration's prefetch-schedule ARN space. Provide the
22 * implementation with `Effect.provide(AWS.MediaTailor.CreatePrefetchScheduleHttp)`.
23 *
24 * ### Prefetching Ads
25 * **Example:** Prefetch ads for an upcoming break
26 * ```typescript
27 * const createPrefetchSchedule = yield* AWS.MediaTailor.CreatePrefetchSchedule(config);
28 *
29 * const schedule = yield* createPrefetchSchedule({
30 * Name: `event-${eventId}`,
31 * Retrieval: { EndTime: retrievalDeadline },
32 * Consumption: { EndTime: breakEnd },
33 * });
34 * ```
35 *
36 * @binding
37 */
38 export interface CreatePrefetchSchedule extends Binding.Service<
39 CreatePrefetchSchedule,
40 "AWS.MediaTailor.CreatePrefetchSchedule",
41 (
42 config: PlaybackConfiguration,
43 ) => Effect.Effect<
44 (
45 request: CreatePrefetchScheduleRequest,
46 ) => Effect.Effect<
47 mediatailor.CreatePrefetchScheduleResponse,
48 mediatailor.CreatePrefetchScheduleError
49 >
50 >
51 > {}
52 export const CreatePrefetchSchedule = Binding.Service<CreatePrefetchSchedule>(
53 "AWS.MediaTailor.CreatePrefetchSchedule",
54 );