| 1 | import type * as medialive from "@distilled.cloud/aws/medialive"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | import type { Channel } from "./Channel.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Runtime binding for `medialive:DescribeSchedule`. |
| 8 | * |
| 9 | * Reads the bound {@link Channel}'s schedule — the queue of pending and |
| 10 | * recent actions created with {@link BatchUpdateSchedule} (one page per |
| 11 | * call; pass `NextToken` from the previous response to continue) — e.g. |
| 12 | * so a playout dashboard can show upcoming input switches and ad breaks. |
| 13 | * The channel id is injected from the binding. Provide the implementation |
| 14 | * with `Effect.provide(AWS.MediaLive.DescribeScheduleHttp)`. |
| 15 | * ### Driving the Channel Schedule |
| 16 | * **Example:** List the Channel's Scheduled Actions |
| 17 | * ```typescript |
| 18 | * // init — bind the operation to the channel |
| 19 | * const describeSchedule = yield* AWS.MediaLive.DescribeSchedule(channel); |
| 20 | * |
| 21 | * // runtime |
| 22 | * const { ScheduleActions } = yield* describeSchedule(); |
| 23 | * ``` |
| 24 | * |
| 25 | * @binding |
| 26 | */ |
| 27 | export interface DescribeSchedule extends Binding.Service< |
| 28 | DescribeSchedule, |
| 29 | "AWS.MediaLive.DescribeSchedule", |
| 30 | ( |
| 31 | channel: Channel, |
| 32 | ) => Effect.Effect< |
| 33 | ( |
| 34 | request?: Omit<medialive.DescribeScheduleRequest, "ChannelId">, |
| 35 | ) => Effect.Effect< |
| 36 | medialive.DescribeScheduleResponse, |
| 37 | medialive.DescribeScheduleError |
| 38 | > |
| 39 | > |
| 40 | > {} |
| 41 | export const DescribeSchedule = Binding.Service<DescribeSchedule>( |
| 42 | "AWS.MediaLive.DescribeSchedule", |
| 43 | ); |